pb-sxp-ui 1.0.69 → 1.0.70
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 +250 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -2
- package/dist/index.js +250 -130
- 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 +253 -133
- 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 +3 -2
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
- package/es/core/components/SxpPageRender/FormatImage.js +1 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +5 -0
- package/es/core/components/SxpPageRender/index.js +14 -20
- package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/es/materials/sxp/defaultSetting.d.ts +1 -4
- package/es/materials/sxp/defaultSetting.js +4 -5
- package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
- package/es/materials/sxp/popup/AppointForm/index.js +3 -8
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
- package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
- package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
- package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
- package/es/materials/sxp/popup/Prompt/index.js +2 -2
- package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
- package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
- package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/index.js +8 -2
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +8 -2
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +8 -2
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +4 -2
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +4 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -2
- package/es/materials/sxp/template/components/Img.d.ts +2 -1
- package/es/materials/sxp/template/components/Img.js +2 -2
- package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
- package/es/materials/sxp/template/components/settingRender.js +8 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
- package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +5 -0
- package/lib/core/components/SxpPageRender/index.js +14 -20
- package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/materials/sxp/defaultSetting.d.ts +1 -4
- package/lib/materials/sxp/defaultSetting.js +4 -5
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
- package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
- package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
- package/lib/materials/sxp/popup/Prompt/index.js +2 -2
- package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
- package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
- package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/index.js +8 -2
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +8 -2
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +8 -2
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +4 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +4 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -2
- package/lib/materials/sxp/template/components/Img.d.ts +2 -1
- package/lib/materials/sxp/template/components/Img.js +2 -2
- package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
- package/lib/materials/sxp/template/components/settingRender.js +8 -0
- package/package.json +2 -3
@@ -7,7 +7,7 @@ import './index.less';
|
|
7
7
|
import { useSxpDataSource } from '../../../../core/hooks';
|
8
8
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
9
9
|
const Prompt = (_a) => {
|
10
|
-
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
|
10
|
+
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
|
11
11
|
const { popupDetailData } = useSxpDataSource();
|
12
12
|
const { jumpToWeb } = useEventReport();
|
13
13
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
@@ -29,6 +29,6 @@ const Prompt = (_a) => {
|
|
29
29
|
React.createElement("div", { className: 'pb-prompt-icon' },
|
30
30
|
React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success })),
|
31
31
|
React.createElement("div", { className: 'pb-prompt-content' }, content),
|
32
|
-
React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
|
32
|
+
React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
|
33
33
|
};
|
34
34
|
export default memo(Prompt);
|
@@ -1,12 +1,47 @@
|
|
1
|
-
declare const _default:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
declare const _default: {
|
2
|
+
title: string;
|
3
|
+
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
name: string[];
|
7
|
+
mediaType: string;
|
8
|
+
child?: undefined;
|
9
|
+
} | {
|
10
|
+
type: string;
|
11
|
+
label: string;
|
12
|
+
name: string[];
|
13
|
+
mediaType?: undefined;
|
14
|
+
child?: undefined;
|
15
|
+
} | {
|
16
|
+
type: string;
|
17
|
+
label: string;
|
18
|
+
child: ({
|
19
|
+
type: string;
|
20
|
+
name: string[];
|
21
|
+
initialValue: string;
|
22
|
+
options?: undefined;
|
23
|
+
addonAfter?: undefined;
|
24
|
+
} | {
|
25
|
+
type: string;
|
26
|
+
name: string[];
|
27
|
+
options: any[];
|
28
|
+
initialValue: any;
|
29
|
+
addonAfter?: undefined;
|
30
|
+
} | {
|
31
|
+
type: string;
|
32
|
+
name: string[];
|
33
|
+
addonAfter: string;
|
34
|
+
initialValue: number;
|
35
|
+
options?: undefined;
|
36
|
+
})[];
|
37
|
+
name?: undefined;
|
38
|
+
mediaType?: undefined;
|
39
|
+
} | {
|
40
|
+
type: string;
|
41
|
+
name: string[];
|
42
|
+
label?: undefined;
|
43
|
+
mediaType?: undefined;
|
44
|
+
child?: undefined;
|
45
|
+
})[];
|
46
|
+
}[];
|
12
47
|
export default _default;
|
@@ -1,18 +1,61 @@
|
|
1
|
+
var _a, _b;
|
2
|
+
import defaultSetting from '../../defaultSetting';
|
1
3
|
export default [
|
2
4
|
{
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
title: '',
|
6
|
+
child: [
|
7
|
+
{
|
8
|
+
type: 'Media',
|
9
|
+
label: '图标',
|
10
|
+
name: ['props', 'icon'],
|
11
|
+
mediaType: 'Image'
|
12
|
+
},
|
13
|
+
{
|
14
|
+
type: 'TextArea',
|
15
|
+
label: '内容',
|
16
|
+
name: ['props', 'content']
|
17
|
+
},
|
18
|
+
{
|
19
|
+
type: 'Text',
|
20
|
+
label: '按钮文案',
|
21
|
+
name: ['props', 'btnText']
|
22
|
+
},
|
23
|
+
{
|
24
|
+
type: 'Group',
|
25
|
+
label: '提交按钮字体',
|
26
|
+
child: [
|
27
|
+
{
|
28
|
+
type: 'Color',
|
29
|
+
name: ['props', 'submitButtonStyle', 'color'],
|
30
|
+
initialValue: '#fff'
|
31
|
+
},
|
32
|
+
{
|
33
|
+
type: 'Select',
|
34
|
+
name: ['props', 'submitButtonStyle', 'fontFamily'],
|
35
|
+
options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
|
36
|
+
initialValue: (_b = (_a = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value
|
37
|
+
},
|
38
|
+
{
|
39
|
+
type: 'Number',
|
40
|
+
name: ['props', 'submitButtonStyle', 'fontSize'],
|
41
|
+
addonAfter: 'px',
|
42
|
+
initialValue: 12
|
43
|
+
}
|
44
|
+
]
|
45
|
+
},
|
46
|
+
{
|
47
|
+
type: 'TextStyle',
|
48
|
+
name: ['props', 'submitButtonStyle']
|
49
|
+
},
|
50
|
+
{
|
51
|
+
type: 'TextAlign',
|
52
|
+
name: ['props', 'submitButtonStyle']
|
53
|
+
},
|
54
|
+
{
|
55
|
+
label: '提交按钮颜色',
|
56
|
+
type: 'Color',
|
57
|
+
name: ['props', 'submitButtonStyle', 'backgroundColor']
|
58
|
+
}
|
59
|
+
]
|
17
60
|
}
|
18
61
|
];
|
@@ -7,13 +7,19 @@ import { useSxpDataSource } from '../../../../core/hooks';
|
|
7
7
|
import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
8
8
|
const Commodity = (_a) => {
|
9
9
|
var _b, _c, _d, _e, _f, _g, _h;
|
10
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
10
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
11
11
|
const { sxpParameter } = useSxpDataSource();
|
12
12
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
13
13
|
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
14
14
|
return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
15
15
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
16
|
-
React.createElement(FormatImage, { className: css({
|
16
|
+
React.createElement(FormatImage, { className: css({
|
17
|
+
width: '100%',
|
18
|
+
objectFit: 'cover',
|
19
|
+
height: '100%',
|
20
|
+
display: 'block',
|
21
|
+
transform: `translateY(${translateY}%)`
|
22
|
+
}), src: src })),
|
17
23
|
React.createElement("div", { className: css({
|
18
24
|
color: '#fff',
|
19
25
|
display: 'flex',
|
@@ -7,13 +7,19 @@ import { useSxpDataSource } from '../../../../core/hooks';
|
|
7
7
|
import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
8
8
|
const CommodityDiro = (_a) => {
|
9
9
|
var _b, _c, _d, _e, _f, _g, _h;
|
10
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
10
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
11
11
|
const { sxpParameter } = useSxpDataSource();
|
12
12
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
13
13
|
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
14
14
|
return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
15
15
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
16
|
-
React.createElement(FormatImage, { className: css({
|
16
|
+
React.createElement(FormatImage, { className: css({
|
17
|
+
width: '100%',
|
18
|
+
objectFit: 'cover',
|
19
|
+
height: '100%',
|
20
|
+
display: 'block',
|
21
|
+
transform: `translateY(${translateY}%)`
|
22
|
+
}), src: src })),
|
17
23
|
React.createElement("div", { className: css({
|
18
24
|
color: '#fff',
|
19
25
|
display: 'flex',
|
@@ -10,6 +10,7 @@ export interface ICommodityDiroNewProps {
|
|
10
10
|
ctaTempStyles?: ICtaTempStylesType;
|
11
11
|
isExternalLink?: boolean;
|
12
12
|
index?: number;
|
13
|
+
translateY?: number;
|
13
14
|
}
|
14
15
|
declare const _default: React.NamedExoticComponent<ICommodityDiroNewProps>;
|
15
16
|
export default _default;
|
@@ -7,13 +7,19 @@ import { useSxpDataSource } from '../../../../core/hooks';
|
|
7
7
|
import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
8
8
|
const CommodityDiroNew = (_a) => {
|
9
9
|
var _b, _c, _d, _e, _f, _g, _h;
|
10
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
10
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
11
11
|
const { sxpParameter } = useSxpDataSource();
|
12
12
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
13
13
|
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
14
14
|
return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
15
15
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
16
|
-
React.createElement(FormatImage, { className: css({
|
16
|
+
React.createElement(FormatImage, { className: css({
|
17
|
+
width: '100%',
|
18
|
+
objectFit: 'cover',
|
19
|
+
height: '100%',
|
20
|
+
display: 'block',
|
21
|
+
transform: `translateY(${translateY}%)`
|
22
|
+
}), src: src })),
|
17
23
|
React.createElement("div", { className: css({
|
18
24
|
color: '#fff',
|
19
25
|
display: 'flex',
|
@@ -10,7 +10,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
|
|
10
10
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
11
11
|
const MultiCommodity = (_a) => {
|
12
12
|
var _b, _c;
|
13
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
13
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
14
14
|
const { sxpParameter } = useSxpDataSource();
|
15
15
|
const { ctaEvent, setPopupDetailData } = useSxpDataSource();
|
16
16
|
const { popup } = useEditor();
|
@@ -36,7 +36,9 @@ const MultiCommodity = (_a) => {
|
|
36
36
|
var _a, _b, _c, _d, _e, _f;
|
37
37
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
38
38
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
39
|
-
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index
|
39
|
+
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index, style: {
|
40
|
+
transform: `translateY(${translateY}%)`
|
41
|
+
} })),
|
40
42
|
React.createElement("div", { className: css({
|
41
43
|
color: '#fff',
|
42
44
|
display: 'flex',
|
@@ -11,6 +11,7 @@ export interface IMultiCommodityDiroProps {
|
|
11
11
|
ctaTempStyles?: ICtaTempStylesType;
|
12
12
|
isExternalLink?: boolean;
|
13
13
|
index?: number;
|
14
|
+
translateY?: number;
|
14
15
|
}
|
15
16
|
declare const _default: React.NamedExoticComponent<IMultiCommodityDiroProps>;
|
16
17
|
export default _default;
|
@@ -10,7 +10,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
|
|
10
10
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
11
11
|
const MultiCommodityDiro = (_a) => {
|
12
12
|
var _b, _c;
|
13
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
13
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
14
14
|
const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
|
15
15
|
const { popup } = useEditor();
|
16
16
|
const { jumpToWeb } = useEventReport();
|
@@ -35,7 +35,9 @@ const MultiCommodityDiro = (_a) => {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f;
|
36
36
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
37
37
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
38
|
-
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index
|
38
|
+
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index, style: {
|
39
|
+
transform: `translateY(${translateY}%)`
|
40
|
+
} })),
|
39
41
|
React.createElement("div", { className: css({
|
40
42
|
color: '#000',
|
41
43
|
display: 'flex',
|
@@ -11,6 +11,7 @@ export interface IMultiCommodityDiroNewProps {
|
|
11
11
|
ctaTempStyles?: ICtaTempStylesType;
|
12
12
|
isExternalLink?: boolean;
|
13
13
|
index?: number;
|
14
|
+
translateY?: number;
|
14
15
|
}
|
15
16
|
declare const _default: React.NamedExoticComponent<IMultiCommodityDiroNewProps>;
|
16
17
|
export default _default;
|
@@ -10,7 +10,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
|
|
10
10
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
11
11
|
const MultiCommodityDiroNew = (_a) => {
|
12
12
|
var _b, _c;
|
13
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
13
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
14
14
|
const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
|
15
15
|
const { popup } = useEditor();
|
16
16
|
const { jumpToWeb } = useEventReport();
|
@@ -35,7 +35,9 @@ const MultiCommodityDiroNew = (_a) => {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f;
|
36
36
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
37
37
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
38
|
-
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index
|
38
|
+
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index, style: {
|
39
|
+
transform: `translateY(${translateY}%)`
|
40
|
+
} })),
|
39
41
|
React.createElement("div", { className: css({
|
40
42
|
color: '#fff',
|
41
43
|
display: 'flex',
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { ProductInfoType, RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
3
|
export interface IImgProps {
|
4
4
|
src: string;
|
5
5
|
rec?: RecItemType;
|
6
6
|
item?: ProductInfoType;
|
7
7
|
index?: number;
|
8
|
+
style?: CSSProperties;
|
8
9
|
}
|
9
10
|
declare const _default: React.NamedExoticComponent<IImgProps>;
|
10
11
|
export default _default;
|
@@ -3,7 +3,7 @@ import React, { memo, useEffect, useRef } from 'react';
|
|
3
3
|
import useOnScreen from '../../../../core/hooks/useOnScreen';
|
4
4
|
import { useSxpDataSource } from '../../../../core/hooks';
|
5
5
|
import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
6
|
-
const Img = ({ src, rec, item, index }) => {
|
6
|
+
const Img = ({ src, rec, item, index, style }) => {
|
7
7
|
const ref = useRef(null);
|
8
8
|
const isOnScreen = useOnScreen(ref);
|
9
9
|
const { ctaEvent } = useSxpDataSource();
|
@@ -16,6 +16,6 @@ const Img = ({ src, rec, item, index }) => {
|
|
16
16
|
}
|
17
17
|
}, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
|
18
18
|
return (React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
|
19
|
-
React.createElement(FormatImage, { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })));
|
19
|
+
React.createElement(FormatImage, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }, style)), src: src })));
|
20
20
|
};
|
21
21
|
export default memo(Img);
|
@@ -40,6 +40,56 @@ declare const _default: ({
|
|
40
40
|
child?: undefined;
|
41
41
|
})[];
|
42
42
|
type?: undefined;
|
43
|
+
} | {
|
44
|
+
title: string;
|
45
|
+
child: ({
|
46
|
+
type: string;
|
47
|
+
label: string;
|
48
|
+
child: {
|
49
|
+
type: string;
|
50
|
+
name: string[];
|
51
|
+
addonAfter: string;
|
52
|
+
}[];
|
53
|
+
addonAfter?: undefined;
|
54
|
+
name?: undefined;
|
55
|
+
min?: undefined;
|
56
|
+
initialValue?: undefined;
|
57
|
+
} | {
|
58
|
+
type: string;
|
59
|
+
label: string;
|
60
|
+
child: ({
|
61
|
+
type: string;
|
62
|
+
name: string[];
|
63
|
+
max: number;
|
64
|
+
addonAfter?: undefined;
|
65
|
+
} | {
|
66
|
+
type: string;
|
67
|
+
name: string[];
|
68
|
+
addonAfter: string;
|
69
|
+
max: number;
|
70
|
+
})[];
|
71
|
+
addonAfter?: undefined;
|
72
|
+
name?: undefined;
|
73
|
+
min?: undefined;
|
74
|
+
initialValue?: undefined;
|
75
|
+
} | {
|
76
|
+
type: string;
|
77
|
+
label: string;
|
78
|
+
addonAfter: string;
|
79
|
+
name: string[];
|
80
|
+
child?: undefined;
|
81
|
+
min?: undefined;
|
82
|
+
initialValue?: undefined;
|
83
|
+
} | {
|
84
|
+
label: string;
|
85
|
+
type: string;
|
86
|
+
name: string[];
|
87
|
+
min: number;
|
88
|
+
addonAfter: string;
|
89
|
+
initialValue: number;
|
90
|
+
child?: undefined;
|
91
|
+
})[];
|
92
|
+
type?: undefined;
|
43
93
|
} | {
|
44
94
|
title: string;
|
45
95
|
type: string;
|
@@ -97,6 +97,14 @@ export default [
|
|
97
97
|
label: '与右侧边距',
|
98
98
|
addonAfter: 'px',
|
99
99
|
name: ['props', 'ctaTempStyles', 'img', 'marginRight']
|
100
|
+
},
|
101
|
+
{
|
102
|
+
label: '居中垂直偏移',
|
103
|
+
type: 'Number',
|
104
|
+
name: ['props', 'translateY'],
|
105
|
+
min: -100,
|
106
|
+
addonAfter: '%',
|
107
|
+
initialValue: 0
|
100
108
|
}
|
101
109
|
]
|
102
110
|
},
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
|
+
const hls_js_1 = tslib_1.__importDefault(require("hls.js"));
|
5
6
|
const useIconLink_1 = require("../SxpPageRender/useIconLink");
|
6
7
|
const FormatImage_1 = tslib_1.__importDefault(require("../SxpPageRender/FormatImage"));
|
7
8
|
const hooks_1 = require("../../../core/hooks");
|
@@ -141,8 +142,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
141
142
|
if (!videoRef.current.src) {
|
142
143
|
const videoSrc = rec.video.url;
|
143
144
|
if (videoSrc.includes('.m3u8')) {
|
144
|
-
if (
|
145
|
-
const hls = new
|
145
|
+
if (hls_js_1.default.isSupported()) {
|
146
|
+
const hls = new hls_js_1.default();
|
146
147
|
hls.loadSource(videoSrc);
|
147
148
|
hls.attachMedia(videoRef.current);
|
148
149
|
}
|
@@ -12,14 +12,14 @@ Object.values(_materials_).forEach((v) => {
|
|
12
12
|
RESOLVER[v.extend.type] = v;
|
13
13
|
});
|
14
14
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
15
|
-
var _a, _b, _c, _d, _e, _f
|
15
|
+
var _a, _b, _c, _d, _e, _f;
|
16
16
|
const utmVal = (0, react_1.useMemo)(() => {
|
17
17
|
var _a;
|
18
18
|
const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
|
19
19
|
return searchParams;
|
20
20
|
}, []);
|
21
21
|
return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
22
|
-
react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi,
|
22
|
+
react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, render: ({ rtcList, tagList }) => {
|
23
23
|
var _a;
|
24
24
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
25
25
|
react_1.default.createElement(SxpPageRender_1.default, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
const useIconLink_1 = require("../useIconLink");
|
6
6
|
const hooks_1 = require("../../../../core/hooks");
|
7
|
-
const FingerSwipeTip = ({ imageUrl }) => {
|
7
|
+
const FingerSwipeTip = ({ imageUrl, style }) => {
|
8
8
|
const [show, setShow] = (0, react_1.useState)(true);
|
9
9
|
const { schema: { sxpPageConf } } = (0, hooks_1.useEditor)();
|
10
10
|
(0, react_1.useEffect)(() => {
|
@@ -16,7 +16,7 @@ const FingerSwipeTip = ({ imageUrl }) => {
|
|
16
16
|
const animationCls = (0, react_1.useMemo)(() => {
|
17
17
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
18
18
|
}, [show]);
|
19
|
-
return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}
|
19
|
+
return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
20
20
|
react_1.default.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
|
21
21
|
};
|
22
22
|
exports.default = FingerSwipeTip;
|
@@ -13,7 +13,6 @@ const FormatImage = (0, react_1.forwardRef)((props, ref) => {
|
|
13
13
|
(0, react_1.useEffect)(() => {
|
14
14
|
setImgSrc(src);
|
15
15
|
}, [src]);
|
16
|
-
const imgRef = (0, react_1.useRef)(null);
|
17
16
|
return (react_1.default.createElement(react_1.default.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (react_1.default.createElement("picture", null,
|
18
17
|
react_1.default.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
19
18
|
react_1.default.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
@@ -184,7 +184,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
184
184
|
const videoSrc = rec.video.url;
|
185
185
|
if (!videoSrc)
|
186
186
|
return;
|
187
|
-
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
188
187
|
setIsPauseVideo(false);
|
189
188
|
const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
|
190
189
|
const dom = document.querySelector('#player-container-id');
|
@@ -192,6 +191,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
192
191
|
if (!dom && !dom2)
|
193
192
|
return;
|
194
193
|
videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
|
194
|
+
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
195
195
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
|
196
196
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
|
197
197
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('playing', handlePlaying);
|
@@ -29,6 +29,11 @@ export interface ISxpPageRenderProps {
|
|
29
29
|
isOpenTextShadow?: boolean;
|
30
30
|
videoPost?: postConfigType;
|
31
31
|
imgUrlsPost?: postConfigType;
|
32
|
+
muteIconXPosit?: string;
|
33
|
+
muteIconYPosit?: string;
|
34
|
+
likeIconYPosit?: string;
|
35
|
+
likeIconXPosit?: string;
|
36
|
+
swipeTipOffset?: number;
|
32
37
|
};
|
33
38
|
descStyle?: CSSProperties;
|
34
39
|
tipText?: {
|