pb-sxp-ui 1.2.2 → 1.2.4
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 +79 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -1
- package/dist/index.js +79 -49
- 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 +79 -49
- 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/Pagebuilder/type.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +1 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +0 -1
- package/es/core/components/SxpPageRender/Modal/index.js +16 -8
- package/es/core/components/SxpPageRender/Popup/index.js +1 -1
- package/es/core/components/SxpPageRender/RenderCard.js +15 -2
- package/es/core/components/SxpPageRender/index.js +1 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/es/materials/sxp/cta/AniLink/index.js +4 -1
- package/es/materials/sxp/cta/AniLinkPopup/index.js +9 -6
- package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +1 -1
- package/es/materials/sxp/popup/CommodityList/index.js +13 -7
- package/lib/core/Pagebuilder/type.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +1 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +0 -1
- package/lib/core/components/SxpPageRender/Modal/index.js +16 -8
- package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
- package/lib/core/components/SxpPageRender/RenderCard.js +15 -2
- package/lib/core/components/SxpPageRender/index.js +1 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/materials/sxp/cta/AniLink/index.js +4 -1
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +9 -6
- package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +13 -7
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
.pb-appoint-form {
|
2
2
|
position: relative;
|
3
|
+
height: 100%;
|
3
4
|
}
|
4
5
|
.pb-appoint-form-loading {
|
5
6
|
font-size: 24px;
|
@@ -660,6 +661,20 @@
|
|
660
661
|
.commondityDiroNew-swiper-clickable-center {
|
661
662
|
bottom: 14px !important;
|
662
663
|
}
|
664
|
+
.one-line-ellipsis {
|
665
|
+
text-overflow: ellipsis;
|
666
|
+
overflow: hidden;
|
667
|
+
word-break: break-all;
|
668
|
+
white-space: nowrap;
|
669
|
+
}
|
670
|
+
.two-line-ellipsis {
|
671
|
+
display: -webkit-box;
|
672
|
+
-webkit-box-orient: vertical;
|
673
|
+
-webkit-line-clamp: 2;
|
674
|
+
text-overflow: ellipsis;
|
675
|
+
overflow: hidden;
|
676
|
+
word-wrap: break-word;
|
677
|
+
}
|
663
678
|
|
664
679
|
.index-module_tow-line-ellipsis__3bKKx {
|
665
680
|
display: -webkit-box;
|
@@ -1088,6 +1103,20 @@
|
|
1088
1103
|
-webkit-animation-fill-mode: forwards;
|
1089
1104
|
animation-fill-mode: forwards;
|
1090
1105
|
}
|
1106
|
+
.index-module_one-line-ellipsis__HutE0 {
|
1107
|
+
text-overflow: ellipsis;
|
1108
|
+
overflow: hidden;
|
1109
|
+
word-break: break-all;
|
1110
|
+
white-space: nowrap;
|
1111
|
+
}
|
1112
|
+
.index-module_two-line-ellipsis__c8gRJ {
|
1113
|
+
display: -webkit-box;
|
1114
|
+
-webkit-box-orient: vertical;
|
1115
|
+
-webkit-line-clamp: 2;
|
1116
|
+
text-overflow: ellipsis;
|
1117
|
+
overflow: hidden;
|
1118
|
+
word-wrap: break-word;
|
1119
|
+
}
|
1091
1120
|
|
1092
1121
|
@-webkit-keyframes index-module_fadeIn__2E-dk {
|
1093
1122
|
0% {
|
@@ -1158,7 +1187,13 @@
|
|
1158
1187
|
transform: translateY(0);
|
1159
1188
|
z-index: 1000;
|
1160
1189
|
}
|
1161
|
-
.index-
|
1190
|
+
.index-module_one-line-ellipsis__NRiVV {
|
1191
|
+
text-overflow: ellipsis;
|
1192
|
+
overflow: hidden;
|
1193
|
+
word-break: break-all;
|
1194
|
+
white-space: nowrap;
|
1195
|
+
}
|
1196
|
+
.index-module_two-line-ellipsis__k-YGB {
|
1162
1197
|
display: -webkit-box;
|
1163
1198
|
-webkit-box-orient: vertical;
|
1164
1199
|
-webkit-line-clamp: 2;
|
package/dist/index.js
CHANGED
@@ -532,7 +532,7 @@ var DataSourceType;
|
|
532
532
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
533
533
|
})(DataSourceType || (DataSourceType = {}));
|
534
534
|
const DEFAULT_TAG = 'FOR U';
|
535
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false }) => {
|
535
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false, utmParameter }) => {
|
536
536
|
var _a, _b, _c;
|
537
537
|
const [rtcList, setRtcList] = useState([]);
|
538
538
|
const [tagList, setTagList] = useState([]);
|
@@ -614,7 +614,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
614
614
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
615
615
|
var _a, _b;
|
616
616
|
const key = val.split('=')[0];
|
617
|
-
return (_b = ((_a =
|
617
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
618
618
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
619
619
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
620
620
|
}
|
@@ -709,7 +709,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
709
709
|
const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
|
710
710
|
var _a, _b;
|
711
711
|
const key = val.split('=')[0];
|
712
|
-
return (_b = ((_a =
|
712
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
713
713
|
})) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
|
714
714
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
715
715
|
setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
|
@@ -8583,7 +8583,7 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8583
8583
|
* @Author: binruan@chatlabs.com
|
8584
8584
|
* @Date: 2023-11-02 18:34:34
|
8585
8585
|
* @LastEditors: binruan@chatlabs.com
|
8586
|
-
* @LastEditTime: 2024-07-
|
8586
|
+
* @LastEditTime: 2024-07-25 17:05:20
|
8587
8587
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8588
8588
|
*
|
8589
8589
|
*/
|
@@ -8639,19 +8639,25 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8639
8639
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
8640
8640
|
}, 300);
|
8641
8641
|
const handleTouchStart = (event) => {
|
8642
|
-
event.stopPropagation();
|
8643
|
-
touchRef.current = event.touches[0]
|
8644
|
-
fTouchRef.current = event.touches[0]
|
8642
|
+
// event.stopPropagation();
|
8643
|
+
touchRef.current = event.touches[0];
|
8644
|
+
fTouchRef.current = event.touches[0];
|
8645
8645
|
touchMoveRef.current = true;
|
8646
8646
|
};
|
8647
8647
|
const handleTouchMove = (event) => {
|
8648
|
-
event.stopPropagation();
|
8648
|
+
// event.stopPropagation();
|
8649
8649
|
requestAnimationFrame(() => {
|
8650
8650
|
var _a;
|
8651
8651
|
if (touchMoveRef.current && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop) === 0) {
|
8652
8652
|
const currentY = event.touches[0].clientY;
|
8653
|
-
const
|
8654
|
-
touchRef.current
|
8653
|
+
const currentX = event.touches[0].clientX;
|
8654
|
+
const diff = touchRef.current.clientY - currentY;
|
8655
|
+
touchRef.current = event.touches[0];
|
8656
|
+
const diffY = currentY - fTouchRef.current.clientY;
|
8657
|
+
const diffX = currentX - fTouchRef.current.clientX;
|
8658
|
+
if (Math.abs(diffX) > Math.abs(diffY)) {
|
8659
|
+
return;
|
8660
|
+
}
|
8655
8661
|
const ts = modalTrans - diff;
|
8656
8662
|
if (ts > 0) {
|
8657
8663
|
setModalTrans(ts);
|
@@ -8661,9 +8667,14 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8661
8667
|
};
|
8662
8668
|
const handleTouchEnd = (event) => {
|
8663
8669
|
var _a;
|
8664
|
-
event.stopPropagation();
|
8670
|
+
// event.stopPropagation();
|
8665
8671
|
if (touchMoveRef.current && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop) === 0) {
|
8666
|
-
const
|
8672
|
+
const diffY = event.changedTouches[0].clientY - fTouchRef.current.clientY;
|
8673
|
+
const diffX = event.changedTouches[0].clientX - fTouchRef.current.clientX;
|
8674
|
+
if (Math.abs(diffX) > Math.abs(diffY)) {
|
8675
|
+
return;
|
8676
|
+
}
|
8677
|
+
const diff = fTouchRef.current.clientY - touchRef.current.clientY;
|
8667
8678
|
if (diff > 0) {
|
8668
8679
|
setModalTrans(0);
|
8669
8680
|
}
|
@@ -10154,18 +10165,24 @@ const CommodityList$1 = (_a) => {
|
|
10154
10165
|
}
|
10155
10166
|
}, []);
|
10156
10167
|
return (React.createElement("div", { className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
10157
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
10168
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
10158
10169
|
return (React.createElement(EventProvider$1, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: css({
|
10159
10170
|
display: 'flex'
|
10160
10171
|
}) }),
|
10161
10172
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture }),
|
10162
|
-
React.createElement("div", { style: {
|
10173
|
+
React.createElement("div", { style: {
|
10174
|
+
flex: 1,
|
10175
|
+
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
|
10176
|
+
display: 'flex',
|
10177
|
+
flexDirection: 'column',
|
10178
|
+
justifyContent: 'space-between'
|
10179
|
+
} },
|
10163
10180
|
React.createElement("div", null,
|
10164
|
-
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
10165
|
-
__html: setFontForText((
|
10181
|
+
React.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
10182
|
+
__html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.title) !== null && _h !== void 0 ? _h : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10166
10183
|
} }),
|
10167
|
-
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
10168
|
-
__html: setFontForText((
|
10184
|
+
React.createElement("div", { className: 'two-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
10185
|
+
__html: setFontForText((_j = item === null || item === void 0 ? void 0 : item.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
10169
10186
|
} })),
|
10170
10187
|
React.createElement("div", { className: css({
|
10171
10188
|
display: 'flex',
|
@@ -10178,7 +10195,7 @@ const CommodityList$1 = (_a) => {
|
|
10178
10195
|
__html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10179
10196
|
} }),
|
10180
10197
|
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
|
10181
|
-
__html: setFontForText((
|
10198
|
+
__html: setFontForText((_l = (_k = item === null || item === void 0 ? void 0 : item.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', buttonStyle)
|
10182
10199
|
} })))));
|
10183
10200
|
})));
|
10184
10201
|
};
|
@@ -13911,7 +13928,7 @@ var settingRender$1 = [
|
|
13911
13928
|
}
|
13912
13929
|
];
|
13913
13930
|
|
13914
|
-
var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag"};
|
13931
|
+
var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag","one-line-ellipsis":"index-module_one-line-ellipsis__HutE0","two-line-ellipsis":"index-module_two-line-ellipsis__c8gRJ"};
|
13915
13932
|
|
13916
13933
|
const AniLink$1 = (_a) => {
|
13917
13934
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
@@ -13969,13 +13986,16 @@ const AniLink$1 = (_a) => {
|
|
13969
13986
|
if (isOnScreen) {
|
13970
13987
|
setVisible(true);
|
13971
13988
|
}
|
13989
|
+
else {
|
13990
|
+
setVisible(false);
|
13991
|
+
}
|
13972
13992
|
}, [isOnScreen]);
|
13973
13993
|
const aniNamStyle = useMemo(() => {
|
13974
13994
|
if (!visible)
|
13975
13995
|
return null;
|
13976
13996
|
return styles$1['animated-button'];
|
13977
13997
|
}, [visible]);
|
13978
|
-
return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign(Object.assign({}, style), ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: `${(_l = style === null || style === void 0 ? void 0 : style.height) !== null && _l !== void 0 ? _l : 0}px` }) }, props, { className: `${aniNamStyle} ${css(aniTimStyle)} one-line-ellipsis`, onClick: handleTo, dangerouslySetInnerHTML: {
|
13998
|
+
return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign(Object.assign({}, style), ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: `${(_l = style === null || style === void 0 ? void 0 : style.height) !== null && _l !== void 0 ? _l : 0}px` }) }, props, { className: `${aniNamStyle} ${css(aniTimStyle)} ${styles$1['one-line-ellipsis']}`, onClick: handleTo, dangerouslySetInnerHTML: {
|
13979
13999
|
__html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
13980
14000
|
} })));
|
13981
14001
|
};
|
@@ -14086,7 +14106,7 @@ const AniLink = createMaterial(AniLinkComponent, {
|
|
14086
14106
|
* @Author: binruan@chatlabs.com
|
14087
14107
|
* @Date: 2024-03-26 16:50:25
|
14088
14108
|
* @LastEditors: binruan@chatlabs.com
|
14089
|
-
* @LastEditTime: 2024-07-
|
14109
|
+
* @LastEditTime: 2024-07-25 15:02:45
|
14090
14110
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\settingRender.tsx
|
14091
14111
|
*
|
14092
14112
|
*/
|
@@ -14288,7 +14308,7 @@ var settingRender = [
|
|
14288
14308
|
},
|
14289
14309
|
{
|
14290
14310
|
type: 'TextSpace',
|
14291
|
-
name: ['props', 'ctaTempStyles', '
|
14311
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14292
14312
|
},
|
14293
14313
|
{
|
14294
14314
|
type: 'Color',
|
@@ -14340,7 +14360,7 @@ var settingRender = [
|
|
14340
14360
|
}
|
14341
14361
|
];
|
14342
14362
|
|
14343
|
-
var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn":"index-module_animated-fadeIn__8ZCbq","fadeIn":"index-module_fadeIn__2E-dk","animated-fadeOut":"index-module_animated-fadeOut__iK4oc","fadeOut":"index-module_fadeOut__MgevT","
|
14363
|
+
var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn":"index-module_animated-fadeIn__8ZCbq","fadeIn":"index-module_fadeIn__2E-dk","animated-fadeOut":"index-module_animated-fadeOut__iK4oc","fadeOut":"index-module_fadeOut__MgevT","one-line-ellipsis":"index-module_one-line-ellipsis__NRiVV","two-line-ellipsis":"index-module_two-line-ellipsis__k-YGB","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
|
14344
14364
|
|
14345
14365
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
14346
14366
|
const AniLinkPopup$1 = (_a) => {
|
@@ -14394,26 +14414,29 @@ const AniLinkPopup$1 = (_a) => {
|
|
14394
14414
|
if (isOnScreen) {
|
14395
14415
|
setVisible(true);
|
14396
14416
|
}
|
14417
|
+
else {
|
14418
|
+
setVisible(false);
|
14419
|
+
}
|
14397
14420
|
}, [isOnScreen]);
|
14398
14421
|
const aniNamStyle = useMemo(() => {
|
14399
14422
|
if (!visible)
|
14400
14423
|
return null;
|
14401
|
-
return startAni ? styles['animated-fadeIn'] :
|
14424
|
+
return startAni ? styles['animated-fadeIn'] : null;
|
14402
14425
|
}, [visible, startAni]);
|
14403
14426
|
return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
|
14404
14427
|
height: '40px',
|
14405
14428
|
lineHeight: '40px',
|
14406
14429
|
paddingLeft: '6px'
|
14407
|
-
} }, "Cta Title")) : (React.createElement("div", Object.assign({ ref: ref }, props, { className: `${css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css(aniTimStyle)}`, onClick: handleTo }),
|
14430
|
+
} }, "Cta Title")) : (React.createElement(React.Fragment, null, aniNamStyle ? (React.createElement("div", Object.assign({ ref: ref }, props, { className: `${css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css(aniTimStyle)}`, onClick: handleTo }),
|
14408
14431
|
React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
|
14409
14432
|
React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
|
14410
14433
|
React.createElement(Img$1, { src: src, rec: recData, item: (_y = (_w = (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) !== null && _w !== void 0 ? _w : (_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.bindProduct) !== null && _y !== void 0 ? _y : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
14411
|
-
|
14434
|
+
(!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
14412
14435
|
__html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.title) !== null && _z !== void 0 ? _z : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
14413
|
-
} }),
|
14414
|
-
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
|
14436
|
+
} })),
|
14437
|
+
React.createElement("div", { className: styles['one-line-ellipsis'], style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
|
14415
14438
|
__html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
14416
|
-
} })))));
|
14439
|
+
} }))) : (React.createElement("div", { ref: ref, style: { position: 'absolute', height: '50px', width: '50px', bottom: 0, right: 0, zIndex: 1000 } }))))));
|
14417
14440
|
};
|
14418
14441
|
var AniLinkPopupComponent = memo(AniLinkPopup$1);
|
14419
14442
|
|
@@ -15139,7 +15162,7 @@ var PictureGroup$3 = memo(PictureGroup$2);
|
|
15139
15162
|
* @Author: binruan@chatlabs.com
|
15140
15163
|
* @Date: 2024-01-15 19:03:09
|
15141
15164
|
* @LastEditors: binruan@chatlabs.com
|
15142
|
-
* @LastEditTime: 2024-07-
|
15165
|
+
* @LastEditTime: 2024-07-25 18:14:29
|
15143
15166
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
15144
15167
|
*
|
15145
15168
|
*/
|
@@ -15176,7 +15199,6 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
15176
15199
|
}
|
15177
15200
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
15178
15201
|
}, [isShowMore, tags]);
|
15179
|
-
console.log(hashTagStyle, '111');
|
15180
15202
|
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
|
15181
15203
|
React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) },
|
15182
15204
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
@@ -15247,27 +15269,35 @@ function withBindDataSource(Component) {
|
|
15247
15269
|
* @Author: binruan@chatlabs.com
|
15248
15270
|
* @Date: 2023-12-26 16:11:34
|
15249
15271
|
* @LastEditors: binruan@chatlabs.com
|
15250
|
-
* @LastEditTime: 2024-07-
|
15272
|
+
* @LastEditTime: 2024-07-25 18:47:37
|
15251
15273
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
15252
15274
|
*
|
15253
15275
|
*/
|
15254
15276
|
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
|
15277
|
+
var _a, _b, _c, _d, _e;
|
15255
15278
|
const { schema } = useEditor();
|
15279
|
+
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15280
|
+
return null;
|
15281
|
+
let cta = null;
|
15282
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
15283
|
+
cta = '多商品CTA';
|
15284
|
+
}
|
15285
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
15286
|
+
cta = '商品CTA';
|
15287
|
+
}
|
15288
|
+
else {
|
15289
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
15290
|
+
}
|
15291
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15256
15292
|
const renderComp = useMemo(() => {
|
15257
15293
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
15258
15294
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15259
15295
|
return null;
|
15260
|
-
|
15261
|
-
if ((
|
15262
|
-
cta = '多商品CTA';
|
15263
|
-
}
|
15264
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
15265
|
-
cta = '商品CTA';
|
15266
|
-
}
|
15296
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) ;
|
15297
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
|
15267
15298
|
else {
|
15268
|
-
|
15299
|
+
(_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
15269
15300
|
}
|
15270
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15271
15301
|
//如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
15272
15302
|
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type)))
|
15273
15303
|
return;
|
@@ -15293,7 +15323,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
|
|
15293
15323
|
else {
|
15294
15324
|
return null;
|
15295
15325
|
}
|
15296
|
-
}, [rec, resolver, tempMap, schema]);
|
15326
|
+
}, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id]);
|
15297
15327
|
return React.createElement(React.Fragment, null, renderComp);
|
15298
15328
|
};
|
15299
15329
|
var RenderCard$1 = memo(RenderCard);
|
@@ -15381,7 +15411,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15381
15411
|
* @Author: binruan@chatlabs.com
|
15382
15412
|
* @Date: 2024-01-15 19:03:09
|
15383
15413
|
* @LastEditors: binruan@chatlabs.com
|
15384
|
-
* @LastEditTime: 2024-07-
|
15414
|
+
* @LastEditTime: 2024-07-25 17:10:01
|
15385
15415
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15386
15416
|
*
|
15387
15417
|
*/
|
@@ -15658,7 +15688,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15658
15688
|
return;
|
15659
15689
|
const t = new Date() - curTime.current;
|
15660
15690
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.openSlideSkip) && t >= ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.slideSkipStartTime) !== null && _a !== void 0 ? _a : 0) && getSlideSkipState() && item) {
|
15661
|
-
const link = ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.
|
15691
|
+
const link = ((_d = (_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.link) || ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.link) || ((_g = item === null || item === void 0 ? void 0 : item.product) === null || _g === void 0 ? void 0 : _g.link);
|
15662
15692
|
const product = (item === null || item === void 0 ? void 0 : item.product) || ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct) || ((_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]);
|
15663
15693
|
if (link) {
|
15664
15694
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
@@ -16203,7 +16233,7 @@ var index$1 = memo(DiyPortalPreview);
|
|
16203
16233
|
* @Author: binruan@chatlabs.com
|
16204
16234
|
* @Date: 2023-10-31 10:56:01
|
16205
16235
|
* @LastEditors: binruan@chatlabs.com
|
16206
|
-
* @LastEditTime: 2024-07-
|
16236
|
+
* @LastEditTime: 2024-07-25 17:15:36
|
16207
16237
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
16208
16238
|
*
|
16209
16239
|
*/
|
@@ -16256,7 +16286,7 @@ const Popup = () => {
|
|
16256
16286
|
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';
|
16257
16287
|
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';
|
16258
16288
|
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
16259
|
-
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: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
|
16289
|
+
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: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
|
16260
16290
|
}
|
16261
16291
|
else {
|
16262
16292
|
return React.createElement(React.Fragment, null);
|
@@ -16270,7 +16300,7 @@ const Popup = () => {
|
|
16270
16300
|
* @Author: binruan@chatlabs.com
|
16271
16301
|
* @Date: 2024-01-15 19:03:09
|
16272
16302
|
* @LastEditors: binruan@chatlabs.com
|
16273
|
-
* @LastEditTime: 2024-
|
16303
|
+
* @LastEditTime: 2024-07-24 16:35:44
|
16274
16304
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
16275
16305
|
*
|
16276
16306
|
*/
|
@@ -16294,7 +16324,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
16294
16324
|
return searchParams;
|
16295
16325
|
}, []);
|
16296
16326
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
16297
|
-
React.createElement(SxpDataSourceProvider$1, { 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, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, render: ({ rtcList, tagList }) => {
|
16327
|
+
React.createElement(SxpDataSourceProvider$1, { 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, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, render: ({ rtcList, tagList }) => {
|
16298
16328
|
var _a;
|
16299
16329
|
return (React.createElement(React.Fragment, null,
|
16300
16330
|
React.createElement(SxpPageRender, 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 })),
|