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 +15 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +15 -10
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyPortalPreview/VideoWidget.js +2 -2
- package/es/core/components/SxpPageRender/Popup/index.js +4 -3
- package/es/materials/sxp/popup/AppointForm/index.d.ts +1 -0
- package/es/materials/sxp/popup/AppointForm/index.js +4 -2
- package/es/materials/sxp/popup/Prompt/index.d.ts +2 -0
- package/es/materials/sxp/popup/Prompt/index.js +4 -2
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +2 -2
- package/lib/core/components/SxpPageRender/Popup/index.js +4 -3
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +1 -0
- package/lib/materials/sxp/popup/AppointForm/index.js +4 -2
- package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -0
- package/lib/materials/sxp/popup/Prompt/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1106,7 +1106,7 @@ function useEventReport() {
|
|
1106
1106
|
}
|
1107
1107
|
|
1108
1108
|
const AppointForm$1 = (_a) => {
|
1109
|
-
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"]);
|
1109
|
+
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"]);
|
1110
1110
|
const { submitForm, popupDetailData } = useSxpDataSource();
|
1111
1111
|
const { jumpToWeb } = useEventReport();
|
1112
1112
|
const formRef = useRef();
|
@@ -1171,7 +1171,9 @@ const AppointForm$1 = (_a) => {
|
|
1171
1171
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
1172
1172
|
jumpToWeb(data, product, cta, position);
|
1173
1173
|
}
|
1174
|
-
|
1174
|
+
if (!isPopup) {
|
1175
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
1176
|
+
}
|
1175
1177
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
1176
1178
|
}
|
1177
1179
|
}), 1000);
|
@@ -8608,10 +8610,12 @@ const getMediaValueByMode = (obj) => {
|
|
8608
8610
|
};
|
8609
8611
|
|
8610
8612
|
const Prompt$1 = (_a) => {
|
8611
|
-
var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
|
8613
|
+
var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
|
8612
8614
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
8613
8615
|
const handleOk = () => {
|
8614
|
-
|
8616
|
+
if (!isPopup) {
|
8617
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
8618
|
+
}
|
8615
8619
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
8616
8620
|
};
|
8617
8621
|
return (React.createElement("div", Object.assign({ className: `pb-prompt ${css(Object.assign({}, style))}` }, props),
|
@@ -13415,7 +13419,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
13415
13419
|
right: 0
|
13416
13420
|
} },
|
13417
13421
|
React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
|
13418
|
-
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: {
|
13422
|
+
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: {
|
13419
13423
|
width: '100%',
|
13420
13424
|
height,
|
13421
13425
|
objectFit: 'contain'
|
@@ -13427,7 +13431,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
13427
13431
|
height,
|
13428
13432
|
overflow: 'hidden'
|
13429
13433
|
} },
|
13430
|
-
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 }),
|
13434
|
+
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 }),
|
13431
13435
|
renderPoster,
|
13432
13436
|
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
|
13433
13437
|
};
|
@@ -13557,7 +13561,7 @@ var index$1 = memo(DiyPortalPreview);
|
|
13557
13561
|
* @Author: binruan@chatlabs.com
|
13558
13562
|
* @Date: 2023-10-31 10:56:01
|
13559
13563
|
* @LastEditors: binruan@chatlabs.com
|
13560
|
-
* @LastEditTime: 2024-05-
|
13564
|
+
* @LastEditTime: 2024-05-14 10:12:52
|
13561
13565
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
13562
13566
|
*
|
13563
13567
|
*/
|
@@ -13603,13 +13607,14 @@ const Popup = () => {
|
|
13603
13607
|
const renderPopupDetail = useMemo(() => {
|
13604
13608
|
var _a, _b, _c;
|
13605
13609
|
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) => {
|
13606
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
13610
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
13607
13611
|
if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
|
13608
13612
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
13609
13613
|
const Component = withBindDataSource(t);
|
13610
13614
|
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';
|
13611
|
-
const
|
13612
|
-
|
13615
|
+
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';
|
13616
|
+
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
13617
|
+
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 })));
|
13613
13618
|
}
|
13614
13619
|
else {
|
13615
13620
|
return React.createElement(React.Fragment, null);
|