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
@@ -217,7 +217,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
217
217
|
right: 0
|
218
218
|
} },
|
219
219
|
React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
|
220
|
-
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: {
|
220
|
+
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: {
|
221
221
|
width: '100%',
|
222
222
|
height,
|
223
223
|
objectFit: 'contain'
|
@@ -229,7 +229,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
229
229
|
height,
|
230
230
|
overflow: 'hidden'
|
231
231
|
} },
|
232
|
-
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 }),
|
232
|
+
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 }),
|
233
233
|
renderPoster,
|
234
234
|
React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
|
235
235
|
};
|
@@ -45,13 +45,14 @@ const Popup = () => {
|
|
45
45
|
const renderPopupDetail = useMemo(() => {
|
46
46
|
var _a, _b, _c;
|
47
47
|
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) => {
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
49
49
|
if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
|
50
50
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
51
51
|
const Component = withBindDataSource(t);
|
52
52
|
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';
|
53
|
-
const
|
54
|
-
|
53
|
+
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';
|
54
|
+
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
55
|
+
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 })));
|
55
56
|
}
|
56
57
|
else {
|
57
58
|
return React.createElement(React.Fragment, null);
|
@@ -7,7 +7,7 @@ import { useSxpDataSource } from '../../../../core/hooks';
|
|
7
7
|
import './index.less';
|
8
8
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
9
9
|
const AppointForm = (_a) => {
|
10
|
-
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"]);
|
10
|
+
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"]);
|
11
11
|
const { submitForm, popupDetailData } = useSxpDataSource();
|
12
12
|
const { jumpToWeb } = useEventReport();
|
13
13
|
const formRef = useRef();
|
@@ -72,7 +72,9 @@ const AppointForm = (_a) => {
|
|
72
72
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
73
73
|
jumpToWeb(data, product, cta, position);
|
74
74
|
}
|
75
|
-
|
75
|
+
if (!isPopup) {
|
76
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
77
|
+
}
|
76
78
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
77
79
|
}
|
78
80
|
}), 1000);
|
@@ -5,10 +5,12 @@ import success from './success.png';
|
|
5
5
|
import { getMediaValueByMode } from '../../../../core/utils/materials';
|
6
6
|
import './index.less';
|
7
7
|
const Prompt = (_a) => {
|
8
|
-
var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
|
8
|
+
var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
|
9
9
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
10
10
|
const handleOk = () => {
|
11
|
-
|
11
|
+
if (!isPopup) {
|
12
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
13
|
+
}
|
12
14
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
13
15
|
};
|
14
16
|
return (React.createElement("div", Object.assign({ className: `pb-prompt ${css(Object.assign({}, style))}` }, props),
|
@@ -220,7 +220,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
220
220
|
right: 0
|
221
221
|
} },
|
222
222
|
react_1.default.createElement("div", { style: { position: 'relative', width, height: '100%' } },
|
223
|
-
react_1.default.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: {
|
223
|
+
react_1.default.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: {
|
224
224
|
width: '100%',
|
225
225
|
height,
|
226
226
|
objectFit: 'contain'
|
@@ -232,7 +232,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
232
232
|
height,
|
233
233
|
overflow: 'hidden'
|
234
234
|
} },
|
235
|
-
react_1.default.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 }),
|
235
|
+
react_1.default.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 }),
|
236
236
|
renderPoster,
|
237
237
|
react_1.default.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
|
238
238
|
};
|
@@ -48,13 +48,14 @@ const Popup = () => {
|
|
48
48
|
const renderPopupDetail = (0, react_1.useMemo)(() => {
|
49
49
|
var _a, _b, _c;
|
50
50
|
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) => {
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
52
52
|
if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
|
53
53
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
54
54
|
const Component = (0, withBindDataSource_1.default)(t);
|
55
55
|
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';
|
56
|
-
const
|
57
|
-
|
56
|
+
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';
|
57
|
+
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
58
|
+
return (react_1.default.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 })));
|
58
59
|
}
|
59
60
|
else {
|
60
61
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
@@ -9,7 +9,7 @@ const hooks_1 = require("../../../../core/hooks");
|
|
9
9
|
require("./index.less");
|
10
10
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
11
11
|
const AppointForm = (_a) => {
|
12
|
-
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, onClick, onClose } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "onClick", "onClose"]);
|
12
|
+
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
|
13
13
|
const { submitForm, popupDetailData } = (0, hooks_1.useSxpDataSource)();
|
14
14
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
15
15
|
const formRef = (0, react_1.useRef)();
|
@@ -74,7 +74,9 @@ const AppointForm = (_a) => {
|
|
74
74
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
75
75
|
jumpToWeb(data, product, cta, position);
|
76
76
|
}
|
77
|
-
|
77
|
+
if (!isPopup) {
|
78
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
79
|
+
}
|
78
80
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
79
81
|
}
|
80
82
|
}), 1000);
|
@@ -7,10 +7,12 @@ const success_png_1 = tslib_1.__importDefault(require("./success.png"));
|
|
7
7
|
const materials_1 = require("../../../../core/utils/materials");
|
8
8
|
require("./index.less");
|
9
9
|
const Prompt = (_a) => {
|
10
|
-
var { content, btnText, style, icon, onClick } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
|
10
|
+
var { content, btnText, style, icon, isPopup, onClose, onClick } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "onClose", "onClick"]);
|
11
11
|
const iconSrc = typeof icon === 'string' ? icon : (0, materials_1.getMediaValueByMode)(icon);
|
12
12
|
const handleOk = () => {
|
13
|
-
|
13
|
+
if (!isPopup) {
|
14
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
15
|
+
}
|
14
16
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
15
17
|
};
|
16
18
|
return (react_1.default.createElement("div", Object.assign({ className: `pb-prompt ${(0, css_1.css)(Object.assign({}, style))}` }, props),
|