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/index.js CHANGED
@@ -8610,9 +8610,19 @@ const getMediaValueByMode = (obj) => {
8610
8610
  };
8611
8611
 
8612
8612
  const Prompt$1 = (_a) => {
8613
- var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
8613
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
8614
+ const { popupDetailData } = useSxpDataSource();
8615
+ const { jumpToWeb } = useEventReport();
8614
8616
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8615
8617
  const handleOk = () => {
8618
+ var _a, _b, _c;
8619
+ if (isExternalLink) {
8620
+ const data = popupDetailData;
8621
+ const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
8622
+ 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;
8623
+ const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8624
+ jumpToWeb(data, product, cta, position);
8625
+ }
8616
8626
  if (!isPopup) {
8617
8627
  onClose === null || onClose === void 0 ? void 0 : onClose();
8618
8628
  }