pb-sxp-ui 1.0.59 → 1.0.60

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/dist/pb-ui.js CHANGED
@@ -8624,9 +8624,19 @@
8624
8624
  };
8625
8625
 
8626
8626
  const Prompt$1 = (_a) => {
8627
- var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
8627
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
8628
+ const { popupDetailData } = useSxpDataSource();
8629
+ const { jumpToWeb } = useEventReport();
8628
8630
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8629
8631
  const handleOk = () => {
8632
+ var _a, _b, _c;
8633
+ if (isExternalLink) {
8634
+ const data = popupDetailData;
8635
+ const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
8636
+ const cta = (_c = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.bindCta;
8637
+ const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8638
+ jumpToWeb(data, product, cta, position);
8639
+ }
8630
8640
  if (!isPopup) {
8631
8641
  onClose === null || onClose === void 0 ? void 0 : onClose();
8632
8642
  }