pb-sxp-ui 1.0.57 → 1.0.59

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
@@ -1129,7 +1129,7 @@ function useEventReport() {
1129
1129
  }
1130
1130
 
1131
1131
  const AppointForm$1 = (_a) => {
1132
- var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "onClick", "onClose"]);
1132
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
1133
1133
  const { submitForm, popupDetailData } = useSxpDataSource();
1134
1134
  const { jumpToWeb } = useEventReport();
1135
1135
  const formRef = React.useRef();
@@ -1194,7 +1194,9 @@ const AppointForm$1 = (_a) => {
1194
1194
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
1195
1195
  jumpToWeb(data, product, cta, position);
1196
1196
  }
1197
- onClose === null || onClose === void 0 ? void 0 : onClose();
1197
+ if (!isPopup) {
1198
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1199
+ }
1198
1200
  onClick === null || onClick === void 0 ? void 0 : onClick();
1199
1201
  }
1200
1202
  }), 1000);
@@ -8631,10 +8633,12 @@ const getMediaValueByMode = (obj) => {
8631
8633
  };
8632
8634
 
8633
8635
  const Prompt$1 = (_a) => {
8634
- var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
8636
+ var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
8635
8637
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8636
8638
  const handleOk = () => {
8637
- window === null || window === void 0 ? void 0 : window.sxpPopup('');
8639
+ if (!isPopup) {
8640
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8641
+ }
8638
8642
  onClick === null || onClick === void 0 ? void 0 : onClick();
8639
8643
  };
8640
8644
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css.css(Object.assign({}, style))}` }, props),
@@ -13438,7 +13442,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13438
13442
  right: 0
13439
13443
  } },
13440
13444
  React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
13441
- React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
13445
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, autoPlay: true, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
13442
13446
  width: '100%',
13443
13447
  height,
13444
13448
  objectFit: 'contain'
@@ -13450,7 +13454,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13450
13454
  height,
13451
13455
  overflow: 'hidden'
13452
13456
  } },
13453
- React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
13457
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', style: { width: '100%' }, ref: videoRef, crossOrigin: 'anonymous', muted: true, autoPlay: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
13454
13458
  renderPoster,
13455
13459
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13456
13460
  };
@@ -13580,7 +13584,7 @@ var index$1 = React.memo(DiyPortalPreview);
13580
13584
  * @Author: binruan@chatlabs.com
13581
13585
  * @Date: 2023-10-31 10:56:01
13582
13586
  * @LastEditors: binruan@chatlabs.com
13583
- * @LastEditTime: 2024-05-13 15:19:20
13587
+ * @LastEditTime: 2024-05-14 10:12:52
13584
13588
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
13585
13589
  *
13586
13590
  */
@@ -13626,13 +13630,14 @@ const Popup = () => {
13626
13630
  const renderPopupDetail = React.useMemo(() => {
13627
13631
  var _a, _b, _c;
13628
13632
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
13629
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13633
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
13630
13634
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
13631
13635
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13632
13636
  const Component = withBindDataSource(t);
13633
13637
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
13634
- const defaulSetting = (_e = t === null || t === void 0 ? void 0 : t.extend) === null || _e === void 0 ? void 0 : _e.defaulSetting;
13635
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.textStyle), bindDatas: (_j = (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.bindDatas) !== null && _j !== void 0 ? _j : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.props, { event: ((_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, onClose: handleClose })));
13638
+ const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
13639
+ const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
13640
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
13636
13641
  }
13637
13642
  else {
13638
13643
  return React.createElement(React.Fragment, null);