pb-sxp-ui 1.0.30 → 1.0.32
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 +33 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -30
- 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 +36 -34
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +17 -1
- package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/es/core/components/SxpPageRender/index.js +7 -7
- package/es/core/context/SxpDataSourceProvider.js +1 -1
- package/es/core/hooks/useEventReport.js +4 -4
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +17 -1
- package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.js +7 -7
- package/lib/core/context/SxpDataSourceProvider.js +1 -1
- package/lib/core/hooks/useEventReport.js +4 -4
- package/package.json +2 -1
package/dist/pb-ui.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom'), require('eventemitter3')) :
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', '@emotion/css', '@ant-design/pro-components', 'react-dom', 'eventemitter3'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.css, global.proComponents, global.ReactDOM, global.EventEmitter));
|
5
|
-
})(this, (function (exports, lodash, uuid$1, pako, React, qs, css, proComponents, ReactDOM, EventEmitter) { 'use strict';
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom'), require('hls.js'), require('eventemitter3')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', '@emotion/css', '@ant-design/pro-components', 'react-dom', 'hls.js', 'eventemitter3'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.css, global.proComponents, global.ReactDOM, global.Hls, global.EventEmitter));
|
5
|
+
})(this, (function (exports, lodash, uuid$1, pako, React, qs, css, proComponents, ReactDOM, Hls, EventEmitter) { 'use strict';
|
6
6
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
8
8
|
var n = Object.create(null);
|
@@ -569,7 +569,7 @@
|
|
569
569
|
fromKName = 'imagePage';
|
570
570
|
}
|
571
571
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
572
|
-
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '',
|
572
|
+
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
573
573
|
});
|
574
574
|
}, [bffEventReport, isFromHashtag]);
|
575
575
|
React.useEffect(() => {
|
@@ -8142,8 +8142,8 @@
|
|
8142
8142
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8143
8143
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
8144
8144
|
position: position + '',
|
8145
|
-
|
8146
|
-
|
8145
|
+
contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
|
8146
|
+
ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
8147
8147
|
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
8148
8148
|
}
|
8149
8149
|
});
|
@@ -8167,8 +8167,8 @@
|
|
8167
8167
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8168
8168
|
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
8169
8169
|
position: position + '',
|
8170
|
-
|
8171
|
-
|
8170
|
+
contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
8171
|
+
ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
8172
8172
|
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
8173
8173
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
8174
8174
|
eventSubject: 'productView',
|
@@ -11786,7 +11786,7 @@ Made in Italy` })));
|
|
11786
11786
|
}
|
11787
11787
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
11788
11788
|
eventInfo: {
|
11789
|
-
|
11789
|
+
contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
11790
11790
|
position: cacheActiveIndex + '',
|
11791
11791
|
contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
|
11792
11792
|
traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
|
@@ -12118,20 +12118,22 @@ Made in Italy` })));
|
|
12118
12118
|
setIsPauseVideo(false);
|
12119
12119
|
if (!videoRef.current.src) {
|
12120
12120
|
const videoSrc = rec.video.url;
|
12121
|
-
|
12122
|
-
|
12123
|
-
|
12124
|
-
|
12125
|
-
|
12126
|
-
|
12127
|
-
|
12128
|
-
|
12129
|
-
|
12130
|
-
|
12131
|
-
|
12132
|
-
|
12133
|
-
|
12134
|
-
|
12121
|
+
if (videoSrc.includes('.m3u8')) {
|
12122
|
+
if (Hls.isSupported()) {
|
12123
|
+
const hls = new Hls();
|
12124
|
+
hls.loadSource(videoSrc);
|
12125
|
+
hls.attachMedia(videoRef.current);
|
12126
|
+
}
|
12127
|
+
else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
|
12128
|
+
videoRef.current.src = videoSrc;
|
12129
|
+
}
|
12130
|
+
else {
|
12131
|
+
videoRef.current.src = videoSrc;
|
12132
|
+
}
|
12133
|
+
}
|
12134
|
+
else {
|
12135
|
+
videoRef.current.src = videoSrc;
|
12136
|
+
}
|
12135
12137
|
videoRef.current.setAttribute('x5-playsinline', 'true');
|
12136
12138
|
videoRef.current.setAttribute('webkit-playsinline', 'true');
|
12137
12139
|
}
|
@@ -12555,7 +12557,7 @@ Made in Italy` })));
|
|
12555
12557
|
* @Author: binruan@chatlabs.com
|
12556
12558
|
* @Date: 2024-01-15 19:03:09
|
12557
12559
|
* @LastEditors: binruan@chatlabs.com
|
12558
|
-
* @LastEditTime: 2024-04-
|
12560
|
+
* @LastEditTime: 2024-04-23 15:48:32
|
12559
12561
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12560
12562
|
*
|
12561
12563
|
*/
|
@@ -12637,8 +12639,8 @@ Made in Italy` })));
|
|
12637
12639
|
// sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
|
12638
12640
|
// eventSubject: 'sessionCompleted',
|
12639
12641
|
// eventDescription: 'Session completed',
|
12640
|
-
//
|
12641
|
-
//
|
12642
|
+
// contentId: item?.video?.itemId,
|
12643
|
+
// productId: item?.product?.itemId,
|
12642
12644
|
// position: item?.position
|
12643
12645
|
// }
|
12644
12646
|
// });
|
@@ -12682,12 +12684,12 @@ Made in Italy` })));
|
|
12682
12684
|
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
12683
12685
|
eventSubject: 'sessionCompleted',
|
12684
12686
|
eventDescription: 'Session completed',
|
12685
|
-
|
12686
|
-
|
12687
|
+
contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
|
12688
|
+
productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
|
12687
12689
|
position: activeIndex + '',
|
12688
12690
|
fromKName,
|
12689
12691
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
12690
|
-
|
12692
|
+
ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
|
12691
12693
|
}
|
12692
12694
|
});
|
12693
12695
|
}
|
@@ -12821,8 +12823,8 @@ Made in Italy` })));
|
|
12821
12823
|
eventInfo: {
|
12822
12824
|
eventSubject: 'scrollDown',
|
12823
12825
|
eventDescription: 'User scroll down',
|
12824
|
-
|
12825
|
-
|
12826
|
+
contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
|
12827
|
+
productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
12826
12828
|
requestId: null
|
12827
12829
|
}
|
12828
12830
|
});
|
@@ -12834,8 +12836,8 @@ Made in Italy` })));
|
|
12834
12836
|
eventInfo: {
|
12835
12837
|
eventSubject: 'scrollUp',
|
12836
12838
|
eventDescription: 'User scroll up',
|
12837
|
-
|
12838
|
-
|
12839
|
+
contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
|
12840
|
+
productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
12839
12841
|
requestId: null
|
12840
12842
|
}
|
12841
12843
|
});
|