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.cjs CHANGED
@@ -8633,9 +8633,19 @@ const getMediaValueByMode = (obj) => {
8633
8633
  };
8634
8634
 
8635
8635
  const Prompt$1 = (_a) => {
8636
- var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
8636
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
8637
+ const { popupDetailData } = useSxpDataSource();
8638
+ const { jumpToWeb } = useEventReport();
8637
8639
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8638
8640
  const handleOk = () => {
8641
+ var _a, _b, _c;
8642
+ if (isExternalLink) {
8643
+ const data = popupDetailData;
8644
+ const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
8645
+ 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;
8646
+ const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8647
+ jumpToWeb(data, product, cta, position);
8648
+ }
8639
8649
  if (!isPopup) {
8640
8650
  onClose === null || onClose === void 0 ? void 0 : onClose();
8641
8651
  }