@qn-pandora/pandora-component 4.0.14 → 4.1.0

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/es/index.less CHANGED
@@ -1,52 +1,52 @@
1
1
  @import './style\mixin.less';
2
2
  @import './style\theme.less';
3
3
  @import './components\AutoComplete\style.less';
4
- @import './components\Breadcrumb\style.less';
5
4
  @import './components\Button\style.less';
6
5
  @import './components\Card\style.less';
6
+ @import './components\Breadcrumb\style.less';
7
7
  @import './components\Checkbox\style.less';
8
8
  @import './components\CheckboxList\style.less';
9
9
  @import './components\CheckTransformList\style.less';
10
10
  @import './components\Collapse\style.less';
11
11
  @import './components\CollapsiblePanel\style.less';
12
- @import './components\DateTimePicker\style.less';
13
- @import './components\Descriptions\style.less';
14
12
  @import './components\Drawer\style.less';
15
- @import './components\Input\style.less';
13
+ @import './components\Descriptions\style.less';
14
+ @import './components\DateTimePicker\style.less';
16
15
  @import './components\FileResumable\style.less';
16
+ @import './components\Input\style.less';
17
17
  @import './components\KeyValuePair\style.less';
18
- @import './components\Menu\style.less';
19
18
  @import './components\Modal\style.less';
19
+ @import './components\Menu\style.less';
20
20
  @import './components\NameExplainTooltip\style.less';
21
21
  @import './components\NameLimiter\style.less';
22
- @import './components\OptionList\style.less';
23
22
  @import './components\RadioGroup\style.less';
24
23
  @import './components\RangeInput\style.less';
25
- @import './components\Selector\style.less';
24
+ @import './components\OptionList\style.less';
26
25
  @import './components\RemarkName\style.less';
26
+ @import './components\Selector\style.less';
27
27
  @import './components\Spin\style.less';
28
+ @import './components\Steps\style.less';
28
29
  @import './components\Table\style.less';
30
+ @import './components\Timeline\style.less';
29
31
  @import './components\Tabs\style.less';
30
- @import './components\Steps\style.less';
31
32
  @import './components\TagList\style.less';
32
- @import './components\Timeline\style.less';
33
- @import './components\Transfer\style.less';
34
33
  @import './components\TreeSelector\style.less';
34
+ @import './components\Transfer\style.less';
35
35
  @import './components\Card\RowExtra\style.less';
36
36
  @import './components\Card\SearchInput\style.less';
37
+ @import './components\Drawer\CloseIcon\style.less';
37
38
  @import './components\DateTimePicker\Base\style.less';
38
39
  @import './components\DateTimePicker\BaseMobile\style.less';
39
- @import './components\Drawer\CloseIcon\style.less';
40
40
  @import './components\DateTimePicker\DisplayInput\style.less';
41
41
  @import './components\OptionList\InlineOptionList\style.less';
42
- @import './components\OptionList\OptionItem\style.less';
43
42
  @import './components\OptionList\PopoverOptionList\style.less';
43
+ @import './components\OptionList\OptionItem\style.less';
44
44
  @import './components\Table\ColumnTag\style.less';
45
45
  @import './components\Steps\ControlButton\style.less';
46
46
  @import './components\Timeline\TimelineItem\style.less';
47
47
  @import './components\TagList\TagSwitch\style.less';
48
- @import './components\Transfer\List\style.less';
49
48
  @import './components\TagList\Tag\style.less';
49
+ @import './components\Transfer\List\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';
@@ -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;
@@ -4,9 +4,9 @@
4
4
  .ant-btn-sm {
5
5
  padding: 0 7px;
6
6
  }
7
- .pandora-sdk-close-icon {
7
+ .pandora-sdk-modal-close-icon {
8
8
  font-size: 20px;
9
9
  }
10
- .pandora-sdk-close-icon:hover {
10
+ .pandora-sdk-modal-close-icon:hover {
11
11
  background: #f4f5f6;
12
12
  }
@@ -1,6 +1,6 @@
1
1
  @import '../../../style/theme.less';
2
2
 
3
- .@{sdk-prefix}-close-icon {
3
+ .@{sdk-prefix}-modal-close-icon {
4
4
  font-size: 20px;
5
5
  &:hover {
6
6
  background: @close-icon-hover-color;
@@ -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: string | number | undefined;
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): string | number | undefined;
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 undefined;
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 || 'auto', 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),
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
  };
@@ -1572,10 +1572,18 @@ textarea.ant-pagination-options-quick-jumper input {
1572
1572
  .pandora-sdk-table-wrapper .pandora-sdk-odd-table-row + .ant-table-expanded-row {
1573
1573
  background: #fafafa;
1574
1574
  }
1575
+ .pandora-sdk-table-wrapper .pandora-sdk-odd-table-row td,
1576
+ .pandora-sdk-table-wrapper .pandora-sdk-odd-table-row + .ant-table-expanded-row td {
1577
+ background-color: inherit;
1578
+ }
1575
1579
  .pandora-sdk-table-wrapper .pandora-sdk-even-table-row,
1576
1580
  .pandora-sdk-table-wrapper .pandora-sdk-even-table-row + .ant-table-expanded-row {
1577
1581
  background: #ffffff;
1578
1582
  }
1583
+ .pandora-sdk-table-wrapper .pandora-sdk-even-table-row td,
1584
+ .pandora-sdk-table-wrapper .pandora-sdk-even-table-row + .ant-table-expanded-row td {
1585
+ background-color: inherit;
1586
+ }
1579
1587
  .pandora-sdk-table-wrapper .ant-table-row:hover {
1580
1588
  background: #f3f7fd;
1581
1589
  }
@@ -139,10 +139,16 @@
139
139
  .@{sdk-prefix}-odd-table-row,
140
140
  .@{sdk-prefix}-odd-table-row + .@{ant-prefix}-table-expanded-row {
141
141
  background: @table-row-even-bg;
142
+ td {
143
+ background-color: inherit;
144
+ }
142
145
  }
143
146
  .@{sdk-prefix}-even-table-row,
144
147
  .@{sdk-prefix}-even-table-row + .@{ant-prefix}-table-expanded-row {
145
148
  background: @table-row-odd-bg;
149
+ td {
150
+ background-color: inherit;
151
+ }
146
152
  }
147
153
 
148
154
  .@{ant-prefix}-table-row {
@@ -3,4 +3,5 @@ export default function modalPopupContainerWrapper<T>(Comp: React.ComponentType<
3
3
  bodyStyle?: React.CSSProperties | undefined;
4
4
  children: React.ReactNode;
5
5
  title?: React.ReactNode;
6
+ extra?: React.ReactNode;
6
7
  }) => JSX.Element;
@@ -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 _a = props.bodyStyle, bodyStyle = _a === void 0 ? {} : _a, children = props.children, title = props.title, rest = __rest(props, ["bodyStyle", "children", "title"]);
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 (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) || document.body;
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
  };