pb-sxp-ui 1.8.8 → 1.9.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 +240 -253
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +67 -4
- package/dist/index.js +240 -253
- 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 +240 -253
- 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/index.js +4 -3
- package/es/core/components/SxpPageCore/index.d.ts +1 -1
- package/es/core/components/SxpPageCore/index.js +6 -7
- package/es/core/components/SxpPageRender/ExpandableText.js +1 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +2 -2
- package/es/core/components/SxpPageRender/Modal/index.js +44 -6
- package/es/core/components/SxpPageRender/index.js +3 -3
- package/es/core/components/SxpPageRender/typing.d.ts +0 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -4
- package/es/core/context/SxpDataSourceProvider.js +25 -51
- package/es/core/hooks/useFocusTrap.d.ts +2 -0
- package/es/core/hooks/useFocusTrap.js +37 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +4 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/es/materials/sxp/popup/CommodityList/index.js +32 -28
- package/es/materials/sxp/template/Appoint/index.js +1 -1
- package/es/materials/sxp/template/Commodity/index.js +4 -4
- package/es/materials/sxp/template/CommodityDiro/index.js +4 -4
- package/es/materials/sxp/template/CommodityDiroNew/index.js +4 -4
- package/es/materials/sxp/template/Link/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +23 -42
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +24 -42
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +25 -44
- package/es/materials/sxp/template/components/EventProvider.d.ts +2 -0
- package/es/materials/sxp/template/components/EventProvider.js +22 -11
- package/es/materials/sxp/template/components/Scroll.js +1 -1
- package/lib/core/Pagebuilder/index.js +4 -3
- package/lib/core/components/SxpPageCore/index.d.ts +1 -1
- package/lib/core/components/SxpPageCore/index.js +5 -6
- package/lib/core/components/SxpPageRender/ExpandableText.js +1 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +2 -2
- package/lib/core/components/SxpPageRender/Modal/index.js +44 -6
- package/lib/core/components/SxpPageRender/index.js +3 -3
- package/lib/core/components/SxpPageRender/typing.d.ts +0 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -4
- package/lib/core/context/SxpDataSourceProvider.js +25 -51
- package/lib/core/hooks/useFocusTrap.d.ts +2 -0
- package/lib/core/hooks/useFocusTrap.js +39 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +32 -28
- package/lib/materials/sxp/template/Appoint/index.js +1 -1
- package/lib/materials/sxp/template/Commodity/index.js +4 -4
- package/lib/materials/sxp/template/CommodityDiro/index.js +4 -4
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +4 -4
- package/lib/materials/sxp/template/Link/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +22 -41
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +23 -41
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +24 -43
- package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -0
- package/lib/materials/sxp/template/components/EventProvider.js +21 -10
- package/lib/materials/sxp/template/components/Scroll.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -425,7 +425,7 @@ const Pagebuilder = {
|
|
425
425
|
const tenantId = builder.getTenantId();
|
426
426
|
const appId = builder.getAppId();
|
427
427
|
const apiUrl = builder.getApiUrl();
|
428
|
-
return fetch(`${apiUrl}/storefront/v1/page
|
428
|
+
return fetch(`${apiUrl}/storefront/v1/page?id=` + id, {
|
429
429
|
method: 'get',
|
430
430
|
headers: {
|
431
431
|
'x-tenant-id': tenantId || '',
|
@@ -437,8 +437,9 @@ const Pagebuilder = {
|
|
437
437
|
if (!result.success) {
|
438
438
|
return undefined;
|
439
439
|
}
|
440
|
-
const
|
441
|
-
|
440
|
+
const decodeData = unzip((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data);
|
441
|
+
result.data.data = decodeData;
|
442
|
+
return result.data;
|
442
443
|
}));
|
443
444
|
}),
|
444
445
|
getSxpRecommendVideoData: (dataId) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -642,8 +643,8 @@ var DataSourceType;
|
|
642
643
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
643
644
|
})(DataSourceType || (DataSourceType = {}));
|
644
645
|
const DEFAULT_TAG = 'FOR U';
|
645
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList
|
646
|
-
var _a, _b, _c
|
646
|
+
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, channelQueryList }) => {
|
647
|
+
var _a, _b, _c;
|
647
648
|
const [rtcList, setRtcList] = React.useState([]);
|
648
649
|
const [tagList, setTagList] = React.useState([]);
|
649
650
|
const [loading, setLoading] = React.useState(false);
|
@@ -665,19 +666,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
665
666
|
const checkCommodityIndexRef = React.useRef(-1);
|
666
667
|
const popupCurTimeRef = React.useRef(null);
|
667
668
|
const [isNoMoreData, setIsNoMoreData] = React.useState(false);
|
668
|
-
const [globalConfig, setGlobalConfig] = React.useState((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.globalConfig);
|
669
|
-
const [pageData, setPageData] = React.useState(data);
|
670
|
-
const [showConsent, setShowConsent] = React.useState(false);
|
671
|
-
const [layoutVariantId, setLayoutVariantId] = React.useState();
|
672
|
-
const isShowTag = React.useMemo(() => {
|
673
|
-
var _a, _b, _c;
|
674
|
-
return !!((_c = (_b = (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.isShowTag);
|
675
|
-
}, [pageData]);
|
676
669
|
const isShowConsent = React.useMemo(() => {
|
677
670
|
var _a, _b, _c, _d;
|
678
|
-
return (((
|
679
|
-
|
680
|
-
}, [isAgreePolicy, globalConfig, isOpenConsent, isEditor, showConsent]);
|
671
|
+
return (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent;
|
672
|
+
}, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
|
681
673
|
const getFilterRecList = React.useCallback((data) => {
|
682
674
|
var _a;
|
683
675
|
const recList = data === null || data === void 0 ? void 0 : data.recList;
|
@@ -739,14 +731,14 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
739
731
|
}, [bffDataSource]);
|
740
732
|
// 获取推荐视频数据
|
741
733
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
742
|
-
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s
|
743
|
-
query = Object.assign(Object.assign(Object.assign({ maxSize: (
|
734
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
735
|
+
query = Object.assign(Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
|
744
736
|
if (utmVal) {
|
745
|
-
const val = (
|
737
|
+
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
746
738
|
var _a, _b;
|
747
739
|
const key = val.split('=')[0];
|
748
740
|
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);
|
749
|
-
})) === null ||
|
741
|
+
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
750
742
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
751
743
|
}
|
752
744
|
if (isEditor) {
|
@@ -759,17 +751,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
759
751
|
let list = [];
|
760
752
|
let result = null;
|
761
753
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
762
|
-
var _u, _v, _w, _x, _y
|
754
|
+
var _t, _u, _v, _w, _x, _y;
|
763
755
|
query.pageNum = pageNum;
|
764
756
|
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
765
757
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
766
758
|
return undefined;
|
767
759
|
}
|
768
760
|
setLoading(false);
|
769
|
-
list = list.concat((
|
761
|
+
list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
|
770
762
|
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
|
771
763
|
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
|
772
|
-
const isNotNullList = (
|
764
|
+
const isNotNullList = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
773
765
|
if (isNotNullList) {
|
774
766
|
pageNum = pageNum + 1;
|
775
767
|
yield recurveRecList(query);
|
@@ -777,11 +769,11 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
777
769
|
});
|
778
770
|
yield recurveRecList(query);
|
779
771
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
780
|
-
setCurReqInfo({ rtc: (
|
772
|
+
setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
|
781
773
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
782
774
|
}
|
783
775
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
784
|
-
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (
|
776
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
|
785
777
|
}
|
786
778
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
787
779
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
@@ -791,8 +783,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
791
783
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
792
784
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
793
785
|
let list = [];
|
794
|
-
list = list.concat((
|
795
|
-
const isNotNullList = (
|
786
|
+
list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
|
787
|
+
const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
796
788
|
if (!isNotNullList) {
|
797
789
|
setIsNoMoreData(true);
|
798
790
|
}
|
@@ -801,12 +793,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
801
793
|
return result === null || result === void 0 ? void 0 : result.data;
|
802
794
|
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
803
795
|
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
804
|
-
var _0, _1, _2
|
796
|
+
var _z, _0, _1, _2;
|
805
797
|
if (rtcList.length <= 0) {
|
806
798
|
return;
|
807
799
|
}
|
808
800
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
809
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
801
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: (_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
810
802
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
811
803
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
812
804
|
return data;
|
@@ -824,7 +816,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
824
816
|
};
|
825
817
|
}
|
826
818
|
const sessionID = storeAndLoadFeSessionId();
|
827
|
-
const ef = Object.assign(Object.assign(Object.assign(Object.assign(
|
819
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() }));
|
828
820
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
829
821
|
const realEventInfo = Object.entries(ef)
|
830
822
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -838,7 +830,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
838
830
|
body: { userInfo: realUserInfo, eventInfo: realEventInfo },
|
839
831
|
type: 'beacon'
|
840
832
|
});
|
841
|
-
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview
|
833
|
+
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
842
834
|
const bffFbReport = React.useCallback(({ eventName, product }) => {
|
843
835
|
var _a, _b, _c, _d, _e;
|
844
836
|
if (!enableReportEvent ||
|
@@ -924,17 +916,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
924
916
|
}), [bffFetch]);
|
925
917
|
// 获取 Tag
|
926
918
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
927
|
-
var _4, _5, _6, _7
|
919
|
+
var _3, _4, _5, _6, _7;
|
928
920
|
if (!utmVal || !isShowTag)
|
929
921
|
return;
|
930
922
|
try {
|
931
|
-
const val = (
|
923
|
+
const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
|
932
924
|
var _a, _b;
|
933
925
|
const key = val.split('=')[0];
|
934
926
|
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);
|
935
|
-
})) === null ||
|
927
|
+
})) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
|
936
928
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
937
|
-
setTagList((
|
929
|
+
setTagList((_7 = (_6 = result === null || result === void 0 ? void 0 : result.data) === null || _6 === void 0 ? void 0 : _6.tags) !== null && _7 !== void 0 ? _7 : []);
|
938
930
|
}
|
939
931
|
catch (e) {
|
940
932
|
console.log('e', e);
|
@@ -999,25 +991,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
999
991
|
bffGetTagList();
|
1000
992
|
getRecommendVideos()
|
1001
993
|
.then((data) => {
|
1002
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
1003
994
|
if (data) {
|
1004
995
|
setRtcList(getFilterRecList(data));
|
1005
996
|
setCacheRtcList(getFilterRecList(data));
|
1006
|
-
if (data === null || data === void 0 ? void 0 : data.layoutVariantId) {
|
1007
|
-
const id = (_b = (_a = data === null || data === void 0 ? void 0 : data.layoutVariantId) === null || _a === void 0 ? void 0 : _a.split('-')) === null || _b === void 0 ? void 0 : _b[1];
|
1008
|
-
if (id) {
|
1009
|
-
setLayoutVariantId(id);
|
1010
|
-
const curData = dataList === null || dataList === void 0 ? void 0 : dataList.find((item) => (item === null || item === void 0 ? void 0 : item.id) === id);
|
1011
|
-
if (curData) {
|
1012
|
-
setPageData(curData);
|
1013
|
-
document.title = (_c = curData === null || curData === void 0 ? void 0 : curData.name) !== null && _c !== void 0 ? _c : 'home';
|
1014
|
-
setGlobalConfig((_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.globalConfig);
|
1015
|
-
onUpdateSchema === null || onUpdateSchema === void 0 ? void 0 : onUpdateSchema(curData === null || curData === void 0 ? void 0 : curData.data);
|
1016
|
-
if ((_k = (_j = (_h = (_g = (_f = (_e = curData === null || curData === void 0 ? void 0 : curData.data) === null || _e === void 0 ? void 0 : _e.globalConfig) === null || _f === void 0 ? void 0 : _f.consent) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.privacy_necessity)
|
1017
|
-
setShowConsent(true);
|
1018
|
-
}
|
1019
|
-
}
|
1020
|
-
}
|
1021
997
|
}
|
1022
998
|
})
|
1023
999
|
.finally(() => {
|
@@ -1102,13 +1078,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1102
1078
|
checkCommodityIndexRef,
|
1103
1079
|
isEditor,
|
1104
1080
|
isNoMoreData
|
1105
|
-
} }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (
|
1081
|
+
} }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
|
1106
1082
|
rtcList,
|
1107
1083
|
mutateLike: bffMutateLike,
|
1108
1084
|
mutateUnlike: bffMutateUnlike,
|
1109
1085
|
submitForm: bffSubmitForm,
|
1110
|
-
tagList
|
1111
|
-
pageData
|
1086
|
+
tagList
|
1112
1087
|
}))));
|
1113
1088
|
};
|
1114
1089
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
@@ -9022,7 +8997,7 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
9022
8997
|
* @Author: binruan@chatlabs.com
|
9023
8998
|
* @Date: 2023-11-02 18:34:34
|
9024
8999
|
* @LastEditors: binruan@chatlabs.com
|
9025
|
-
* @LastEditTime: 2024-11-
|
9000
|
+
* @LastEditTime: 2024-11-19 14:28:41
|
9026
9001
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
9027
9002
|
*
|
9028
9003
|
*/
|
@@ -9033,6 +9008,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9033
9008
|
const fTouchRef = React.useRef(null);
|
9034
9009
|
const touchMoveRef = React.useRef(null);
|
9035
9010
|
const ref = React.useRef(null);
|
9011
|
+
const modalRef = React.useRef(null);
|
9036
9012
|
const MODAL_DEF_TRANS = fullHeight * 0.2;
|
9037
9013
|
const MODAL_DEF_CON_H = isFullScreen ? fullHeight : fullHeight * 0.8;
|
9038
9014
|
const [modalTrans, setModalTrans] = React.useState(MODAL_DEF_TRANS);
|
@@ -9080,6 +9056,46 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9080
9056
|
const child = React.useCallback(() => {
|
9081
9057
|
return children;
|
9082
9058
|
}, [_popup, openState, globalConfig]);
|
9059
|
+
React.useEffect(() => {
|
9060
|
+
const trapFocus = (element) => {
|
9061
|
+
var focusableEls = element === null || element === void 0 ? void 0 : element.querySelectorAll('a, a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');
|
9062
|
+
var firstFocusableEl = focusableEls === null || focusableEls === void 0 ? void 0 : focusableEls[0];
|
9063
|
+
var lastFocusableEl = focusableEls === null || focusableEls === void 0 ? void 0 : focusableEls[(focusableEls === null || focusableEls === void 0 ? void 0 : focusableEls.length) - 1];
|
9064
|
+
var KEYCODE_TAB = 9;
|
9065
|
+
element.addEventListener('keydown', function (e) {
|
9066
|
+
if (e.key === 'Escape' || e.key === 'Esc') {
|
9067
|
+
// 在这里执行按下 Esc 键时的操作
|
9068
|
+
handleClose();
|
9069
|
+
e.preventDefault();
|
9070
|
+
}
|
9071
|
+
var isTabPressed = e.key === 'Tab' || e.keyCode === KEYCODE_TAB;
|
9072
|
+
if (!isTabPressed) {
|
9073
|
+
return;
|
9074
|
+
}
|
9075
|
+
if (e.shiftKey) {
|
9076
|
+
/* shift + tab */
|
9077
|
+
if ((document === null || document === void 0 ? void 0 : document.activeElement) === firstFocusableEl) {
|
9078
|
+
lastFocusableEl === null || lastFocusableEl === void 0 ? void 0 : lastFocusableEl.focus();
|
9079
|
+
e.preventDefault();
|
9080
|
+
}
|
9081
|
+
}
|
9082
|
+
else {
|
9083
|
+
/* tab */
|
9084
|
+
if ((document === null || document === void 0 ? void 0 : document.activeElement) === lastFocusableEl) {
|
9085
|
+
firstFocusableEl === null || firstFocusableEl === void 0 ? void 0 : firstFocusableEl.focus();
|
9086
|
+
e.preventDefault();
|
9087
|
+
}
|
9088
|
+
}
|
9089
|
+
});
|
9090
|
+
firstFocusableEl === null || firstFocusableEl === void 0 ? void 0 : firstFocusableEl.focus();
|
9091
|
+
};
|
9092
|
+
if (modalRef === null || modalRef === void 0 ? void 0 : modalRef.current)
|
9093
|
+
trapFocus(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current);
|
9094
|
+
return () => {
|
9095
|
+
var _a;
|
9096
|
+
(_a = modalRef === null || modalRef === void 0 ? void 0 : modalRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', trapFocus);
|
9097
|
+
};
|
9098
|
+
}, [modalRef, isShow, _popup]);
|
9083
9099
|
if (!modalEleRef.current)
|
9084
9100
|
return null;
|
9085
9101
|
const handleClose = lodash.debounce(() => {
|
@@ -9144,7 +9160,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9144
9160
|
width: `calc(100% - ${((_r = (_q = (_p = (_o = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _o === void 0 ? void 0 : _o.props) === null || _p === void 0 ? void 0 : _p.popupBg) === null || _q === void 0 ? void 0 : _q.horizontalMargin) !== null && _r !== void 0 ? _r : 0) * 2}px)`,
|
9145
9161
|
height: '100%'
|
9146
9162
|
} },
|
9147
|
-
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, role: 'dialog', "aria-label": (_s = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _s === void 0 ? void 0 : _s.displayName, "aria-modal": true, style: Object.assign(Object.assign({ padding, animationDuration: ((_t = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _t !== void 0 ? _t : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
9163
|
+
React.createElement("div", Object.assign({ ref: modalRef, className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, role: 'dialog', "aria-label": (_s = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _s === void 0 ? void 0 : _s.displayName, "aria-modal": true, "aria-labelledby": 'modal-content', style: Object.assign(Object.assign({ padding, animationDuration: ((_t = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _t !== void 0 ? _t : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
9148
9164
|
transform: `translateY(${modalTrans}px)`
|
9149
9165
|
})), { overflow: 'hidden', borderRadius: `${(_x = (_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.borderRadius) !== null && _x !== void 0 ? _x : 0}px`, zIndex: 9 }), onClick: (e) => {
|
9150
9166
|
e.stopPropagation();
|
@@ -9154,18 +9170,18 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9154
9170
|
onTouchStart: handleTouchStart,
|
9155
9171
|
onTouchEnd: handleTouchEnd
|
9156
9172
|
})),
|
9157
|
-
React.createElement("
|
9158
|
-
React.createElement("img", { src: (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _y !== void 0 ? _y : closeIcon$1, alt: 'close button', className: 'modal-icon' })),
|
9159
|
-
React.createElement("div", Object.assign({ ref: ref, style: {
|
9173
|
+
React.createElement("div", Object.assign({ id: 'modal-content', ref: ref, style: {
|
9160
9174
|
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
|
9161
9175
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden',
|
9162
9176
|
zIndex: 1
|
9163
|
-
} }, (((
|
9177
|
+
} }, (((_z = (_y = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _y === void 0 ? void 0 : _y.props) === null || _z === void 0 ? void 0 : _z.enableFixedCloseButton) && {
|
9164
9178
|
onScroll: (e) => {
|
9165
9179
|
var _a;
|
9166
9180
|
setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
|
9167
9181
|
}
|
9168
|
-
})), child())
|
9182
|
+
})), child()),
|
9183
|
+
React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
|
9184
|
+
React.createElement("img", { src: (_0 = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _0 !== void 0 ? _0 : closeIcon$1, alt: 'close button', className: 'modal-icon' }))))))), modalEleRef.current);
|
9169
9185
|
};
|
9170
9186
|
var Modal$1 = React.memo(Modal);
|
9171
9187
|
|
@@ -9173,7 +9189,7 @@ var Modal$1 = React.memo(Modal);
|
|
9173
9189
|
* @Author: binruan@chatlabs.com
|
9174
9190
|
* @Date: 2023-12-26 16:11:34
|
9175
9191
|
* @LastEditors: binruan@chatlabs.com
|
9176
|
-
* @LastEditTime: 2024-
|
9192
|
+
* @LastEditTime: 2024-11-07 14:27:18
|
9177
9193
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
|
9178
9194
|
*
|
9179
9195
|
*/
|
@@ -9230,7 +9246,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
9230
9246
|
wordBreak: 'break-word'
|
9231
9247
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
9232
9248
|
React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
9233
|
-
text && isPost && isShow && (React.createElement("
|
9249
|
+
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
9234
9250
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
|
9235
9251
|
} }))));
|
9236
9252
|
};
|
@@ -9283,7 +9299,7 @@ var FormatImage$1 = React.memo(FormatImage);
|
|
9283
9299
|
* @Author: binruan@chatlabs.com
|
9284
9300
|
* @Date: 2024-03-20 10:27:32
|
9285
9301
|
* @LastEditors: binruan@chatlabs.com
|
9286
|
-
* @LastEditTime: 2024-
|
9302
|
+
* @LastEditTime: 2024-11-19 10:29:18
|
9287
9303
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Scroll.tsx
|
9288
9304
|
*
|
9289
9305
|
*/
|
@@ -9295,7 +9311,7 @@ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }
|
|
9295
9311
|
if (enableSlideActive)
|
9296
9312
|
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9297
9313
|
}, [popupDetailData, enableSlideActive]);
|
9298
|
-
return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
|
9314
|
+
return (React.createElement(Swiper, { role: 'list', tag: 'ul', ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
|
9299
9315
|
};
|
9300
9316
|
var Scroll$1 = React.memo(Scroll);
|
9301
9317
|
|
@@ -9508,7 +9524,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9508
9524
|
};
|
9509
9525
|
const renderBtn = () => {
|
9510
9526
|
var _a, _b;
|
9511
|
-
return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("
|
9527
|
+
return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("a", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', role: 'button', tabIndex: 0, onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle },
|
9512
9528
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
9513
9529
|
__html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
|
9514
9530
|
} })))));
|
@@ -9546,7 +9562,9 @@ const CommodityDetail$1 = (_a) => {
|
|
9546
9562
|
return (React.createElement(React.Fragment, null,
|
9547
9563
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
9548
9564
|
React.createElement("div", { style: { position: 'relative' } },
|
9549
|
-
product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, {
|
9565
|
+
product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, { a11y: {
|
9566
|
+
enabled: true
|
9567
|
+
}, height: height, modules: [Pagination, Autoplay], pagination: {
|
9550
9568
|
clickable: true,
|
9551
9569
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9552
9570
|
clickableClass: getDotsAlign,
|
@@ -10535,7 +10553,7 @@ Made in Italy` })));
|
|
10535
10553
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
|
10536
10554
|
__html: setFontForText((_2 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _2 !== void 0 ? _2 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
10537
10555
|
} }))),
|
10538
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("
|
10556
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("a", { "aria-label": (_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', role: 'button', tabIndex: 0, onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
10539
10557
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10540
10558
|
__html: setFontForText((_4 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _4 !== void 0 ? _4 : 'Shop now', buttonStyle)
|
10541
10559
|
} }))),
|
@@ -11013,39 +11031,43 @@ const CommodityList$1 = (_a) => {
|
|
11013
11031
|
eventName: 'PageView'
|
11014
11032
|
});
|
11015
11033
|
}, []);
|
11016
|
-
return (React.createElement("
|
11034
|
+
return (React.createElement("ul", { role: 'list', className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
11017
11035
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
11018
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("
|
11019
|
-
|
11020
|
-
}), onClick: () => handleClick(item, index) }),
|
11021
|
-
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, enableEventReport: false }),
|
11022
|
-
React.createElement("div", { style: {
|
11023
|
-
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)`,
|
11036
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: () => handleClick(item, index) },
|
11037
|
+
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
|
11024
11038
|
display: 'flex',
|
11025
|
-
|
11026
|
-
|
11027
|
-
|
11028
|
-
|
11029
|
-
|
11030
|
-
|
11031
|
-
} })
|
11032
|
-
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: {
|
11033
|
-
__html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.collection) !== null && _h !== void 0 ? _h : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
11034
|
-
} })),
|
11035
|
-
React.createElement("div", { className: css.css({
|
11039
|
+
alignItems: 'normal',
|
11040
|
+
width: '100%',
|
11041
|
+
textAlign: 'left'
|
11042
|
+
}) }, props),
|
11043
|
+
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, enableEventReport: false }),
|
11044
|
+
React.createElement("div", { style: {
|
11045
|
+
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)`,
|
11036
11046
|
display: 'flex',
|
11037
|
-
|
11038
|
-
justifyContent: 'space-between'
|
11039
|
-
|
11040
|
-
overflow: 'hidden'
|
11041
|
-
}) },
|
11047
|
+
flexDirection: 'column',
|
11048
|
+
justifyContent: 'space-between'
|
11049
|
+
} },
|
11042
11050
|
React.createElement("div", null,
|
11043
|
-
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.
|
11044
|
-
__html: (
|
11051
|
+
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: {
|
11052
|
+
__html: setFontForText((_g = item === null || item === void 0 ? void 0 : item.title) !== null && _g !== void 0 ? _g : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
11053
|
+
} }),
|
11054
|
+
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: {
|
11055
|
+
__html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.collection) !== null && _h !== void 0 ? _h : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
11045
11056
|
} })),
|
11046
|
-
React.createElement("div", { className:
|
11047
|
-
|
11048
|
-
|
11057
|
+
React.createElement("div", { className: css.css({
|
11058
|
+
display: 'flex',
|
11059
|
+
alignItems: 'flex-end',
|
11060
|
+
justifyContent: 'space-between',
|
11061
|
+
width: '100%',
|
11062
|
+
overflow: 'hidden'
|
11063
|
+
}) },
|
11064
|
+
React.createElement("div", null,
|
11065
|
+
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
|
11066
|
+
__html: (_j = priceText(item)) !== null && _j !== void 0 ? _j : ''
|
11067
|
+
} })),
|
11068
|
+
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
|
11069
|
+
__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)
|
11070
|
+
} }))))))));
|
11049
11071
|
})));
|
11050
11072
|
};
|
11051
11073
|
var CommodityListComponent = React.memo(CommodityList$1);
|
@@ -11515,44 +11537,55 @@ var interactionRender$a = [
|
|
11515
11537
|
];
|
11516
11538
|
|
11517
11539
|
const EventProvider = (_a) => {
|
11518
|
-
var { rec, children, className, onClick, style, isExternalLink = false, index, jumpLink } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index", "jumpLink"]);
|
11540
|
+
var { rec, children, className, onClick, style, isExternalLink = false, index, jumpLink, multItem, multiCheckIndex } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index", "jumpLink", "multItem", "multiCheckIndex"]);
|
11519
11541
|
const ref = React.useRef(null);
|
11520
11542
|
const { popup } = useEditor();
|
11521
11543
|
const { setPopupDetailData, ctaEvent } = useSxpDataSource();
|
11522
11544
|
const { jumpToWeb } = useEventReport();
|
11523
|
-
const
|
11524
|
-
|
11525
|
-
|
11545
|
+
const [element, setElement] = React.useState(null);
|
11546
|
+
const handleClick = lodash.throttle((event) => {
|
11547
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
11548
|
+
event.preventDefault();
|
11549
|
+
const item = (_c = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video) !== null && _c !== void 0 ? _c : multItem;
|
11526
11550
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
11527
11551
|
eventSubject: 'clickCta',
|
11528
11552
|
eventDescription: 'User clicked the CTA'
|
11529
11553
|
}, rec, item, index);
|
11530
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(
|
11554
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(multItem && multiCheckIndex
|
11555
|
+
? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
|
11556
|
+
setElement(ref === null || ref === void 0 ? void 0 : ref.current);
|
11531
11557
|
if (isExternalLink) {
|
11532
|
-
|
11533
|
-
|
11534
|
-
const
|
11558
|
+
const link = ((_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
|
11559
|
+
if (jumpLink || link) {
|
11560
|
+
const cta = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
|
11561
|
+
const product = ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) || multItem;
|
11535
11562
|
jumpToWeb(rec, product, cta, index);
|
11536
|
-
window.location.href = window.getJointUtmLink(jumpLink ||
|
11563
|
+
window.location.href = window.getJointUtmLink(jumpLink || link || '');
|
11537
11564
|
}
|
11538
11565
|
}
|
11539
11566
|
else {
|
11540
11567
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
11541
11568
|
}
|
11542
11569
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
11543
|
-
|
11570
|
+
React.useEffect(() => {
|
11571
|
+
if (element && !(popup === null || popup === void 0 ? void 0 : popup.id)) {
|
11572
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
11573
|
+
setElement(null);
|
11574
|
+
}
|
11575
|
+
}, [element, popup]);
|
11576
|
+
return (React.createElement("button", { ref: ref, className: className, style: Object.assign({ display: 'flex', alignItems: 'normal' }, style), onClick: handleClick, role: 'button', "aria-label": 'CTA', tabIndex: 0 }, children));
|
11544
11577
|
};
|
11545
11578
|
var EventProvider$1 = React.memo(EventProvider);
|
11546
11579
|
|
11547
11580
|
var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
|
11548
11581
|
|
11549
11582
|
const Commodity$1 = (_a) => {
|
11550
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
11583
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
11551
11584
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
|
11552
11585
|
const { sxpParameter } = useSxpDataSource();
|
11553
11586
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
11554
11587
|
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
11555
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
11588
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, style: style, index: index }, props),
|
11556
11589
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
11557
11590
|
React.createElement("div", { className: css.css({
|
11558
11591
|
color: '#fff',
|
@@ -11565,8 +11598,8 @@ const Commodity$1 = (_a) => {
|
|
11565
11598
|
React.createElement("div", { className: styles$8['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
11566
11599
|
__html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
11567
11600
|
} }),
|
11568
|
-
React.createElement("
|
11569
|
-
__html: setFontForText((
|
11601
|
+
React.createElement("button", { "aria-label": (_l = (_k = product === null || product === void 0 ? void 0 : product.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', className: css.css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_m = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _m === void 0 ? void 0 : _m.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
11602
|
+
__html: setFontForText((_p = (_o = product === null || product === void 0 ? void 0 : product.bindCta) === null || _o === void 0 ? void 0 : _o.enTitle) !== null && _p !== void 0 ? _p : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
11570
11603
|
} }))));
|
11571
11604
|
};
|
11572
11605
|
var CommodityComponent = React.memo(Commodity$1);
|
@@ -11646,7 +11679,7 @@ const Appoint$1 = (_a) => {
|
|
11646
11679
|
const { sxpParameter } = useSxpDataSource();
|
11647
11680
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
11648
11681
|
const src = (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image;
|
11649
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
11682
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, style: Object.assign({ alignItems: 'center' }, style), index: index }, props),
|
11650
11683
|
React.createElement(Img$1, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
11651
11684
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
11652
11685
|
__html: setFontForText((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
@@ -11830,7 +11863,7 @@ const Link$1 = (_a) => {
|
|
11830
11863
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
11831
11864
|
(_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
|
11832
11865
|
const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
11833
|
-
return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData,
|
11866
|
+
return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, style: Object.assign({ alignItems: 'center' }, style) }, props, { jumpLink: (_f = cta === null || cta === void 0 ? void 0 : cta.link) !== null && _f !== void 0 ? _f : '' }),
|
11834
11867
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
11835
11868
|
React.createElement("div", { className: css.css({
|
11836
11869
|
display: 'flex',
|
@@ -11940,12 +11973,12 @@ var interactionRender$7 = [
|
|
11940
11973
|
var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
|
11941
11974
|
|
11942
11975
|
const CommodityDiro$1 = (_a) => {
|
11943
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
11976
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
11944
11977
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
|
11945
11978
|
const { sxpParameter } = useSxpDataSource();
|
11946
11979
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
11947
11980
|
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
11948
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
11981
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, style: style, index: index }, props),
|
11949
11982
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
11950
11983
|
React.createElement("div", { className: css.css({
|
11951
11984
|
color: '#fff',
|
@@ -11958,8 +11991,8 @@ const CommodityDiro$1 = (_a) => {
|
|
11958
11991
|
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
11959
11992
|
__html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
11960
11993
|
} }),
|
11961
|
-
React.createElement("
|
11962
|
-
__html: setFontForText((
|
11994
|
+
React.createElement("button", { "aria-label": (_l = (_k = product === null || product === void 0 ? void 0 : product.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', className: css.css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_m = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _m === void 0 ? void 0 : _m.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
11995
|
+
__html: setFontForText((_p = (_o = product === null || product === void 0 ? void 0 : product.bindCta) === null || _o === void 0 ? void 0 : _o.enTitle) !== null && _p !== void 0 ? _p : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
11963
11996
|
} }))));
|
11964
11997
|
};
|
11965
11998
|
var CommodityDiroComponent = React.memo(CommodityDiro$1);
|
@@ -12036,12 +12069,12 @@ var interactionRender$6 = [
|
|
12036
12069
|
var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
|
12037
12070
|
|
12038
12071
|
const CommodityDiroNew$1 = (_a) => {
|
12039
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
12072
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
12040
12073
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
|
12041
12074
|
const { sxpParameter } = useSxpDataSource();
|
12042
12075
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12043
12076
|
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
12044
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
12077
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, style: style, index: index }, props),
|
12045
12078
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12046
12079
|
React.createElement("div", { className: css.css({
|
12047
12080
|
color: '#fff',
|
@@ -12054,8 +12087,8 @@ const CommodityDiroNew$1 = (_a) => {
|
|
12054
12087
|
React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12055
12088
|
__html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12056
12089
|
} }),
|
12057
|
-
React.createElement("
|
12058
|
-
__html: setFontForText((
|
12090
|
+
React.createElement("button", { "aria-label": (_l = (_k = product === null || product === void 0 ? void 0 : product.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12091
|
+
__html: setFontForText((_o = (_m = product === null || product === void 0 ? void 0 : product.bindCta) === null || _m === void 0 ? void 0 : _m.enTitle) !== null && _o !== void 0 ? _o : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12059
12092
|
} }))));
|
12060
12093
|
};
|
12061
12094
|
var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
|
@@ -12134,45 +12167,28 @@ var styles$4 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
|
|
12134
12167
|
|
12135
12168
|
const MultiCommodityDiro$1 = (_a) => {
|
12136
12169
|
var _b, _c;
|
12137
|
-
var { content, style, bgImg, recData,
|
12138
|
-
const {
|
12139
|
-
const
|
12140
|
-
|
12141
|
-
|
12142
|
-
|
12143
|
-
|
12144
|
-
|
12145
|
-
|
12146
|
-
|
12147
|
-
|
12148
|
-
|
12149
|
-
|
12150
|
-
|
12151
|
-
|
12152
|
-
|
12153
|
-
|
12154
|
-
|
12155
|
-
|
12156
|
-
|
12157
|
-
|
12158
|
-
|
12159
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
12160
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
|
12161
|
-
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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12162
|
-
React.createElement("div", { className: css.css({
|
12163
|
-
color: '#000',
|
12164
|
-
display: 'flex',
|
12165
|
-
flexDirection: 'column',
|
12166
|
-
justifyContent: 'space-between',
|
12167
|
-
width: '100%',
|
12168
|
-
overflow: 'hidden'
|
12169
|
-
}) },
|
12170
|
-
React.createElement("div", { className: styles$4['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12171
|
-
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12172
|
-
} }),
|
12173
|
-
React.createElement("div", { className: css.css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12174
|
-
__html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12175
|
-
} }))))));
|
12170
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive"]);
|
12171
|
+
const { sxpParameter } = useSxpDataSource();
|
12172
|
+
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
12173
|
+
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
12174
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12175
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
12176
|
+
React.createElement(EventProvider$1, Object.assign({ rec: recData, multiCheckIndex: itemIndex }, props),
|
12177
|
+
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: itemIndex, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12178
|
+
React.createElement("div", { className: css.css({
|
12179
|
+
color: '#000',
|
12180
|
+
display: 'flex',
|
12181
|
+
flexDirection: 'column',
|
12182
|
+
justifyContent: 'space-between',
|
12183
|
+
width: '100%',
|
12184
|
+
overflow: 'hidden'
|
12185
|
+
}) },
|
12186
|
+
React.createElement("div", { className: styles$4['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12187
|
+
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12188
|
+
} }),
|
12189
|
+
React.createElement("button", { "aria-label": (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', className: css.css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_h = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _h === void 0 ? void 0 : _h.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12190
|
+
__html: setFontForText((_k = (_j = item === null || item === void 0 ? void 0 : item.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12191
|
+
} })))))));
|
12176
12192
|
})));
|
12177
12193
|
};
|
12178
12194
|
var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
|
@@ -12250,46 +12266,28 @@ var styles$3 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
|
|
12250
12266
|
|
12251
12267
|
const MultiCommodity$1 = (_a) => {
|
12252
12268
|
var _b, _c;
|
12253
|
-
var { content, style, bgImg, recData,
|
12269
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive"]);
|
12254
12270
|
const { sxpParameter } = useSxpDataSource();
|
12255
|
-
const
|
12256
|
-
|
12257
|
-
|
12258
|
-
|
12259
|
-
|
12260
|
-
|
12261
|
-
|
12262
|
-
|
12263
|
-
|
12264
|
-
|
12265
|
-
|
12266
|
-
|
12267
|
-
|
12268
|
-
|
12269
|
-
|
12270
|
-
|
12271
|
-
|
12272
|
-
|
12273
|
-
|
12274
|
-
|
12275
|
-
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
|
12276
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
12277
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
|
12278
|
-
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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12279
|
-
React.createElement("div", { className: css.css({
|
12280
|
-
color: '#fff',
|
12281
|
-
display: 'flex',
|
12282
|
-
flexDirection: 'column',
|
12283
|
-
justifyContent: 'space-between',
|
12284
|
-
width: '100%',
|
12285
|
-
overflow: 'hidden'
|
12286
|
-
}) },
|
12287
|
-
React.createElement("div", { className: styles$3['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12288
|
-
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12289
|
-
} }),
|
12290
|
-
React.createElement("div", { className: css.css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12291
|
-
__html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12292
|
-
} }))))));
|
12271
|
+
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
12272
|
+
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
12273
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12274
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
12275
|
+
React.createElement(EventProvider$1, Object.assign({ rec: recData, multiCheckIndex: itemIndex }, props),
|
12276
|
+
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: itemIndex, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12277
|
+
React.createElement("div", { className: css.css({
|
12278
|
+
color: '#fff',
|
12279
|
+
display: 'flex',
|
12280
|
+
flexDirection: 'column',
|
12281
|
+
justifyContent: 'space-between',
|
12282
|
+
width: '100%',
|
12283
|
+
overflow: 'hidden'
|
12284
|
+
}) },
|
12285
|
+
React.createElement("div", { className: styles$3['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12286
|
+
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12287
|
+
} }),
|
12288
|
+
React.createElement("button", { "aria-label": (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', className: css.css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_h = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _h === void 0 ? void 0 : _h.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12289
|
+
__html: setFontForText((_k = (_j = item === null || item === void 0 ? void 0 : item.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12290
|
+
} })))))));
|
12293
12291
|
})));
|
12294
12292
|
};
|
12295
12293
|
var MultiCommodityComponent = React.memo(MultiCommodity$1);
|
@@ -12375,47 +12373,29 @@ var styles$2 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
|
|
12375
12373
|
|
12376
12374
|
const MultiCommodityDiroNew$1 = (_a) => {
|
12377
12375
|
var _b, _c;
|
12378
|
-
var { content, style, bgImg, recData,
|
12379
|
-
const {
|
12380
|
-
const
|
12381
|
-
|
12382
|
-
|
12383
|
-
|
12384
|
-
|
12385
|
-
|
12386
|
-
|
12387
|
-
|
12388
|
-
|
12389
|
-
|
12390
|
-
|
12391
|
-
|
12392
|
-
|
12393
|
-
|
12394
|
-
|
12395
|
-
|
12396
|
-
|
12397
|
-
|
12398
|
-
|
12399
|
-
|
12400
|
-
|
12401
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
12402
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
|
12403
|
-
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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12404
|
-
React.createElement("div", { className: css.css({
|
12405
|
-
color: '#fff',
|
12406
|
-
display: 'flex',
|
12407
|
-
flexDirection: 'column',
|
12408
|
-
justifyContent: 'center',
|
12409
|
-
width: '100%',
|
12410
|
-
overflow: 'hidden',
|
12411
|
-
lineHeight: '20px'
|
12412
|
-
}) },
|
12413
|
-
React.createElement("div", { className: styles$2['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12414
|
-
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12415
|
-
} }),
|
12416
|
-
React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12417
|
-
__html: setFontForText((_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12418
|
-
} }))))));
|
12376
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive"]);
|
12377
|
+
const { sxpParameter } = useSxpDataSource();
|
12378
|
+
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
12379
|
+
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
12380
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
12381
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
12382
|
+
React.createElement(EventProvider$1, Object.assign({ rec: recData, multiCheckIndex: itemIndex }, props),
|
12383
|
+
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: itemIndex, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12384
|
+
React.createElement("div", { className: css.css({
|
12385
|
+
color: '#fff',
|
12386
|
+
display: 'flex',
|
12387
|
+
flexDirection: 'column',
|
12388
|
+
justifyContent: 'center',
|
12389
|
+
width: '100%',
|
12390
|
+
overflow: 'hidden',
|
12391
|
+
lineHeight: '20px'
|
12392
|
+
}) },
|
12393
|
+
React.createElement("div", { className: styles$2['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
12394
|
+
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
12395
|
+
} }),
|
12396
|
+
React.createElement("button", { "aria-label": (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12397
|
+
__html: setFontForText((_j = (_h = item === null || item === void 0 ? void 0 : item.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
12398
|
+
} })))))));
|
12419
12399
|
})));
|
12420
12400
|
};
|
12421
12401
|
var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
|
@@ -16571,7 +16551,7 @@ var PictureGroup$3 = React.memo(PictureGroup$2);
|
|
16571
16551
|
* @Author: binruan@chatlabs.com
|
16572
16552
|
* @Date: 2024-01-15 19:03:09
|
16573
16553
|
* @LastEditors: binruan@chatlabs.com
|
16574
|
-
* @LastEditTime: 2024-
|
16554
|
+
* @LastEditTime: 2024-11-19 10:40:36
|
16575
16555
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
16576
16556
|
*
|
16577
16557
|
*/
|
@@ -16612,8 +16592,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle, hashTagRigh
|
|
16612
16592
|
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`,
|
16613
16593
|
width: hashTagRightMargin
|
16614
16594
|
} },
|
16615
|
-
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), tag: '
|
16616
|
-
React.createElement("
|
16595
|
+
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), tag: 'li', role: 'listitem' },
|
16596
|
+
React.createElement("button", { className: 'clc-sxp-bottom-hashtag-item-button', "aria-label": item, "aria-describedby": item, dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
16617
16597
|
};
|
16618
16598
|
var Hashtag$1 = React.memo(Hashtag);
|
16619
16599
|
|
@@ -16829,7 +16809,15 @@ var ConsentPopup = React.memo(Consent);
|
|
16829
16809
|
* @Author: binruan@chatlabs.com
|
16830
16810
|
* @Date: 2024-03-20 10:27:31
|
16831
16811
|
* @LastEditors: binruan@chatlabs.com
|
16832
|
-
* @LastEditTime: 2024-11-
|
16812
|
+
* @LastEditTime: 2024-11-19 09:47:45
|
16813
|
+
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16814
|
+
*
|
16815
|
+
*/
|
16816
|
+
/*
|
16817
|
+
* @Author: binruan@chatlabs.com
|
16818
|
+
* @Date: 2024-01-15 19:03:09
|
16819
|
+
* @LastEditors: binruan@chatlabs.com
|
16820
|
+
* @LastEditTime: 2024-11-04 14:55:23
|
16833
16821
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16834
16822
|
*
|
16835
16823
|
*/
|
@@ -17309,9 +17297,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
17309
17297
|
alignItems: 'center'
|
17310
17298
|
} },
|
17311
17299
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
17300
|
+
renderBottom(rec, index),
|
17312
17301
|
renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
17313
17302
|
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
17314
|
-
renderBottom(rec, index),
|
17315
17303
|
renderContent(rec, index)))))));
|
17316
17304
|
});
|
17317
17305
|
}, [
|
@@ -17378,9 +17366,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
17378
17366
|
}
|
17379
17367
|
}
|
17380
17368
|
}, direction: 'vertical', height: height },
|
17369
|
+
renderView,
|
17381
17370
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
17382
|
-
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
17383
|
-
renderView),
|
17371
|
+
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
|
17384
17372
|
React.createElement(WaterFall$1, Object.assign({}, (_w = (_v = (_u = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.item) === null || _w === void 0 ? void 0 : _w.props)),
|
17385
17373
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig })));
|
17386
17374
|
};
|
@@ -17847,7 +17835,7 @@ const Popup = () => {
|
|
17847
17835
|
* @Author: binruan@chatlabs.com
|
17848
17836
|
* @Date: 2024-01-15 19:03:09
|
17849
17837
|
* @LastEditors: binruan@chatlabs.com
|
17850
|
-
* @LastEditTime: 2024-
|
17838
|
+
* @LastEditTime: 2024-07-24 16:35:44
|
17851
17839
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
17852
17840
|
*
|
17853
17841
|
*/
|
@@ -17863,19 +17851,18 @@ const RESOLVER = {};
|
|
17863
17851
|
Object.values(_materials_).forEach((v) => {
|
17864
17852
|
RESOLVER[v.extend.type] = v;
|
17865
17853
|
});
|
17866
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain,
|
17867
|
-
var _a, _b, _c, _d, _e, _f;
|
17854
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
17855
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
17868
17856
|
const utmVal = React.useMemo(() => {
|
17869
17857
|
var _a;
|
17870
17858
|
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('?', '') : '';
|
17871
17859
|
return searchParams;
|
17872
17860
|
}, []);
|
17873
|
-
|
17874
|
-
|
17875
|
-
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, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), render: ({ rtcList, tagList, pageData }) => {
|
17861
|
+
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
17862
|
+
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 }) => {
|
17876
17863
|
var _a;
|
17877
17864
|
return (React.createElement(React.Fragment, null,
|
17878
|
-
React.createElement(SxpPageRender, Object.assign({}, (_a =
|
17865
|
+
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 })),
|
17879
17866
|
React.createElement(Popup, null)));
|
17880
17867
|
} })));
|
17881
17868
|
};
|