@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/CHANGELOG.json
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
{
|
2
2
|
"name": "@qn-pandora/pandora-component",
|
3
3
|
"entries": [
|
4
|
+
{
|
5
|
+
"version": "4.0.6",
|
6
|
+
"tag": "@qn-pandora/pandora-component_v4.0.6",
|
7
|
+
"date": "Mon, 13 Mar 2023 11:30:17 GMT",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"comment": "2023.03.13发布"
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"dependency": [
|
15
|
+
{
|
16
|
+
"comment": "Updating dependency \"@qn-pandora/pandora-component-icons\" from `^3.0.8` to `^3.0.9`"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"comment": "Updating dependency \"@qn-pandora/app-sdk\" from `^3.0.8` to `^3.0.9`"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"comment": "Updating dependency \"@qn-pandora/pandora-tools\" from `^2.0.7` to `^2.0.8`"
|
23
|
+
}
|
24
|
+
]
|
25
|
+
}
|
26
|
+
},
|
4
27
|
{
|
5
28
|
"version": "4.0.5",
|
6
29
|
"tag": "@qn-pandora/pandora-component_v4.0.5",
|
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
# Change Log - @qn-pandora/pandora-component
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 13 Mar 2023 11:30:17 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 4.0.6
|
6
|
+
|
7
|
+
Mon, 13 Mar 2023 11:30:17 GMT
|
8
|
+
|
9
|
+
### Patches
|
10
|
+
|
11
|
+
- 2023.03.13 发布
|
4
12
|
|
5
13
|
## 4.0.5
|
6
14
|
|
@@ -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 & {
|
@@ -28,7 +28,7 @@ import { SDK_PREFIX } from '../../constants/style';
|
|
28
28
|
import debounceWrapper from '../../hoc/debounce';
|
29
29
|
export function AutoComplete(props) {
|
30
30
|
var _a;
|
31
|
-
var className = props.className, dropdownClassName = props.dropdownClassName, ellipsis = props.ellipsis, other = __rest(props, ["className", "dropdownClassName", "ellipsis"]);
|
31
|
+
var className = props.className, dropdownClassName = props.dropdownClassName, ellipsis = props.ellipsis, selectorRef = props.selectorRef, other = __rest(props, ["className", "dropdownClassName", "ellipsis", "selectorRef"]);
|
32
32
|
var filterOption = React.useCallback(function (inputValue, option) {
|
33
33
|
var prefix = (inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase()) || '';
|
34
34
|
var _a = option || {}, value = _a.value, title = _a.title, children = _a.children, label = _a.label;
|
@@ -48,6 +48,6 @@ export function AutoComplete(props) {
|
|
48
48
|
? includes(value.toLowerCase(), prefix)
|
49
49
|
: true;
|
50
50
|
}, []);
|
51
|
-
return (React.createElement(BaseAutoComplete, __assign({ className: classnames(className, SDK_PREFIX + "-auto-complete", SDK_PREFIX + "-selector"), dropdownClassName: classnames(SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), filterOption: filterOption, showSearch: true }, other)));
|
51
|
+
return (React.createElement(BaseAutoComplete, __assign({ ref: selectorRef, className: classnames(className, SDK_PREFIX + "-auto-complete", SDK_PREFIX + "-selector"), dropdownClassName: classnames(SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), filterOption: filterOption, showSearch: true }, other)));
|
52
52
|
}
|
53
53
|
export default debounceWrapper(AutoComplete);
|
@@ -2,8 +2,10 @@ import * as React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
3
3
|
import { SDK_PREFIX } from '../../constants/style';
|
4
4
|
export default function KeyValuePair(props) {
|
5
|
-
var label = props.label, value = props.value, labelClassName = props.labelClassName, valueClassName = props.valueClassName;
|
5
|
+
var label = props.label, value = props.value, labelClassName = props.labelClassName, valueClassName = props.valueClassName, htmlContent = props.htmlContent;
|
6
6
|
return (React.createElement("div", { className: classnames(props.className) },
|
7
|
-
React.createElement("span", { className: classnames(SDK_PREFIX + "-key-value-label", labelClassName) }, label),
|
8
|
-
React.createElement("span", { className: classnames(SDK_PREFIX + "-key-value-value", valueClassName)
|
7
|
+
React.createElement("span", { className: classnames(SDK_PREFIX + "-key-value-label", !!htmlContent && SDK_PREFIX + "-key-value-label-top", labelClassName) }, label),
|
8
|
+
htmlContent ? (React.createElement("span", { className: classnames(SDK_PREFIX + "-key-value-value", valueClassName), dangerouslySetInnerHTML: {
|
9
|
+
__html: value
|
10
|
+
} })) : (React.createElement("span", { className: classnames(SDK_PREFIX + "-key-value-value", valueClassName) }, value))));
|
9
11
|
}
|
@@ -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
|
* 下拉选择组件封装
|
@@ -127,8 +127,8 @@ var Selector = /** @class */ (function (_super) {
|
|
127
127
|
};
|
128
128
|
Selector.prototype.render = function () {
|
129
129
|
var _a;
|
130
|
-
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"]);
|
131
|
-
return (React.createElement(Select, __assign({ className: classnames(SDK_PREFIX + "-selector", className), dropdownClassName: classnames(SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), getPopupContainer: getPopupContainer || this.context.getPopupContainer, filterOption: this.handleFilter }, otherProps, { removeIcon: React.createElement(Icon, { type: "close-circle", theme: "filled", className: SDK_PREFIX + "-close-icon" }), showArrow: showArrow, showSearch: true }),
|
130
|
+
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"]);
|
131
|
+
return (React.createElement(Select, __assign({ className: classnames(SDK_PREFIX + "-selector", className), dropdownClassName: classnames(SDK_PREFIX + "-selector-dropdown", (_a = {}, _a[SDK_PREFIX + "-selector-no-ellipsis"] = !ellipsis, _a), dropdownClassName), getPopupContainer: getPopupContainer || this.context.getPopupContainer, filterOption: this.handleFilter }, otherProps, { removeIcon: React.createElement(Icon, { type: "close-circle", theme: "filled", className: SDK_PREFIX + "-close-icon" }), showArrow: showArrow, ref: selectorRef, showSearch: true }),
|
132
132
|
createOptionText && (React.createElement(Select.Option, __assign({}, { className: SDK_PREFIX + "-selector-create-option" }, { key: "selector_create", disabled: true }, noneValueOption),
|
133
133
|
React.createElement("a", { className: SDK_PREFIX + "-selector-create-lint", onClick: this.handleCreateClick }, createOptionText))),
|
134
134
|
selectAllOptionText && (React.createElement(Select.Option, __assign({}, { className: SDK_PREFIX + "-selector-create-option" }, { key: "selector_select_all", disabled: true }, noneValueOption),
|