pb-sxp-ui 1.0.4 → 1.0.5
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 +9 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -12
- 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 +9 -12
- 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/materials/sxp/template/MultiCommodity/index.js +2 -3
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -3
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -3
- package/es/materials/sxp/template/components/EventProvider.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -3
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -3
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -3
- package/lib/materials/sxp/template/components/EventProvider.js +2 -2
- package/package.json +1 -1
@@ -17,16 +17,15 @@ const MultiCommodity = (_a) => {
|
|
17
17
|
const [products, setProducts] = 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]);
|
18
18
|
const { jumpToWeb } = useEventReport();
|
19
19
|
const handleClick = throttle((item) => {
|
20
|
-
var _a;
|
21
20
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
22
21
|
eventSubject: 'clickCta',
|
23
22
|
eventDescription: 'User clicked the CTA'
|
24
23
|
}, recData, item);
|
25
24
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
26
25
|
if (isExternalLink) {
|
27
|
-
if (
|
26
|
+
if (item === null || item === void 0 ? void 0 : item.link) {
|
28
27
|
jumpToWeb(recData, item, item.bindCta);
|
29
|
-
window.location.href = item.
|
28
|
+
window.location.href = item.link;
|
30
29
|
}
|
31
30
|
}
|
32
31
|
else {
|
@@ -16,16 +16,15 @@ const MultiCommodityDiro = (_a) => {
|
|
16
16
|
const { jumpToWeb } = useEventReport();
|
17
17
|
const [products, setProducts] = 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]);
|
18
18
|
const handleClick = throttle((item) => {
|
19
|
-
var _a;
|
20
19
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
21
20
|
eventSubject: 'clickCta',
|
22
21
|
eventDescription: 'User clicked the CTA'
|
23
22
|
}, recData, item);
|
24
23
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
25
24
|
if (isExternalLink) {
|
26
|
-
if (
|
25
|
+
if (item === null || item === void 0 ? void 0 : item.link) {
|
27
26
|
jumpToWeb(recData, item, item.bindCta);
|
28
|
-
window.location.href = item.
|
27
|
+
window.location.href = item.link;
|
29
28
|
}
|
30
29
|
}
|
31
30
|
else {
|
@@ -16,16 +16,15 @@ const MultiCommodityDiroNew = (_a) => {
|
|
16
16
|
const { jumpToWeb } = useEventReport();
|
17
17
|
const [products, setProducts] = 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]);
|
18
18
|
const handleClick = throttle((item) => {
|
19
|
-
var _a;
|
20
19
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
21
20
|
eventSubject: 'clickCta',
|
22
21
|
eventDescription: 'User clicked the CTA'
|
23
22
|
}, recData, item);
|
24
23
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
25
24
|
if (isExternalLink) {
|
26
|
-
if (
|
25
|
+
if (item === null || item === void 0 ? void 0 : item.link) {
|
27
26
|
jumpToWeb(recData, item, item.bindCta);
|
28
|
-
window.location.href = item.
|
27
|
+
window.location.href = item.link;
|
29
28
|
}
|
30
29
|
}
|
31
30
|
else {
|
@@ -30,11 +30,11 @@ const EventProvider = (_a) => {
|
|
30
30
|
}, rec, item);
|
31
31
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
|
32
32
|
if (isExternalLink) {
|
33
|
-
if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.
|
33
|
+
if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
|
34
34
|
const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
|
35
35
|
const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
36
36
|
jumpToWeb(rec, product, cta);
|
37
|
-
window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.
|
37
|
+
window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
|
38
38
|
}
|
39
39
|
}
|
40
40
|
else {
|
@@ -19,16 +19,15 @@ const MultiCommodity = (_a) => {
|
|
19
19
|
const [products, setProducts] = (0, react_1.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]);
|
20
20
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
21
21
|
const handleClick = (0, lodash_1.throttle)((item) => {
|
22
|
-
var _a;
|
23
22
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
24
23
|
eventSubject: 'clickCta',
|
25
24
|
eventDescription: 'User clicked the CTA'
|
26
25
|
}, recData, item);
|
27
26
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
28
27
|
if (isExternalLink) {
|
29
|
-
if (
|
28
|
+
if (item === null || item === void 0 ? void 0 : item.link) {
|
30
29
|
jumpToWeb(recData, item, item.bindCta);
|
31
|
-
window.location.href = item.
|
30
|
+
window.location.href = item.link;
|
32
31
|
}
|
33
32
|
}
|
34
33
|
else {
|
@@ -18,16 +18,15 @@ const MultiCommodityDiro = (_a) => {
|
|
18
18
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
19
19
|
const [products, setProducts] = (0, react_1.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]);
|
20
20
|
const handleClick = (0, lodash_1.throttle)((item) => {
|
21
|
-
var _a;
|
22
21
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
23
22
|
eventSubject: 'clickCta',
|
24
23
|
eventDescription: 'User clicked the CTA'
|
25
24
|
}, recData, item);
|
26
25
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
27
26
|
if (isExternalLink) {
|
28
|
-
if (
|
27
|
+
if (item === null || item === void 0 ? void 0 : item.link) {
|
29
28
|
jumpToWeb(recData, item, item.bindCta);
|
30
|
-
window.location.href = item.
|
29
|
+
window.location.href = item.link;
|
31
30
|
}
|
32
31
|
}
|
33
32
|
else {
|
@@ -18,16 +18,15 @@ const MultiCommodityDiroNew = (_a) => {
|
|
18
18
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
19
19
|
const [products, setProducts] = (0, react_1.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]);
|
20
20
|
const handleClick = (0, lodash_1.throttle)((item) => {
|
21
|
-
var _a;
|
22
21
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
23
22
|
eventSubject: 'clickCta',
|
24
23
|
eventDescription: 'User clicked the CTA'
|
25
24
|
}, recData, item);
|
26
25
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
27
26
|
if (isExternalLink) {
|
28
|
-
if (
|
27
|
+
if (item === null || item === void 0 ? void 0 : item.link) {
|
29
28
|
jumpToWeb(recData, item, item.bindCta);
|
30
|
-
window.location.href = item.
|
29
|
+
window.location.href = item.link;
|
31
30
|
}
|
32
31
|
}
|
33
32
|
else {
|
@@ -32,11 +32,11 @@ const EventProvider = (_a) => {
|
|
32
32
|
}, rec, item);
|
33
33
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
|
34
34
|
if (isExternalLink) {
|
35
|
-
if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.
|
35
|
+
if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
|
36
36
|
const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
|
37
37
|
const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
38
38
|
jumpToWeb(rec, product, cta);
|
39
|
-
window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.
|
39
|
+
window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
|
40
40
|
}
|
41
41
|
}
|
42
42
|
else {
|