@qn-pandora/pandora-component 4.0.14 → 4.1.1
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 +343 -323
- package/CHANGELOG.md +131 -123
- package/es/components/Drawer/CloseIcon/index.js +1 -1
- package/es/components/Drawer/CloseIcon/style.css +2 -2
- package/es/components/Drawer/CloseIcon/style.less +1 -1
- package/es/components/Drawer/index.d.ts +5 -4
- package/es/components/Drawer/index.js +4 -6
- package/es/components/Table/style.css +8 -3
- package/es/components/Table/style.less +6 -3
- package/es/hoc/modalPopupContainer.d.ts +1 -0
- package/es/hoc/modalPopupContainer.js +8 -3
- package/es/index.css +4754 -4749
- package/es/index.less +13 -13
- package/es/style/theme.less +5 -0
- package/lib/components/Drawer/CloseIcon/index.js +1 -1
- package/lib/components/Drawer/CloseIcon/style.css +2 -2
- package/lib/components/Drawer/CloseIcon/style.less +1 -1
- package/lib/components/Drawer/index.d.ts +5 -4
- package/lib/components/Drawer/index.js +4 -6
- package/lib/components/Table/style.css +8 -3
- package/lib/components/Table/style.less +6 -3
- package/lib/hoc/modalPopupContainer.d.ts +1 -0
- package/lib/hoc/modalPopupContainer.js +8 -3
- package/lib/index.css +8039 -8034
- package/lib/index.less +16 -16
- package/lib/style/theme.less +5 -0
- package/package.json +5 -5
package/es/index.less
CHANGED
@@ -2,51 +2,51 @@
|
|
2
2
|
@import './style\theme.less';
|
3
3
|
@import './components\AutoComplete\style.less';
|
4
4
|
@import './components\Breadcrumb\style.less';
|
5
|
-
@import './components\Button\style.less';
|
6
|
-
@import './components\Card\style.less';
|
7
5
|
@import './components\Checkbox\style.less';
|
6
|
+
@import './components\Card\style.less';
|
7
|
+
@import './components\Button\style.less';
|
8
8
|
@import './components\CheckboxList\style.less';
|
9
9
|
@import './components\CheckTransformList\style.less';
|
10
|
-
@import './components\Collapse\style.less';
|
11
10
|
@import './components\CollapsiblePanel\style.less';
|
11
|
+
@import './components\Collapse\style.less';
|
12
12
|
@import './components\DateTimePicker\style.less';
|
13
|
-
@import './components\Descriptions\style.less';
|
14
13
|
@import './components\Drawer\style.less';
|
15
|
-
@import './components\
|
14
|
+
@import './components\Descriptions\style.less';
|
16
15
|
@import './components\FileResumable\style.less';
|
16
|
+
@import './components\Input\style.less';
|
17
17
|
@import './components\KeyValuePair\style.less';
|
18
18
|
@import './components\Menu\style.less';
|
19
19
|
@import './components\Modal\style.less';
|
20
|
-
@import './components\NameExplainTooltip\style.less';
|
21
20
|
@import './components\NameLimiter\style.less';
|
22
|
-
@import './components\
|
21
|
+
@import './components\NameExplainTooltip\style.less';
|
23
22
|
@import './components\RadioGroup\style.less';
|
23
|
+
@import './components\OptionList\style.less';
|
24
24
|
@import './components\RangeInput\style.less';
|
25
25
|
@import './components\Selector\style.less';
|
26
26
|
@import './components\RemarkName\style.less';
|
27
27
|
@import './components\Spin\style.less';
|
28
|
-
@import './components\Table\style.less';
|
29
|
-
@import './components\Tabs\style.less';
|
30
28
|
@import './components\Steps\style.less';
|
29
|
+
@import './components\Table\style.less';
|
31
30
|
@import './components\TagList\style.less';
|
31
|
+
@import './components\Tabs\style.less';
|
32
32
|
@import './components\Timeline\style.less';
|
33
33
|
@import './components\Transfer\style.less';
|
34
34
|
@import './components\TreeSelector\style.less';
|
35
35
|
@import './components\Card\RowExtra\style.less';
|
36
36
|
@import './components\Card\SearchInput\style.less';
|
37
|
-
@import './components\DateTimePicker\Base\style.less';
|
38
37
|
@import './components\DateTimePicker\BaseMobile\style.less';
|
39
|
-
@import './components\Drawer\CloseIcon\style.less';
|
40
38
|
@import './components\DateTimePicker\DisplayInput\style.less';
|
39
|
+
@import './components\DateTimePicker\Base\style.less';
|
40
|
+
@import './components\Drawer\CloseIcon\style.less';
|
41
41
|
@import './components\OptionList\InlineOptionList\style.less';
|
42
42
|
@import './components\OptionList\OptionItem\style.less';
|
43
43
|
@import './components\OptionList\PopoverOptionList\style.less';
|
44
|
-
@import './components\Table\ColumnTag\style.less';
|
45
44
|
@import './components\Steps\ControlButton\style.less';
|
45
|
+
@import './components\Table\ColumnTag\style.less';
|
46
|
+
@import './components\TagList\Tag\style.less';
|
46
47
|
@import './components\Timeline\TimelineItem\style.less';
|
47
48
|
@import './components\TagList\TagSwitch\style.less';
|
48
49
|
@import './components\Transfer\List\style.less';
|
49
|
-
@import './components\TagList\Tag\style.less';
|
50
50
|
@import './components\Transfer\ListBody\style.less';
|
51
51
|
@import './components\DateTimePicker\Collapse\Panel\style.less';
|
52
52
|
@import './components\DateTimePicker\BaseMobile\Absolute\style.less';
|
package/es/style/theme.less
CHANGED
@@ -13,6 +13,6 @@ var type_1 = require("../../../constants/language/modal/type");
|
|
13
13
|
exports.CloseIcon = function (props) {
|
14
14
|
var className = props.className, onClick = props.onClick;
|
15
15
|
return (react_1.default.createElement(antd_1.Tooltip, { title: language_1.formatString(type_1.ModalLocale.close_tooltip) },
|
16
|
-
react_1.default.createElement(pandora_component_icons_1.Close, { className: classnames_1.default(style_1.SDK_PREFIX + "-close-icon", className), onClick: onClick })));
|
16
|
+
react_1.default.createElement(pandora_component_icons_1.Close, { className: classnames_1.default(style_1.SDK_PREFIX + "-modal-close-icon", className), onClick: onClick })));
|
17
17
|
};
|
18
18
|
exports.default = exports.CloseIcon;
|
@@ -7,7 +7,7 @@ declare type getContainerFunc = () => HTMLElement;
|
|
7
7
|
export declare type IDrawerProps = Overwrite<DrawerProps, {
|
8
8
|
className?: string;
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* 是否显示关闭按钮,默认true
|
11
11
|
*/
|
12
12
|
closable?: boolean;
|
13
13
|
/**
|
@@ -67,7 +67,7 @@ export declare type IDrawerProps = Overwrite<DrawerProps, {
|
|
67
67
|
export declare class Drawer extends React.Component<React.PropsWithChildren<IDrawerProps>, any> {
|
68
68
|
drawerId: string;
|
69
69
|
isResizing: boolean;
|
70
|
-
realWidth:
|
70
|
+
realWidth: React.ReactText;
|
71
71
|
throttleMouseMove: import("lodash").DebouncedFunc<(e: any) => void>;
|
72
72
|
get closable(): boolean | undefined;
|
73
73
|
get extra(): {} | null | undefined;
|
@@ -77,7 +77,7 @@ export declare class Drawer extends React.Component<React.PropsWithChildren<IDra
|
|
77
77
|
onMouseUp(): void;
|
78
78
|
onMouseMove(e: any): void;
|
79
79
|
onMouseClick(e: MouseEvent): void;
|
80
|
-
initWidth(width?: string | number, size?: string):
|
80
|
+
initWidth(width?: string | number, size?: string): React.ReactText;
|
81
81
|
componentDidMount(): void;
|
82
82
|
UNSAFE_componentWillUpdate(nextProps: Readonly<React.PropsWithChildren<IDrawerProps>>): void;
|
83
83
|
componentWillUnmount(): void;
|
@@ -86,7 +86,7 @@ export declare class Drawer extends React.Component<React.PropsWithChildren<IDra
|
|
86
86
|
declare const _default: (props: {
|
87
87
|
className?: string | undefined;
|
88
88
|
/**
|
89
|
-
*
|
89
|
+
* 是否显示关闭按钮,默认true
|
90
90
|
*/
|
91
91
|
closable?: boolean | undefined;
|
92
92
|
/**
|
@@ -148,5 +148,6 @@ declare const _default: (props: {
|
|
148
148
|
bodyStyle?: React.CSSProperties | undefined;
|
149
149
|
children: React.ReactNode;
|
150
150
|
title?: React.ReactNode;
|
151
|
+
extra?: React.ReactNode;
|
151
152
|
}) => JSX.Element;
|
152
153
|
export default _default;
|
@@ -75,7 +75,7 @@ var Drawer = /** @class */ (function (_super) {
|
|
75
75
|
}
|
76
76
|
Object.defineProperty(Drawer.prototype, "closable", {
|
77
77
|
get: function () {
|
78
|
-
if (this.props.closable &&
|
78
|
+
if (this.props.closable !== false &&
|
79
79
|
this.props.closeIconPlacement &&
|
80
80
|
this.props.closeIconPlacement === 'right') {
|
81
81
|
return false;
|
@@ -88,7 +88,7 @@ var Drawer = /** @class */ (function (_super) {
|
|
88
88
|
Object.defineProperty(Drawer.prototype, "extra", {
|
89
89
|
get: function () {
|
90
90
|
var _a = this.props, closable = _a.closable, closeIconPlacement = _a.closeIconPlacement, onClose = _a.onClose;
|
91
|
-
if (closable && closeIconPlacement === 'right') {
|
91
|
+
if (closable !== false && closeIconPlacement === 'right') {
|
92
92
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
93
93
|
this.props.extra,
|
94
94
|
react_1.default.createElement(CloseIcon_1.default, { className: style_1.SDK_PREFIX + "-drawer-close-icon", onClick: onClose })));
|
@@ -152,11 +152,9 @@ var Drawer = /** @class */ (function (_super) {
|
|
152
152
|
}
|
153
153
|
if (size && size === 'small')
|
154
154
|
return SMALL_WIDTH;
|
155
|
-
if (size && size === 'default')
|
156
|
-
return DEFAULT_WIDTH;
|
157
155
|
if (size && size === 'large')
|
158
156
|
return LARGE_WIDTH;
|
159
|
-
return
|
157
|
+
return DEFAULT_WIDTH;
|
160
158
|
};
|
161
159
|
Drawer.prototype.componentDidMount = function () {
|
162
160
|
if (this.props.canDrag) {
|
@@ -184,7 +182,7 @@ var Drawer = /** @class */ (function (_super) {
|
|
184
182
|
_a[style_1.SDK_PREFIX + "-drawer-size-small"] = size === 'small',
|
185
183
|
_a[style_1.SDK_PREFIX + "-drawer-size-default"] = size === 'default',
|
186
184
|
_a[style_1.SDK_PREFIX + "-drawer-size-large"] = size === 'large',
|
187
|
-
_a)), width: this.realWidth ||
|
185
|
+
_a)), width: this.realWidth || 800, zIndex: 1200, visible: visible, closable: this.closable, extra: this.extra, closeIcon: react_1.default.createElement(CloseIcon_1.default, { className: style_1.SDK_PREFIX + "-drawer-close-icon", onClick: onClose }), onClose: onClose }, other),
|
188
186
|
canDrag && (react_1.default.createElement("div", { className: style_1.SDK_PREFIX + "-scroll-handler", onMouseDown: this.onMouseDown })),
|
189
187
|
children));
|
190
188
|
};
|
@@ -1561,9 +1561,6 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
1561
1561
|
.pandora-sdk-table-wrapper .ant-table-tbody > tr > td {
|
1562
1562
|
border-bottom: none;
|
1563
1563
|
}
|
1564
|
-
.pandora-sdk-table-wrapper .ant-table-tbody > tr > td.ant-table-column-sort {
|
1565
|
-
background: none;
|
1566
|
-
}
|
1567
1564
|
.pandora-sdk-table-wrapper .ant-table-tbody > tr > td.ant-table-selection-column {
|
1568
1565
|
padding-left: 20px;
|
1569
1566
|
width: 36px;
|
@@ -1572,10 +1569,18 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
1572
1569
|
.pandora-sdk-table-wrapper .pandora-sdk-odd-table-row + .ant-table-expanded-row {
|
1573
1570
|
background: #fafafa;
|
1574
1571
|
}
|
1572
|
+
.pandora-sdk-table-wrapper .pandora-sdk-odd-table-row td,
|
1573
|
+
.pandora-sdk-table-wrapper .pandora-sdk-odd-table-row + .ant-table-expanded-row td {
|
1574
|
+
background-color: inherit;
|
1575
|
+
}
|
1575
1576
|
.pandora-sdk-table-wrapper .pandora-sdk-even-table-row,
|
1576
1577
|
.pandora-sdk-table-wrapper .pandora-sdk-even-table-row + .ant-table-expanded-row {
|
1577
1578
|
background: #ffffff;
|
1578
1579
|
}
|
1580
|
+
.pandora-sdk-table-wrapper .pandora-sdk-even-table-row td,
|
1581
|
+
.pandora-sdk-table-wrapper .pandora-sdk-even-table-row + .ant-table-expanded-row td {
|
1582
|
+
background-color: inherit;
|
1583
|
+
}
|
1579
1584
|
.pandora-sdk-table-wrapper .ant-table-row:hover {
|
1580
1585
|
background: #f3f7fd;
|
1581
1586
|
}
|
@@ -128,9 +128,6 @@
|
|
128
128
|
border-bottom: none;
|
129
129
|
}
|
130
130
|
|
131
|
-
.@{ant-prefix}-table-tbody > tr > td.@{ant-prefix}-table-column-sort {
|
132
|
-
background: none;
|
133
|
-
}
|
134
131
|
.@{ant-prefix}-table-tbody > tr > td.@{ant-prefix}-table-selection-column {
|
135
132
|
padding-left: 20px;
|
136
133
|
width: 36px;
|
@@ -139,10 +136,16 @@
|
|
139
136
|
.@{sdk-prefix}-odd-table-row,
|
140
137
|
.@{sdk-prefix}-odd-table-row + .@{ant-prefix}-table-expanded-row {
|
141
138
|
background: @table-row-even-bg;
|
139
|
+
td {
|
140
|
+
background-color: inherit;
|
141
|
+
}
|
142
142
|
}
|
143
143
|
.@{sdk-prefix}-even-table-row,
|
144
144
|
.@{sdk-prefix}-even-table-row + .@{ant-prefix}-table-expanded-row {
|
145
145
|
background: @table-row-odd-bg;
|
146
|
+
td {
|
147
|
+
background-color: inherit;
|
148
|
+
}
|
146
149
|
}
|
147
150
|
|
148
151
|
.@{ant-prefix}-table-row {
|
@@ -36,15 +36,20 @@ function modalPopupContainerWrapper(Comp) {
|
|
36
36
|
return function (props) {
|
37
37
|
var containerRef = react_1.useRef(null);
|
38
38
|
var titleRef = react_1.useRef(null);
|
39
|
-
var
|
39
|
+
var extraRef = react_1.useRef(null);
|
40
|
+
var _a = props.bodyStyle, bodyStyle = _a === void 0 ? {} : _a, children = props.children, title = props.title, extra = props.extra, rest = __rest(props, ["bodyStyle", "children", "title", "extra"]);
|
40
41
|
var childrenGetPopupContainer = react_1.useCallback(function () {
|
41
42
|
return (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) || document.body;
|
42
43
|
}, []);
|
43
44
|
var titleGetPopupContainer = react_1.useCallback(function () {
|
44
|
-
return (
|
45
|
+
return (titleRef === null || titleRef === void 0 ? void 0 : titleRef.current) || document.body;
|
46
|
+
}, []);
|
47
|
+
var extraGetPopupContainer = react_1.useCallback(function () {
|
48
|
+
return (extraRef === null || extraRef === void 0 ? void 0 : extraRef.current) || document.body;
|
45
49
|
}, []);
|
46
50
|
return (react_1.default.createElement(Comp, __assign({}, rest, { title: title ? (react_1.default.createElement("div", { ref: titleRef },
|
47
|
-
react_1.default.createElement(config_provider_1.ConfigConsumer, null, function (config) { return (react_1.default.createElement(config_provider_1.default, __assign({}, config, { getPopupContainer: titleGetPopupContainer }), title)); }))) : undefined }
|
51
|
+
react_1.default.createElement(config_provider_1.ConfigConsumer, null, function (config) { return (react_1.default.createElement(config_provider_1.default, __assign({}, config, { getPopupContainer: titleGetPopupContainer }), title)); }))) : undefined, extra: extra ? (react_1.default.createElement("div", { ref: extraRef },
|
52
|
+
react_1.default.createElement(config_provider_1.ConfigConsumer, null, function (config) { return (react_1.default.createElement(config_provider_1.default, __assign({}, config, { getPopupContainer: extraGetPopupContainer }), extra)); }))) : undefined }),
|
48
53
|
react_1.default.createElement("div", { className: style_1.SDK_PREFIX + "-drawer-container", ref: containerRef, style: bodyStyle },
|
49
54
|
react_1.default.createElement(config_provider_1.ConfigConsumer, null, function (config) { return (react_1.default.createElement(config_provider_1.default, __assign({}, config, { getPopupContainer: childrenGetPopupContainer }), children)); }))));
|
50
55
|
};
|