revdev-components 0.157.0 → 0.159.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.
@@ -7,6 +7,7 @@ interface BaseHeaderActionProps {
7
7
  }
8
8
  interface ClickHeaderActionProps extends BaseHeaderActionProps {
9
9
  onClick: () => void;
10
+ confirmText?: string;
10
11
  }
11
12
  interface LinkHeaderActionProps extends BaseHeaderActionProps {
12
13
  href: string;
package/build/index.js CHANGED
@@ -5416,11 +5416,12 @@ var HeaderActionPanel = function (_a) {
5416
5416
  return React.createElement(React.Fragment, { key: i }, content === null || content === void 0 ? void 0 : content.content);
5417
5417
  }
5418
5418
  else if (button === null || button === void 0 ? void 0 : button.onClick) {
5419
- var icon = button.icon, label = button.label, tooltip = button.tooltip;
5420
- return (React.createElement(IconDivision, { key: i, icon: icon, onClick: button === null || button === void 0 ? void 0 : button.onClick, tooltip: tooltip, className: s$4.button }, label));
5419
+ var icon = button.icon, label = button.label, tooltip = button.tooltip, confirmText = button.confirmText;
5420
+ return confirmText ? (React.createElement(antd.Popconfirm, { key: i, title: confirmText, onConfirm: button.onClick, okText: "Yes", cancelText: "No" },
5421
+ React.createElement(IconDivision, { icon: icon, tooltip: tooltip, className: s$4.button }, label))) : (React.createElement(IconDivision, { key: i, icon: icon, onClick: button === null || button === void 0 ? void 0 : button.onClick, tooltip: tooltip, className: s$4.button }, label));
5421
5422
  }
5422
5423
  else if (link === null || link === void 0 ? void 0 : link.href) {
5423
- var icon = button.icon, label = button.label, tooltip = button.tooltip;
5424
+ var icon = link.icon, label = link.label, tooltip = link.tooltip;
5424
5425
  return (React.createElement(AppLink, { key: i, href: link.href, className: s$4.link },
5425
5426
  React.createElement(IconDivision, { icon: icon, tooltip: tooltip }, label)));
5426
5427
  }
@@ -5431,6 +5432,7 @@ var s$3 = {"root":"index-module_root__AUcgm","separator":"index-module_separator
5431
5432
 
5432
5433
  var TextUtil = {
5433
5434
  maxTextEllipsis: function (text, maxLength) {
5435
+ if (text === void 0) { text = ""; }
5434
5436
  if (text.length <= maxLength) {
5435
5437
  return text;
5436
5438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.157.0",
3
+ "version": "0.159.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {