pb-sxp-ui 1.0.1 → 1.0.2-alpha.1
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 +938 -389
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +24 -18
- package/dist/index.js +938 -389
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +938 -389
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/es/core/components/SxpPageRender/ExpandableText.js +16 -9
- package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/Modal/index.js +7 -4
- package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
- package/es/core/components/SxpPageRender/Popup/index.js +3 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
- package/es/core/components/SxpPageRender/index.d.ts +20 -1
- package/es/core/components/SxpPageRender/index.js +19 -16
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/es/core/components/SxpPageRender/useIconLink.js +8 -3
- package/es/core/context/EditorContext.d.ts +5 -0
- package/es/core/context/EditorContext.js +21 -3
- package/es/core/context/SxpDataSourceProvider.js +1 -1
- package/es/core/create.d.ts +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +175 -0
- package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/es/materials/sxp/template/Appoint/index.js +4 -18
- package/es/materials/sxp/template/Appoint/material.js +22 -6
- package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/es/materials/sxp/template/Commodity/index.js +5 -22
- package/es/materials/sxp/template/Commodity/material.js +31 -6
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/Link/index.d.ts +2 -0
- package/es/materials/sxp/template/Link/index.js +4 -13
- package/es/materials/sxp/template/Link/material.js +22 -5
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
- package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/es/materials/sxp/template/components/EventProvider.js +5 -4
- package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
- package/es/materials/sxp/template/components/settingRender.js +198 -0
- package/es/materials/sxp/template/components/typing.d.ts +6 -0
- package/es/materials/sxp/template/components/typing.js +1 -0
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/lib/core/components/SxpPageRender/ExpandableText.js +16 -9
- package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
- package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
- package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
- package/lib/core/components/SxpPageRender/index.d.ts +20 -1
- package/lib/core/components/SxpPageRender/index.js +19 -16
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
- package/lib/core/context/EditorContext.d.ts +5 -0
- package/lib/core/context/EditorContext.js +21 -3
- package/lib/core/context/SxpDataSourceProvider.js +1 -1
- package/lib/core/create.d.ts +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +177 -0
- package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/lib/materials/sxp/template/Appoint/index.js +4 -18
- package/lib/materials/sxp/template/Appoint/material.js +22 -6
- package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/Commodity/index.js +5 -22
- package/lib/materials/sxp/template/Commodity/material.js +31 -6
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/Link/index.d.ts +2 -0
- package/lib/materials/sxp/template/Link/index.js +4 -13
- package/lib/materials/sxp/template/Link/material.js +22 -5
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
- package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/lib/materials/sxp/template/components/EventProvider.js +4 -3
- package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
- package/lib/materials/sxp/template/components/settingRender.js +200 -0
- package/lib/materials/sxp/template/components/typing.d.ts +6 -0
- package/lib/materials/sxp/template/components/typing.js +2 -0
- package/package.json +2 -2
@@ -9,16 +9,20 @@ const hooks_1 = require("../../../../core/hooks");
|
|
9
9
|
const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
|
10
10
|
const { isActive } = (0, react_2.useSwiperSlide)();
|
11
11
|
const { sxpParameter, openHashtag } = (0, hooks_1.useSxpDataSource)();
|
12
|
+
const [isLoad, setIsLoad] = (0, react_1.useState)(false);
|
12
13
|
(0, react_1.useEffect)(() => {
|
13
|
-
if (
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
if (isLoad && isActive) {
|
15
|
+
if (openHashtag) {
|
16
|
+
onReportViewImageEnd(rec);
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
onViewImageStartEvent(index);
|
20
|
+
}
|
17
21
|
}
|
18
22
|
else {
|
19
|
-
|
23
|
+
setIsLoad(true);
|
20
24
|
}
|
21
|
-
}, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
|
25
|
+
}, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
|
22
26
|
if (!isActive) {
|
23
27
|
return react_1.default.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
|
24
28
|
}
|
@@ -7,7 +7,7 @@ const hooks_1 = require("../../../../core/hooks");
|
|
7
7
|
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../../core/hoc/withBindDataSource"));
|
8
8
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
9
9
|
const Popup = () => {
|
10
|
-
const { schema, resolver, popup } = (0, hooks_1.useEditor)();
|
10
|
+
const { schema, resolver, popup, popupAni } = (0, hooks_1.useEditor)();
|
11
11
|
const { setPopupDetailData, popupDetailData, bffEventReport } = (0, hooks_1.useSxpDataSource)();
|
12
12
|
const { productView } = (0, useEventReport_1.useEventReport)();
|
13
13
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
@@ -30,7 +30,7 @@ const Popup = () => {
|
|
30
30
|
}, [popup]);
|
31
31
|
const handleClose = () => {
|
32
32
|
var _a, _b, _c;
|
33
|
-
if (!popup || popup === '' || !visible || new Date() - curTimeRef.current <
|
33
|
+
if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
|
34
34
|
return;
|
35
35
|
}
|
36
36
|
setVisible(false);
|
@@ -43,7 +43,7 @@ const Popup = () => {
|
|
43
43
|
setTimeout(() => {
|
44
44
|
window === null || window === void 0 ? void 0 : window.sxpPopup('');
|
45
45
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
|
46
|
-
},
|
46
|
+
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
47
47
|
};
|
48
48
|
const renderPopupDetail = (0, react_1.useMemo)(() => {
|
49
49
|
var _a, _b, _c;
|
@@ -19,8 +19,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
19
19
|
videoRef.current.muted = muted;
|
20
20
|
}, [muted]);
|
21
21
|
const handleVideoStart = (0, react_1.useCallback)(() => {
|
22
|
-
var _a;
|
23
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.
|
22
|
+
var _a, _b;
|
23
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
24
|
+
return;
|
25
|
+
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
|
24
26
|
}, []);
|
25
27
|
const PAUSE_ICON = (0, useIconLink_1.useIconLink)('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
26
28
|
const handlePlaying = (0, react_1.useCallback)(() => {
|
@@ -77,37 +79,38 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
77
79
|
});
|
78
80
|
}
|
79
81
|
setTimeout(() => {
|
80
|
-
var _a;
|
81
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.
|
82
|
+
var _a, _b;
|
83
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
84
|
+
return;
|
85
|
+
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
|
82
86
|
}, 0);
|
83
87
|
}, [index, bffEventReport, data, isLoad]);
|
84
88
|
const handleClickVideo = (0, react_1.useCallback)((type) => () => {
|
85
|
-
var _a, _b, _c, _d, _e, _f
|
89
|
+
var _a, _b, _c, _d, _e, _f;
|
90
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
91
|
+
return;
|
86
92
|
if (!isLoad)
|
87
93
|
return;
|
88
|
-
const
|
89
|
-
const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
|
90
|
-
const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
91
|
-
const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
|
94
|
+
const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
|
92
95
|
switch (type) {
|
93
96
|
case 'start':
|
94
97
|
if (!isPause)
|
95
98
|
return;
|
96
|
-
(
|
99
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
|
97
100
|
setIsPauseVideo(false);
|
98
101
|
break;
|
99
102
|
case 'pause':
|
100
103
|
if (isPause)
|
101
104
|
return;
|
102
|
-
(
|
105
|
+
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
|
103
106
|
setIsPauseVideo(true);
|
104
107
|
break;
|
105
108
|
default:
|
106
109
|
if (isPause) {
|
107
|
-
(
|
110
|
+
(_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
|
108
111
|
}
|
109
112
|
else {
|
110
|
-
(
|
113
|
+
(_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
|
111
114
|
}
|
112
115
|
setIsPauseVideo(!isPause);
|
113
116
|
break;
|
@@ -138,14 +141,16 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
138
141
|
}
|
139
142
|
}, [data, index, bffEventReport]);
|
140
143
|
(0, react_1.useEffect)(() => {
|
141
|
-
var _a, _b, _c;
|
144
|
+
var _a, _b, _c, _d, _e, _f;
|
142
145
|
if (data.length <= 0)
|
143
146
|
return;
|
144
147
|
if (!videoRef.current)
|
145
148
|
return;
|
149
|
+
const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
146
150
|
setIsPauseVideo(false);
|
147
151
|
if (!isActive) {
|
148
|
-
(
|
152
|
+
if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
|
153
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
149
154
|
return;
|
150
155
|
}
|
151
156
|
if (!videoRef.current.src) {
|
@@ -155,10 +160,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
155
160
|
videoRef.current.setAttribute('webkit-playsinline', 'true');
|
156
161
|
}
|
157
162
|
else {
|
163
|
+
if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
|
164
|
+
return;
|
158
165
|
videoRef.current.play();
|
159
166
|
}
|
160
|
-
(
|
161
|
-
(
|
167
|
+
(_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
|
168
|
+
(_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
|
162
169
|
return () => {
|
163
170
|
var _a, _b;
|
164
171
|
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
|
@@ -166,15 +173,17 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
166
173
|
};
|
167
174
|
}, [data, handleLoadedMetadata, handlePlaying, isActive, isLoad, rec.video]);
|
168
175
|
(0, react_1.useEffect)(() => {
|
169
|
-
var _a, _b, _c;
|
170
|
-
|
176
|
+
var _a, _b, _c, _d;
|
177
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
178
|
+
return;
|
179
|
+
const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
|
171
180
|
if (!isActive)
|
172
181
|
return;
|
173
182
|
if (!isPause && openHashtag) {
|
174
|
-
(
|
183
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
175
184
|
}
|
176
185
|
else if (!openHashtag) {
|
177
|
-
(
|
186
|
+
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
|
178
187
|
}
|
179
188
|
}, [openHashtag, isActive]);
|
180
189
|
(0, react_1.useEffect)(() => {
|
@@ -146,6 +146,7 @@ const WaterfallFlowItem = (props) => {
|
|
146
146
|
};
|
147
147
|
function WaterfallList({ reportTagsView }) {
|
148
148
|
var _a, _b, _c, _d, _e, _f;
|
149
|
+
const { popupAni } = (0, hooks_1.useEditor)();
|
149
150
|
const { waterFallData, getRecommendVideos, loadingImage } = (0, hooks_1.useSxpDataSource)();
|
150
151
|
const scrollParent = (0, react_1.useRef)(null);
|
151
152
|
const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
|
@@ -163,7 +164,7 @@ function WaterfallList({ reportTagsView }) {
|
|
163
164
|
const [frameInfo, setFrameInfoInfo] = (0, react_1.useState)({ width: 0 });
|
164
165
|
const rowsNum = (0, react_1.useMemo)(() => {
|
165
166
|
const width = frameInfo.width || 0;
|
166
|
-
if (width >=
|
167
|
+
if (width >= (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
|
167
168
|
return 6;
|
168
169
|
}
|
169
170
|
else if (width >= 768 && width <= 1199) {
|
@@ -172,7 +173,7 @@ function WaterfallList({ reportTagsView }) {
|
|
172
173
|
else {
|
173
174
|
return 2;
|
174
175
|
}
|
175
|
-
}, [frameInfo]);
|
176
|
+
}, [frameInfo, popupAni]);
|
176
177
|
const unitWidth = (0, react_1.useMemo)(() => {
|
177
178
|
return frameInfo.width / rowsNum - 2;
|
178
179
|
}, [rowsNum, frameInfo]);
|
@@ -10,7 +10,7 @@ interface ISxpPageRenderProps {
|
|
10
10
|
likeIcon?: string;
|
11
11
|
unlikeIcon?: string;
|
12
12
|
color?: string;
|
13
|
-
productPost?:
|
13
|
+
productPost?: any[];
|
14
14
|
muteIconX?: number;
|
15
15
|
muteIconY?: number;
|
16
16
|
likeIconX?: number;
|
@@ -23,6 +23,25 @@ interface ISxpPageRenderProps {
|
|
23
23
|
foldText: string;
|
24
24
|
unfoldText: string;
|
25
25
|
};
|
26
|
+
nudge?: {
|
27
|
+
isOpen: boolean;
|
28
|
+
icon?: string;
|
29
|
+
backgroundColor: string;
|
30
|
+
content?: string;
|
31
|
+
marginBottom: number;
|
32
|
+
borderRadius: number;
|
33
|
+
size: {
|
34
|
+
height: number;
|
35
|
+
width: number;
|
36
|
+
};
|
37
|
+
textStyle: {
|
38
|
+
color: string;
|
39
|
+
fontFamily: string;
|
40
|
+
fontSize: number;
|
41
|
+
fontStyle: string;
|
42
|
+
textAlign: string;
|
43
|
+
};
|
44
|
+
};
|
26
45
|
containerHeight?: number;
|
27
46
|
containerWidth?: number;
|
28
47
|
tempMap?: Record<string, any>;
|
@@ -10,20 +10,20 @@ const VideoWidget_1 = tslib_1.__importDefault(require("./VideoWidget"));
|
|
10
10
|
const ToggleButton_1 = tslib_1.__importDefault(require("./ToggleButton"));
|
11
11
|
const FingerSwipeTip_1 = tslib_1.__importDefault(require("./FingerSwipeTip"));
|
12
12
|
const PictureGroup_1 = tslib_1.__importDefault(require("./PictureGroup"));
|
13
|
-
const ProductInfo_1 = tslib_1.__importDefault(require("./ProductInfo"));
|
14
13
|
const Hashtag_1 = tslib_1.__importDefault(require("./Hashtag"));
|
15
14
|
const Navbar_1 = tslib_1.__importDefault(require("./Navbar"));
|
16
15
|
const left_png_1 = tslib_1.__importDefault(require("./left.png"));
|
17
16
|
const RenderCard_1 = tslib_1.__importDefault(require("./RenderCard"));
|
18
17
|
const useIconLink_1 = require("./useIconLink");
|
19
18
|
const WaterFall_1 = tslib_1.__importDefault(require("./WaterFall"));
|
20
|
-
const
|
19
|
+
const Nudge_1 = tslib_1.__importDefault(require("./Nudge"));
|
21
20
|
const event_1 = tslib_1.__importStar(require("../../../core/utils/event"));
|
22
21
|
const hooks_1 = require("../../../core/hooks");
|
23
22
|
const sessionStore_1 = require("../../../core/utils/sessionStore");
|
24
23
|
require("./index.less");
|
25
24
|
const useEventReport_1 = require("../../../core/hooks/useEventReport");
|
26
|
-
const
|
25
|
+
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../core/hoc/withBindDataSource"));
|
26
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema }) => {
|
27
27
|
var _a, _b, _c, _d;
|
28
28
|
const { schema } = (0, hooks_1.useEditor)();
|
29
29
|
const [activeIndex, setActiveIndex] = (0, react_1.useState)(0);
|
@@ -152,39 +152,37 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
152
152
|
return null;
|
153
153
|
}, [globalConfig]);
|
154
154
|
const renderContent = (0, react_1.useCallback)((rec, index) => {
|
155
|
-
var _a, _b;
|
155
|
+
var _a, _b, _c, _d;
|
156
156
|
if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
157
157
|
return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex }));
|
158
158
|
}
|
159
159
|
if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
|
160
160
|
return (react_1.default.createElement(PictureGroup_1.default, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent }));
|
161
161
|
}
|
162
|
-
if (rec.product) {
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
default:
|
169
|
-
return (react_1.default.createElement(ProductInfo_1.default, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
|
170
|
-
}
|
162
|
+
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
163
|
+
return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
|
164
|
+
var _a, _b, _c, _d, _e, _f;
|
165
|
+
const Component = (0, withBindDataSource_1.default)(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
|
166
|
+
return (react_1.default.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' }, data: rec, height: height, width: containerWidth })));
|
167
|
+
});
|
171
168
|
}
|
172
169
|
return null;
|
173
|
-
}, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText]);
|
170
|
+
}, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText, resolver, schema]);
|
174
171
|
const renderBottom = (0, react_1.useCallback)((rec, index) => {
|
175
172
|
var _a, _b, _c, _d, _e, _f, _g;
|
176
173
|
if (rec.video) {
|
177
174
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
178
175
|
((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
179
176
|
react_1.default.createElement("div", { className: 'clc-sxp-bottom' },
|
177
|
+
react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
|
180
178
|
react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
|
181
179
|
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
|
182
180
|
react_1.default.createElement("div", { className: 'clc-sxp-bottom-text' },
|
183
|
-
react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
|
181
|
+
react_1.default.createElement(ExpandableText_1.default, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
|
184
182
|
react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec }))));
|
185
183
|
}
|
186
184
|
return null;
|
187
|
-
}, [descStyle, activeIndex, tempMap, resolver, tipText]);
|
185
|
+
}, [descStyle, activeIndex, tempMap, resolver, tipText, nudge]);
|
188
186
|
const renderLikeButton = (0, react_1.useCallback)((rec) => {
|
189
187
|
var _a, _b;
|
190
188
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
@@ -260,6 +258,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
260
258
|
productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
|
261
259
|
}
|
262
260
|
};
|
261
|
+
(0, react_1.useEffect)(() => {
|
262
|
+
const item = data[activeIndex];
|
263
|
+
if (openHashtag)
|
264
|
+
handleReportProductView(item);
|
265
|
+
}, [openHashtag, data, activeIndex]);
|
263
266
|
const handleViewImageStartEvent = (activeIndex) => {
|
264
267
|
var _a, _b, _c, _d, _e, _f;
|
265
268
|
const item = data[activeIndex];
|
@@ -1 +1 @@
|
|
1
|
-
export declare function useIconLink(path: string): string;
|
1
|
+
export declare function useIconLink(path: string, domain?: string): string;
|
@@ -3,10 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useIconLink = void 0;
|
4
4
|
const react_1 = require("react");
|
5
5
|
const hooks_1 = require("../../../core/hooks");
|
6
|
-
function useIconLink(path) {
|
6
|
+
function useIconLink(path, domain) {
|
7
7
|
const { appDomain } = (0, hooks_1.useSxpDataSource)();
|
8
8
|
return (0, react_1.useMemo)(() => {
|
9
|
-
|
10
|
-
|
9
|
+
if (domain) {
|
10
|
+
return `https://${domain}${path}`;
|
11
|
+
}
|
12
|
+
else {
|
13
|
+
return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
|
14
|
+
}
|
15
|
+
}, [appDomain, path, domain]);
|
11
16
|
}
|
12
17
|
exports.useIconLink = useIconLink;
|
@@ -15,6 +15,10 @@ export interface IPageParams {
|
|
15
15
|
h5_url?: string;
|
16
16
|
mp_rul?: string;
|
17
17
|
}
|
18
|
+
export type IPopupAniType = {
|
19
|
+
name: string;
|
20
|
+
duration: number;
|
21
|
+
};
|
18
22
|
export interface IEditorContext {
|
19
23
|
resolver: Record<string, MaterialComponet>;
|
20
24
|
currentNode: any | null;
|
@@ -55,6 +59,7 @@ export interface IEditorContext {
|
|
55
59
|
getCurPageConf?: any;
|
56
60
|
popup: string;
|
57
61
|
setPopup: React.Dispatch<React.SetStateAction<string>>;
|
62
|
+
popupAni: IPopupAniType;
|
58
63
|
}
|
59
64
|
export interface IEditorCoreProps {
|
60
65
|
resolver: Record<string, MaterialComponet>;
|
@@ -49,7 +49,11 @@ exports.EditorContext = react_1.default.createContext({
|
|
49
49
|
undoStack: [item],
|
50
50
|
redoStack: [],
|
51
51
|
popup: '',
|
52
|
-
setPopup: () => { }
|
52
|
+
setPopup: () => { },
|
53
|
+
popupAni: {
|
54
|
+
name: 'none',
|
55
|
+
duration: 0
|
56
|
+
}
|
53
57
|
});
|
54
58
|
const EditorCore = (0, react_1.forwardRef)(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
|
55
59
|
const [currentNode, setCurrentNode] = (0, react_1.useState)(null);
|
@@ -68,9 +72,22 @@ const EditorCore = (0, react_1.forwardRef)(({ children, resolver, isSsr, schema,
|
|
68
72
|
const [undoStack, setUndoStack] = (0, react_1.useState)([[item]]);
|
69
73
|
const [redoStack, setRedoStack] = (0, react_1.useState)([]);
|
70
74
|
const [popup, setPopup] = (0, react_1.useState)('');
|
75
|
+
const [popupAni, setPopupAni] = (0, react_1.useState)({
|
76
|
+
name: 'none',
|
77
|
+
duration: 0
|
78
|
+
});
|
71
79
|
typeof window !== 'undefined' &&
|
72
|
-
(window.sxpPopup = (type) => {
|
80
|
+
(window.sxpPopup = (type, aniType) => {
|
73
81
|
setPopup(type);
|
82
|
+
if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
|
83
|
+
setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
setPopupAni({
|
87
|
+
name: 'none',
|
88
|
+
duration: 0
|
89
|
+
});
|
90
|
+
}
|
74
91
|
});
|
75
92
|
typeof window !== 'undefined' &&
|
76
93
|
(window.getJointUtmLink = (url) => {
|
@@ -139,7 +156,8 @@ const EditorCore = (0, react_1.forwardRef)(({ children, resolver, isSsr, schema,
|
|
139
156
|
setUndoStack,
|
140
157
|
getCurPageConf,
|
141
158
|
popup,
|
142
|
-
setPopup
|
159
|
+
setPopup,
|
160
|
+
popupAni
|
143
161
|
} },
|
144
162
|
react_1.default.createElement(DataSourceProvider_1.default, { isSsr: isSsr, enable: enableDataSource }, children)));
|
145
163
|
});
|
@@ -171,7 +171,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
171
171
|
setLoading(false);
|
172
172
|
});
|
173
173
|
}, [getRecommendVideos]);
|
174
|
-
const defaultLoadingImage = (0, useIconLink_1.useIconLink)('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif');
|
174
|
+
const defaultLoadingImage = (0, useIconLink_1.useIconLink)('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
175
175
|
return (react_1.default.createElement(exports.SxpDataSourceContext.Provider, { value: {
|
176
176
|
rtcList,
|
177
177
|
setRtcList,
|
package/lib/core/create.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { IEditorContext } from '../../../../core/context/EditorContext';
|
3
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
4
4
|
import './index.less';
|
@@ -17,6 +17,18 @@ export interface ICommodityDetailDiroNewProps {
|
|
17
17
|
foldText?: string;
|
18
18
|
unfoldText?: string;
|
19
19
|
};
|
20
|
+
swiper: {
|
21
|
+
dotsAlign: 'left' | 'center';
|
22
|
+
delay: number;
|
23
|
+
};
|
24
|
+
commodityStyles?: {
|
25
|
+
title: CSSProperties;
|
26
|
+
collection: CSSProperties;
|
27
|
+
price: CSSProperties;
|
28
|
+
taxInfo: CSSProperties;
|
29
|
+
info: CSSProperties;
|
30
|
+
};
|
31
|
+
buttonStyle?: CSSProperties;
|
20
32
|
}
|
21
33
|
declare const _default: React.NamedExoticComponent<ICommodityDetailDiroNewProps>;
|
22
34
|
export default _default;
|
@@ -11,8 +11,8 @@ const Modal_1 = tslib_1.__importDefault(require("../../../../core/components/Sxp
|
|
11
11
|
const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/ExpandableText"));
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
13
|
const CommodityDetailDiroNew = (_a) => {
|
14
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
15
|
-
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
|
14
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
15
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
|
16
16
|
const [spread, setSpread] = (0, react_1.useState)(true);
|
17
17
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
18
18
|
const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = (0, hooks_1.useSxpDataSource)();
|
@@ -81,14 +81,22 @@ const CommodityDetailDiroNew = (_a) => {
|
|
81
81
|
}
|
82
82
|
}
|
83
83
|
};
|
84
|
+
const productInfoText = () => {
|
85
|
+
return (react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
86
|
+
react_1.default.createElement(ExpandableText_1.default, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
|
87
|
+
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
88
|
+
Made in Italy` })));
|
89
|
+
};
|
84
90
|
return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
|
85
91
|
react_1.default.createElement("div", Object.assign({ ref: scrollRef, className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
86
92
|
product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
87
93
|
clickable: true,
|
88
94
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
89
|
-
clickableClass:
|
95
|
+
clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
|
96
|
+
? 'commondityDiroNew-swiper-clickable-left'
|
97
|
+
: 'commondityDiroNew-swiper-clickable-center'
|
90
98
|
}, loop: true, autoplay: {
|
91
|
-
delay:
|
99
|
+
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
92
100
|
} }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
|
93
101
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
94
102
|
react_1.default.createElement("div", { style: {
|
@@ -114,18 +122,13 @@ const CommodityDetailDiroNew = (_a) => {
|
|
114
122
|
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
115
123
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
116
124
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
117
|
-
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
118
|
-
react_1.default.createElement("div", { className: '
|
119
|
-
|
120
|
-
|
121
|
-
react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
Made in Italy`))))),
|
126
|
-
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
|
127
|
-
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-info', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, (product === null || product === void 0 ? void 0 : product.info) ||
|
128
|
-
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
129
|
-
Made in Italy`))));
|
125
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
126
|
+
react_1.default.createElement("div", { className: '' },
|
127
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
128
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
|
129
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
|
130
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
|
131
|
+
productInfoText())),
|
132
|
+
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText())));
|
130
133
|
};
|
131
134
|
exports.default = (0, react_1.memo)(CommodityDetailDiroNew);
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.CommodityDetailDiroNew = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
+
const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
|
5
6
|
const _1 = tslib_1.__importDefault(require("."));
|
6
7
|
const create_1 = require("../../../../core/create");
|
7
8
|
const CommodityDetailDiroNew = (0, create_1.createMaterial)(_1.default, {
|
@@ -9,8 +10,41 @@ const CommodityDetailDiroNew = (0, create_1.createMaterial)(_1.default, {
|
|
9
10
|
icon: '',
|
10
11
|
category: 'popup',
|
11
12
|
type: 'CommodityDetailDiroNew',
|
13
|
+
related: {
|
14
|
+
settingRender: settingRender_1.default
|
15
|
+
},
|
12
16
|
defaulSetting: {
|
13
|
-
props: {
|
17
|
+
props: {
|
18
|
+
swiper: {
|
19
|
+
dotsAlign: 'left',
|
20
|
+
delay: 3
|
21
|
+
},
|
22
|
+
commodityStyles: {
|
23
|
+
price: {
|
24
|
+
color: '#000',
|
25
|
+
fontWeight: 'bold',
|
26
|
+
fontSize: 18
|
27
|
+
},
|
28
|
+
title: {
|
29
|
+
color: '#000',
|
30
|
+
fontSize: 13
|
31
|
+
},
|
32
|
+
collection: {
|
33
|
+
color: '#757575',
|
34
|
+
fontSize: 13
|
35
|
+
},
|
36
|
+
info: {
|
37
|
+
color: '#757575',
|
38
|
+
fontSize: 13
|
39
|
+
},
|
40
|
+
taxInfo: {
|
41
|
+
color: '#000',
|
42
|
+
fontWeight: 'bold',
|
43
|
+
fontSize: 13,
|
44
|
+
textAlign: 'right'
|
45
|
+
}
|
46
|
+
}
|
47
|
+
},
|
14
48
|
style: {}
|
15
49
|
},
|
16
50
|
w: 100,
|