revdev-components 0.158.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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.158.0",
3
+ "version": "0.159.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {