@qn-pandora/pandora-component 4.0.5 → 4.0.6
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/CHANGELOG.json +23 -0
- package/CHANGELOG.md +9 -1
- package/es/components/AutoComplete/index.d.ts +2 -1
- package/es/components/AutoComplete/index.js +2 -2
- package/es/components/KeyValuePair/index.d.ts +4 -0
- package/es/components/KeyValuePair/index.js +5 -3
- package/es/components/KeyValuePair/style.css +4 -0
- package/es/components/KeyValuePair/style.less +4 -0
- package/es/components/Selector/index.d.ts +2 -0
- package/es/components/Selector/index.js +2 -2
- package/es/index.css +5747 -5743
- package/es/index.less +15 -15
- package/lib/components/AutoComplete/index.d.ts +2 -1
- package/lib/components/AutoComplete/index.js +2 -2
- package/lib/components/KeyValuePair/index.d.ts +4 -0
- package/lib/components/KeyValuePair/index.js +5 -3
- package/lib/components/KeyValuePair/style.css +4 -0
- package/lib/components/KeyValuePair/style.less +4 -0
- package/lib/components/Selector/index.d.ts +2 -0
- package/lib/components/Selector/index.js +2 -2
- package/lib/index.css +2086 -2082
- package/lib/index.less +13 -13
- package/package.json +4 -4
package/es/index.less
CHANGED
@@ -3,48 +3,48 @@
|
|
3
3
|
@import './components\AutoComplete\style.less';
|
4
4
|
@import './components\Breadcrumb\style.less';
|
5
5
|
@import './components\Button\style.less';
|
6
|
-
@import './components\Checkbox\style.less';
|
7
6
|
@import './components\Card\style.less';
|
8
|
-
@import './components\Collapse\style.less';
|
9
7
|
@import './components\CheckboxList\style.less';
|
8
|
+
@import './components\Checkbox\style.less';
|
10
9
|
@import './components\CheckTransformList\style.less';
|
10
|
+
@import './components\Collapse\style.less';
|
11
11
|
@import './components\CollapsiblePanel\style.less';
|
12
|
+
@import './components\DateTimePicker\style.less';
|
12
13
|
@import './components\FileResumable\style.less';
|
13
14
|
@import './components\Drawer\style.less';
|
14
|
-
@import './components\DateTimePicker\style.less';
|
15
15
|
@import './components\Input\style.less';
|
16
16
|
@import './components\KeyValuePair\style.less';
|
17
17
|
@import './components\Menu\style.less';
|
18
|
-
@import './components\NameExplainTooltip\style.less';
|
19
18
|
@import './components\Modal\style.less';
|
20
|
-
@import './components\
|
21
|
-
@import './components\RangeInput\style.less';
|
19
|
+
@import './components\NameExplainTooltip\style.less';
|
22
20
|
@import './components\NameLimiter\style.less';
|
21
|
+
@import './components\OptionList\style.less';
|
23
22
|
@import './components\RadioGroup\style.less';
|
24
|
-
@import './components\
|
23
|
+
@import './components\RangeInput\style.less';
|
25
24
|
@import './components\RemarkName\style.less';
|
26
25
|
@import './components\Spin\style.less';
|
26
|
+
@import './components\Selector\style.less';
|
27
27
|
@import './components\Steps\style.less';
|
28
|
+
@import './components\Table\style.less';
|
28
29
|
@import './components\TagList\style.less';
|
29
30
|
@import './components\Tabs\style.less';
|
30
|
-
@import './components\Table\style.less';
|
31
|
-
@import './components\Transfer\style.less';
|
32
31
|
@import './components\Timeline\style.less';
|
32
|
+
@import './components\Transfer\style.less';
|
33
33
|
@import './components\TreeSelector\style.less';
|
34
34
|
@import './components\Card\SearchInput\style.less';
|
35
35
|
@import './components\Card\RowExtra\style.less';
|
36
36
|
@import './components\DateTimePicker\Base\style.less';
|
37
37
|
@import './components\DateTimePicker\BaseMobile\style.less';
|
38
38
|
@import './components\DateTimePicker\DisplayInput\style.less';
|
39
|
-
@import './components\OptionList\InlineOptionList\style.less';
|
40
39
|
@import './components\OptionList\OptionItem\style.less';
|
41
40
|
@import './components\OptionList\PopoverOptionList\style.less';
|
41
|
+
@import './components\OptionList\InlineOptionList\style.less';
|
42
42
|
@import './components\Steps\ControlButton\style.less';
|
43
|
-
@import './components\TagList\TagSwitch\style.less';
|
44
|
-
@import './components\TagList\Tag\style.less';
|
45
43
|
@import './components\Table\ColumnTag\style.less';
|
44
|
+
@import './components\TagList\Tag\style.less';
|
45
|
+
@import './components\Timeline\TimelineItem\style.less';
|
46
|
+
@import './components\TagList\TagSwitch\style.less';
|
46
47
|
@import './components\Transfer\List\style.less';
|
47
48
|
@import './components\Transfer\ListBody\style.less';
|
48
|
-
@import './components\
|
49
|
-
@import './components\DateTimePicker\Collapse\Panel\style.less';
|
50
|
-
@import './components\DateTimePicker\BaseMobile\Absolute\style.less';
|
49
|
+
@import './components\DateTimePicker\BaseMobile\Absolute\style.less';
|
50
|
+
@import './components\DateTimePicker\Collapse\Panel\style.less';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import type { RefObject } from 'react';
|
2
2
|
import { AutoCompleteProps as BaseAutoCompleteProps } from 'antd/es/auto-complete';
|
3
3
|
export declare type AutoSelectValue = string | undefined;
|
4
4
|
export interface IAutoCompleteProps extends Omit<BaseAutoCompleteProps, 'value' | 'onChange'> {
|
@@ -14,6 +14,7 @@ export interface IAutoCompleteProps extends Omit<BaseAutoCompleteProps, 'value'
|
|
14
14
|
* AutoSelectValue同value类型一致
|
15
15
|
*/
|
16
16
|
onChange?: (value: AutoSelectValue) => void;
|
17
|
+
selectorRef?: RefObject<any>;
|
17
18
|
}
|
18
19
|
export declare function AutoComplete(props: IAutoCompleteProps): JSX.Element;
|
19
20
|
declare const _default: (props: IAutoCompleteProps & {
|
@@ -40,7 +40,7 @@ var style_1 = require("../../constants/style");
|
|
40
40
|
var debounce_1 = __importDefault(require("../../hoc/debounce"));
|
41
41
|
function AutoComplete(props) {
|
42
42
|
var _a;
|
43
|
-
var className = props.className, dropdownClassName = props.dropdownClassName, ellipsis = props.ellipsis, other = __rest(props, ["className", "dropdownClassName", "ellipsis"]);
|
43
|
+
var className = props.className, dropdownClassName = props.dropdownClassName, ellipsis = props.ellipsis, selectorRef = props.selectorRef, other = __rest(props, ["className", "dropdownClassName", "ellipsis", "selectorRef"]);
|
44
44
|
var filterOption = React.useCallback(function (inputValue, option) {
|
45
45
|
var prefix = (inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase()) || '';
|
46
46
|
var _a = option || {}, value = _a.value, title = _a.title, children = _a.children, label = _a.label;
|
@@ -60,7 +60,7 @@ function AutoComplete(props) {
|
|
60
60
|
? lodash_1.includes(value.toLowerCase(), prefix)
|
61
61
|
: true;
|
62
62
|
}, []);
|
63
|
-
return (React.createElement(antd_1.AutoComplete, __assign({ className: classnames_1.default(className, style_1.SDK_PREFIX + "-auto-complete", style_1.SDK_PREFIX + "-selector"), dropdownClassName: classnames_1.default(style_1.SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[style_1.SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), filterOption: filterOption, showSearch: true }, other)));
|
63
|
+
return (React.createElement(antd_1.AutoComplete, __assign({ ref: selectorRef, className: classnames_1.default(className, style_1.SDK_PREFIX + "-auto-complete", style_1.SDK_PREFIX + "-selector"), dropdownClassName: classnames_1.default(style_1.SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[style_1.SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), filterOption: filterOption, showSearch: true }, other)));
|
64
64
|
}
|
65
65
|
exports.AutoComplete = AutoComplete;
|
66
66
|
exports.default = debounce_1.default(AutoComplete);
|
@@ -14,9 +14,11 @@ var React = __importStar(require("react"));
|
|
14
14
|
var classnames_1 = __importDefault(require("classnames"));
|
15
15
|
var style_1 = require("../../constants/style");
|
16
16
|
function KeyValuePair(props) {
|
17
|
-
var label = props.label, value = props.value, labelClassName = props.labelClassName, valueClassName = props.valueClassName;
|
17
|
+
var label = props.label, value = props.value, labelClassName = props.labelClassName, valueClassName = props.valueClassName, htmlContent = props.htmlContent;
|
18
18
|
return (React.createElement("div", { className: classnames_1.default(props.className) },
|
19
|
-
React.createElement("span", { className: classnames_1.default(style_1.SDK_PREFIX + "-key-value-label", labelClassName) }, label),
|
20
|
-
React.createElement("span", { className: classnames_1.default(style_1.SDK_PREFIX + "-key-value-value", valueClassName)
|
19
|
+
React.createElement("span", { className: classnames_1.default(style_1.SDK_PREFIX + "-key-value-label", !!htmlContent && style_1.SDK_PREFIX + "-key-value-label-top", labelClassName) }, label),
|
20
|
+
htmlContent ? (React.createElement("span", { className: classnames_1.default(style_1.SDK_PREFIX + "-key-value-value", valueClassName), dangerouslySetInnerHTML: {
|
21
|
+
__html: value
|
22
|
+
} })) : (React.createElement("span", { className: classnames_1.default(style_1.SDK_PREFIX + "-key-value-value", valueClassName) }, value))));
|
21
23
|
}
|
22
24
|
exports.default = KeyValuePair;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
+
import type { RefObject } from 'react';
|
2
3
|
import { SelectProps, SelectValue } from 'antd/es/select';
|
3
4
|
import PropTypes from 'prop-types';
|
4
5
|
declare type IValue = string | number;
|
@@ -53,6 +54,7 @@ export interface ISelectorProps<VT> extends Omit<SelectProps<VT>, 'options'> {
|
|
53
54
|
*/
|
54
55
|
ellipsis?: boolean;
|
55
56
|
isCustomFilter?: boolean;
|
57
|
+
selectorRef?: RefObject<any>;
|
56
58
|
}
|
57
59
|
/**
|
58
60
|
* 下拉选择组件封装
|
@@ -139,8 +139,8 @@ var Selector = /** @class */ (function (_super) {
|
|
139
139
|
};
|
140
140
|
Selector.prototype.render = function () {
|
141
141
|
var _a;
|
142
|
-
var _b = this.props, options = _b.options, groupOptions = _b.groupOptions, createOptionText = _b.createOptionText, selectAllOptionText = _b.selectAllOptionText, className = _b.className, dropdownClassName = _b.dropdownClassName, getPopupContainer = _b.getPopupContainer, ellipsis = _b.ellipsis, _c = _b.showArrow, showArrow = _c === void 0 ? true : _c, isCustomFilter = _b.isCustomFilter, otherProps = __rest(_b, ["options", "groupOptions", "createOptionText", "selectAllOptionText", "className", "dropdownClassName", "getPopupContainer", "ellipsis", "showArrow", "isCustomFilter"]);
|
143
|
-
return (React.createElement(antd_1.Select, __assign({ className: classnames_1.default(style_1.SDK_PREFIX + "-selector", className), dropdownClassName: classnames_1.default(style_1.SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[style_1.SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), getPopupContainer: getPopupContainer || this.context.getPopupContainer, filterOption: this.handleFilter }, otherProps, { removeIcon: React.createElement(compatible_1.Icon, { type: "close-circle", theme: "filled", className: style_1.SDK_PREFIX + "-close-icon" }), showArrow: showArrow, showSearch: true }),
|
142
|
+
var _b = this.props, options = _b.options, groupOptions = _b.groupOptions, createOptionText = _b.createOptionText, selectAllOptionText = _b.selectAllOptionText, className = _b.className, dropdownClassName = _b.dropdownClassName, getPopupContainer = _b.getPopupContainer, ellipsis = _b.ellipsis, _c = _b.showArrow, showArrow = _c === void 0 ? true : _c, isCustomFilter = _b.isCustomFilter, selectorRef = _b.selectorRef, otherProps = __rest(_b, ["options", "groupOptions", "createOptionText", "selectAllOptionText", "className", "dropdownClassName", "getPopupContainer", "ellipsis", "showArrow", "isCustomFilter", "selectorRef"]);
|
143
|
+
return (React.createElement(antd_1.Select, __assign({ className: classnames_1.default(style_1.SDK_PREFIX + "-selector", className), dropdownClassName: classnames_1.default(style_1.SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[style_1.SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), getPopupContainer: getPopupContainer || this.context.getPopupContainer, filterOption: this.handleFilter }, otherProps, { removeIcon: React.createElement(compatible_1.Icon, { type: "close-circle", theme: "filled", className: style_1.SDK_PREFIX + "-close-icon" }), showArrow: showArrow, ref: selectorRef, showSearch: true }),
|
144
144
|
createOptionText && (React.createElement(antd_1.Select.Option, __assign({}, { className: style_1.SDK_PREFIX + "-selector-create-option" }, { key: "selector_create", disabled: true }, noneValueOption),
|
145
145
|
React.createElement("a", { className: style_1.SDK_PREFIX + "-selector-create-lint", onClick: this.handleCreateClick }, createOptionText))),
|
146
146
|
selectAllOptionText && (React.createElement(antd_1.Select.Option, __assign({}, { className: style_1.SDK_PREFIX + "-selector-create-option" }, { key: "selector_select_all", disabled: true }, noneValueOption),
|