pb-sxp-ui 1.0.9 → 1.0.11
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 +17 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -9
- 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 +17 -9
- 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/SxpPageRender/Nudge/index.js +2 -2
- package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/index.js +4 -4
- package/lib/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -11677,7 +11677,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
|
|
11677
11677
|
* @Author: binruan@chatlabs.com
|
11678
11678
|
* @Date: 2024-01-10 10:58:24
|
11679
11679
|
* @LastEditors: binruan@chatlabs.com
|
11680
|
-
* @LastEditTime: 2024-04-15
|
11680
|
+
* @LastEditTime: 2024-04-15 16:48:54
|
11681
11681
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
11682
11682
|
*
|
11683
11683
|
*/
|
@@ -11704,7 +11704,7 @@ const WaterFall = (props) => {
|
|
11704
11704
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
11705
11705
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
11706
11706
|
}
|
11707
|
-
reportTagsView(0);
|
11707
|
+
reportTagsView(cacheActiveIndex || 0);
|
11708
11708
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
11709
11709
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
11710
11710
|
setTimeout(() => {
|
@@ -12450,8 +12450,16 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
|
|
12450
12450
|
};
|
12451
12451
|
var RenderCard$1 = memo(RenderCard);
|
12452
12452
|
|
12453
|
+
/*
|
12454
|
+
* @Author: binruan@chatlabs.com
|
12455
|
+
* @Date: 2024-03-26 10:07:41
|
12456
|
+
* @LastEditors: binruan@chatlabs.com
|
12457
|
+
* @LastEditTime: 2024-04-15 14:27:18
|
12458
|
+
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
|
12459
|
+
*
|
12460
|
+
*/
|
12453
12461
|
const Nudge = ({ nudge }) => {
|
12454
|
-
return (React.createElement(
|
12462
|
+
return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
|
12455
12463
|
marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
|
12456
12464
|
width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
|
12457
12465
|
height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
|
@@ -12459,14 +12467,14 @@ const Nudge = ({ nudge }) => {
|
|
12459
12467
|
borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
|
12460
12468
|
} },
|
12461
12469
|
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
|
12462
|
-
React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
|
12470
|
+
React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
|
12463
12471
|
};
|
12464
12472
|
|
12465
12473
|
/*
|
12466
12474
|
* @Author: binruan@chatlabs.com
|
12467
12475
|
* @Date: 2024-01-15 19:03:09
|
12468
12476
|
* @LastEditors: binruan@chatlabs.com
|
12469
|
-
* @LastEditTime: 2024-04-
|
12477
|
+
* @LastEditTime: 2024-04-15 16:41:07
|
12470
12478
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12471
12479
|
*
|
12472
12480
|
*/
|
@@ -12632,12 +12640,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12632
12640
|
return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent }));
|
12633
12641
|
}
|
12634
12642
|
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) {
|
12635
|
-
return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value,
|
12643
|
+
return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
|
12636
12644
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
12637
12645
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
12638
12646
|
const Component = withBindDataSource(t);
|
12639
12647
|
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
12640
|
-
return (React.createElement(Component, Object.assign({ key: index
|
12648
|
+
return (React.createElement(Component, Object.assign({ key: `${index}${idx}`, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }), index: index })));
|
12641
12649
|
});
|
12642
12650
|
}
|
12643
12651
|
return null;
|
@@ -12651,11 +12659,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12651
12659
|
React.createElement(Nudge, { nudge: nudge }),
|
12652
12660
|
React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
12653
12661
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
|
12654
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', 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 }),
|
12662
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', 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: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
|
12655
12663
|
React.createElement(Hashtag$1, { 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, hashTagStyle: hashTagStyle }))));
|
12656
12664
|
}
|
12657
12665
|
return null;
|
12658
|
-
}, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
|
12666
|
+
}, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle, globalConfig]);
|
12659
12667
|
const renderLikeButton = useCallback((rec, index) => {
|
12660
12668
|
var _a, _b;
|
12661
12669
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|