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/pb-ui.js CHANGED
@@ -1120,7 +1120,7 @@
1120
1120
  }
1121
1121
 
1122
1122
  const AppointForm$1 = (_a) => {
1123
- 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"]);
1123
+ 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"]);
1124
1124
  const { submitForm, popupDetailData } = useSxpDataSource();
1125
1125
  const { jumpToWeb } = useEventReport();
1126
1126
  const formRef = React.useRef();
@@ -1185,7 +1185,9 @@
1185
1185
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
1186
1186
  jumpToWeb(data, product, cta, position);
1187
1187
  }
1188
- onClose === null || onClose === void 0 ? void 0 : onClose();
1188
+ if (!isPopup) {
1189
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1190
+ }
1189
1191
  onClick === null || onClick === void 0 ? void 0 : onClick();
1190
1192
  }
1191
1193
  }), 1000);
@@ -8622,10 +8624,12 @@
8622
8624
  };
8623
8625
 
8624
8626
  const Prompt$1 = (_a) => {
8625
- var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
8627
+ var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
8626
8628
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8627
8629
  const handleOk = () => {
8628
- window === null || window === void 0 ? void 0 : window.sxpPopup('');
8630
+ if (!isPopup) {
8631
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8632
+ }
8629
8633
  onClick === null || onClick === void 0 ? void 0 : onClick();
8630
8634
  };
8631
8635
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css.css(Object.assign({}, style))}` }, props),
@@ -13429,7 +13433,7 @@ Made in Italy` })));
13429
13433
  right: 0
13430
13434
  } },
13431
13435
  React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
13432
- 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: {
13436
+ 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: {
13433
13437
  width: '100%',
13434
13438
  height,
13435
13439
  objectFit: 'contain'
@@ -13441,7 +13445,7 @@ Made in Italy` })));
13441
13445
  height,
13442
13446
  overflow: 'hidden'
13443
13447
  } },
13444
- 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 }),
13448
+ 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 }),
13445
13449
  renderPoster,
13446
13450
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13447
13451
  };
@@ -13571,7 +13575,7 @@ Made in Italy` })));
13571
13575
  * @Author: binruan@chatlabs.com
13572
13576
  * @Date: 2023-10-31 10:56:01
13573
13577
  * @LastEditors: binruan@chatlabs.com
13574
- * @LastEditTime: 2024-05-13 15:19:20
13578
+ * @LastEditTime: 2024-05-14 10:12:52
13575
13579
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
13576
13580
  *
13577
13581
  */
@@ -13617,13 +13621,14 @@ Made in Italy` })));
13617
13621
  const renderPopupDetail = React.useMemo(() => {
13618
13622
  var _a, _b, _c;
13619
13623
  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) => {
13620
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13624
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
13621
13625
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
13622
13626
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13623
13627
  const Component = withBindDataSource(t);
13624
13628
  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';
13625
- const defaulSetting = (_e = t === null || t === void 0 ? void 0 : t.extend) === null || _e === void 0 ? void 0 : _e.defaulSetting;
13626
- 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 })));
13629
+ 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';
13630
+ const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
13631
+ 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 })));
13627
13632
  }
13628
13633
  else {
13629
13634
  return React.createElement(React.Fragment, null);