pb-sxp-ui 1.0.72 → 1.0.74
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 +87 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -6
- package/dist/index.js +87 -67
- 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 +90 -71
- 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/FormatImage.js +7 -2
- package/es/core/components/SxpPageRender/Popup/index.js +2 -2
- package/es/core/components/SxpPageRender/index.js +27 -21
- package/es/materials/sxp/popup/AppointForm/index.js +3 -1
- package/es/materials/sxp/popup/AppointForm/settingRender.js +0 -5
- package/es/materials/sxp/popup/CommodityDetail/index.js +11 -5
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +12 -6
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
- package/es/materials/sxp/template/Commodity/index.js +5 -5
- package/es/materials/sxp/template/CommodityDiro/index.js +5 -5
- package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -5
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- package/lib/core/components/SxpPageRender/FormatImage.js +7 -2
- package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
- package/lib/core/components/SxpPageRender/index.js +27 -21
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -1
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +0 -5
- package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -4
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -5
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
- package/lib/materials/sxp/template/Commodity/index.js +5 -5
- package/lib/materials/sxp/template/CommodityDiro/index.js +5 -5
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -5
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +3 -1
package/dist/index.css
CHANGED
@@ -1307,12 +1307,16 @@ button.swiper-pagination-bullet {
|
|
1307
1307
|
z-index: 8;
|
1308
1308
|
background-color: #fff;
|
1309
1309
|
overflow-x: auto;
|
1310
|
-
padding: 0 12px;
|
1311
1310
|
text-align: center;
|
1312
1311
|
height: 45px;
|
1313
1312
|
}
|
1314
1313
|
.clc-sxp-tagbar-list {
|
1315
|
-
|
1314
|
+
scrollbar-width: none;
|
1315
|
+
width: -webkit-fit-content;
|
1316
|
+
width: -moz-fit-content;
|
1317
|
+
width: fit-content;
|
1318
|
+
overflow-y: auto;
|
1319
|
+
padding: 0 12px;
|
1316
1320
|
margin: 0;
|
1317
1321
|
display: -webkit-box;
|
1318
1322
|
display: -webkit-flex;
|
@@ -1322,10 +1326,6 @@ button.swiper-pagination-bullet {
|
|
1322
1326
|
-webkit-align-items: center;
|
1323
1327
|
-ms-flex-align: center;
|
1324
1328
|
align-items: center;
|
1325
|
-
-webkit-box-pack: center;
|
1326
|
-
-webkit-justify-content: center;
|
1327
|
-
-ms-flex-pack: center;
|
1328
|
-
justify-content: center;
|
1329
1329
|
-webkit-flex-wrap: nowrap;
|
1330
1330
|
-ms-flex-wrap: nowrap;
|
1331
1331
|
flex-wrap: nowrap;
|
package/dist/index.js
CHANGED
@@ -5,6 +5,7 @@ import React, { useContext, useMemo, createContext, memo, useState, useRef, useE
|
|
5
5
|
import qs from 'qs';
|
6
6
|
import EventEmitter from 'eventemitter3';
|
7
7
|
import { css } from '@emotion/css';
|
8
|
+
import { BetaSchemaForm } from '@ant-design/pro-components';
|
8
9
|
import * as ReactDOM from 'react-dom';
|
9
10
|
|
10
11
|
/******************************************************************************
|
@@ -949,7 +950,7 @@ var defaultSetting = {
|
|
949
950
|
* @Author: binruan@chatlabs.com
|
950
951
|
* @Date: 2023-07-28 18:29:57
|
951
952
|
* @LastEditors: binruan@chatlabs.com
|
952
|
-
* @LastEditTime: 2024-05-
|
953
|
+
* @LastEditTime: 2024-05-27 11:48:04
|
953
954
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
|
954
955
|
*
|
955
956
|
*/
|
@@ -1054,11 +1055,6 @@ var settingRender$5 = [
|
|
1054
1055
|
type: 'TextAlign',
|
1055
1056
|
name: ['props', 'submitButtonStyle']
|
1056
1057
|
},
|
1057
|
-
{
|
1058
|
-
label: '提交文本颜色',
|
1059
|
-
type: 'Color',
|
1060
|
-
name: ['props', 'submitColor']
|
1061
|
-
},
|
1062
1058
|
{
|
1063
1059
|
label: '提交按钮颜色',
|
1064
1060
|
type: 'Color',
|
@@ -1205,7 +1201,7 @@ const AppointForm$1 = (_a) => {
|
|
1205
1201
|
key: '4'
|
1206
1202
|
}
|
1207
1203
|
], []);
|
1208
|
-
useMemo(() => {
|
1204
|
+
const columnsData = useMemo(() => {
|
1209
1205
|
if (layoutType === undefined) {
|
1210
1206
|
const list = cloneDeep(columns) || defaultColumns;
|
1211
1207
|
return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
|
@@ -1248,7 +1244,8 @@ const AppointForm$1 = (_a) => {
|
|
1248
1244
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1249
1245
|
React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
|
1250
1246
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
1251
|
-
React.createElement("div", { className: 'pb-appoint-form-container' }
|
1247
|
+
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1248
|
+
React.createElement(BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1252
1249
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1253
1250
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
|
1254
1251
|
};
|
@@ -1330,7 +1327,7 @@ var settingRender$4 = [
|
|
1330
1327
|
label: '居中垂直偏移',
|
1331
1328
|
type: 'Number',
|
1332
1329
|
name: ['props', 'swiper', 'translateY'],
|
1333
|
-
min: -
|
1330
|
+
min: -1000,
|
1334
1331
|
addonAfter: '%',
|
1335
1332
|
initialValue: 0
|
1336
1333
|
}
|
@@ -8423,21 +8420,26 @@ var ExpandableText$1 = memo(ExpandableText);
|
|
8423
8420
|
* @Author: binruan@chatlabs.com
|
8424
8421
|
* @Date: 2024-03-20 10:27:31
|
8425
8422
|
* @LastEditors: binruan@chatlabs.com
|
8426
|
-
* @LastEditTime: 2024-05-
|
8423
|
+
* @LastEditTime: 2024-05-27 09:47:19
|
8427
8424
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8428
8425
|
*
|
8429
8426
|
*/
|
8430
8427
|
const FormatImage = forwardRef((props, ref) => {
|
8431
8428
|
const { src, onLoad, style, className, loading } = props;
|
8432
8429
|
const [imgSrc, setImgSrc] = useState();
|
8430
|
+
const { swiperRef } = useSxpDataSource();
|
8433
8431
|
useImperativeHandle(ref, () => ({
|
8434
8432
|
setSrc: (v) => {
|
8435
8433
|
setImgSrc(v);
|
8436
8434
|
}
|
8437
8435
|
}));
|
8438
8436
|
useEffect(() => {
|
8439
|
-
|
8440
|
-
|
8437
|
+
var _a, _b;
|
8438
|
+
// 首屏不加载第二屏之后的图片
|
8439
|
+
const index = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
|
8440
|
+
if (index === 0 || index > 0)
|
8441
|
+
setImgSrc(src);
|
8442
|
+
}, [src, swiperRef]);
|
8441
8443
|
useRef(null);
|
8442
8444
|
// useEffect(() => {
|
8443
8445
|
// let observer: any = null;
|
@@ -8527,9 +8529,9 @@ const CommodityDetail$1 = (_a) => {
|
|
8527
8529
|
const renderContent = ({ isPost }) => {
|
8528
8530
|
var _a, _b, _c;
|
8529
8531
|
return (React.createElement("div", null,
|
8530
|
-
React.createElement("div", { className: 'pb-commondity-content-collection', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
|
8531
|
-
React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
8532
|
-
React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
8532
|
+
React.createElement("div", { className: 'pb-commondity-content-collection', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
|
8533
|
+
React.createElement("div", { className: 'pb-commondity-content-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
8534
|
+
React.createElement("div", { className: 'pb-commondity-content-price', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
8533
8535
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8534
8536
|
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
8535
8537
|
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
@@ -8541,6 +8543,12 @@ const CommodityDetail$1 = (_a) => {
|
|
8541
8543
|
var _a;
|
8542
8544
|
return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
|
8543
8545
|
};
|
8546
|
+
const getStyle = useCallback((style) => {
|
8547
|
+
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
8548
|
+
return Object.assign(Object.assign({}, style), { overflow: 'hidden', WebkitLineClamp: style === null || style === void 0 ? void 0 : style.lineClamp, textOverflow: 'ellipsis', display: '-webkit-box', webkitBoxOrient: 'vertical' });
|
8549
|
+
}
|
8550
|
+
return style;
|
8551
|
+
}, []);
|
8544
8552
|
return (React.createElement("div", { className: 'pb-commondity' },
|
8545
8553
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
8546
8554
|
product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
|
@@ -8563,7 +8571,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8563
8571
|
width: '100%',
|
8564
8572
|
objectFit: 'cover',
|
8565
8573
|
display: 'block',
|
8566
|
-
|
8574
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
8567
8575
|
}, src: src }))));
|
8568
8576
|
}))),
|
8569
8577
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -8817,7 +8825,7 @@ var _a$2, _b$2;
|
|
8817
8825
|
* @Author: binruan@chatlabs.com
|
8818
8826
|
* @Date: 2024-03-26 16:50:25
|
8819
8827
|
* @LastEditors: binruan@chatlabs.com
|
8820
|
-
* @LastEditTime: 2024-
|
8828
|
+
* @LastEditTime: 2024-05-27 17:31:27
|
8821
8829
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
8822
8830
|
*
|
8823
8831
|
*/
|
@@ -8852,7 +8860,7 @@ var settingRender$2 = [
|
|
8852
8860
|
label: '居中垂直偏移',
|
8853
8861
|
type: 'Number',
|
8854
8862
|
name: ['props', 'swiper', 'translateY'],
|
8855
|
-
min: -
|
8863
|
+
min: -1000,
|
8856
8864
|
addonAfter: '%',
|
8857
8865
|
initialValue: 0
|
8858
8866
|
}
|
@@ -9071,6 +9079,12 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9071
9079
|
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
9072
9080
|
Made in Italy` })));
|
9073
9081
|
};
|
9082
|
+
const getStyle = useCallback((style) => {
|
9083
|
+
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
9084
|
+
return Object.assign(Object.assign({}, style), { overflow: 'hidden', WebkitLineClamp: style === null || style === void 0 ? void 0 : style.lineClamp, textOverflow: 'ellipsis', display: '-webkit-box', webkitBoxOrient: 'vertical' });
|
9085
|
+
}
|
9086
|
+
return style;
|
9087
|
+
}, []);
|
9074
9088
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
9075
9089
|
React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
|
9076
9090
|
product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
|
@@ -9093,7 +9107,7 @@ Made in Italy` })));
|
|
9093
9107
|
width: '100%',
|
9094
9108
|
objectFit: 'cover',
|
9095
9109
|
display: 'block',
|
9096
|
-
|
9110
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9097
9111
|
}, src: src }))));
|
9098
9112
|
}))),
|
9099
9113
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -9113,11 +9127,11 @@ Made in Italy` })));
|
|
9113
9127
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
9114
9128
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
9115
9129
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
9116
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours
|
9117
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage
|
9130
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title) }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours BagLarge'),
|
9131
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection) }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge')),
|
9118
9132
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
9119
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
9120
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
|
9133
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) }, priceText),
|
9134
|
+
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) }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
|
9121
9135
|
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
|
9122
9136
|
productInfoText({ isPost }))),
|
9123
9137
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|
@@ -9301,7 +9315,7 @@ var settingRender$1 = [
|
|
9301
9315
|
label: '居中垂直偏移',
|
9302
9316
|
type: 'Number',
|
9303
9317
|
name: ['props', 'translateY'],
|
9304
|
-
min: -
|
9318
|
+
min: -1000,
|
9305
9319
|
addonAfter: '%',
|
9306
9320
|
initialValue: 0
|
9307
9321
|
}
|
@@ -9508,11 +9522,11 @@ var EventProvider$1 = memo(EventProvider);
|
|
9508
9522
|
var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
|
9509
9523
|
|
9510
9524
|
const Commodity$1 = (_a) => {
|
9511
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9525
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9512
9526
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9513
9527
|
const { sxpParameter } = useSxpDataSource();
|
9514
9528
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9515
|
-
const src = (
|
9529
|
+
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;
|
9516
9530
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9517
9531
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9518
9532
|
React.createElement(FormatImage$1, { className: css({
|
@@ -9520,7 +9534,7 @@ const Commodity$1 = (_a) => {
|
|
9520
9534
|
objectFit: 'cover',
|
9521
9535
|
height: '100%',
|
9522
9536
|
display: 'block',
|
9523
|
-
|
9537
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
9524
9538
|
}), src: src })),
|
9525
9539
|
React.createElement("div", { className: css({
|
9526
9540
|
color: '#fff',
|
@@ -9530,8 +9544,8 @@ const Commodity$1 = (_a) => {
|
|
9530
9544
|
width: '100%',
|
9531
9545
|
overflow: 'hidden'
|
9532
9546
|
}) },
|
9533
|
-
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9534
|
-
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9547
|
+
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_g = product === null || product === void 0 ? void 0 : product.title) !== null && _g !== void 0 ? _g : 'Product Name'),
|
9548
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_j = (_h = product === null || product === void 0 ? void 0 : product.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop Now'))));
|
9535
9549
|
};
|
9536
9550
|
var CommodityComponent = memo(Commodity$1);
|
9537
9551
|
|
@@ -9757,11 +9771,11 @@ var interactionRender$4 = [
|
|
9757
9771
|
var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
|
9758
9772
|
|
9759
9773
|
const CommodityDiro$1 = (_a) => {
|
9760
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9774
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9761
9775
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9762
9776
|
const { sxpParameter } = useSxpDataSource();
|
9763
9777
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9764
|
-
const src = (
|
9778
|
+
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;
|
9765
9779
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9766
9780
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9767
9781
|
React.createElement(FormatImage$1, { className: css({
|
@@ -9769,7 +9783,7 @@ const CommodityDiro$1 = (_a) => {
|
|
9769
9783
|
objectFit: 'cover',
|
9770
9784
|
height: '100%',
|
9771
9785
|
display: 'block',
|
9772
|
-
|
9786
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
9773
9787
|
}), src: src })),
|
9774
9788
|
React.createElement("div", { className: css({
|
9775
9789
|
color: '#fff',
|
@@ -9779,8 +9793,8 @@ const CommodityDiro$1 = (_a) => {
|
|
9779
9793
|
width: '100%',
|
9780
9794
|
overflow: 'hidden'
|
9781
9795
|
}) },
|
9782
|
-
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9783
|
-
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9796
|
+
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_g = product === null || product === void 0 ? void 0 : product.title) !== null && _g !== void 0 ? _g : 'Product Name'),
|
9797
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_j = (_h = product === null || product === void 0 ? void 0 : product.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop Now'))));
|
9784
9798
|
};
|
9785
9799
|
var CommodityDiroComponent = memo(CommodityDiro$1);
|
9786
9800
|
|
@@ -9855,11 +9869,11 @@ var interactionRender$3 = [
|
|
9855
9869
|
var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
|
9856
9870
|
|
9857
9871
|
const CommodityDiroNew$1 = (_a) => {
|
9858
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9872
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9859
9873
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9860
9874
|
const { sxpParameter } = useSxpDataSource();
|
9861
9875
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9862
|
-
const src = (
|
9876
|
+
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;
|
9863
9877
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9864
9878
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9865
9879
|
React.createElement(FormatImage$1, { className: css({
|
@@ -9867,7 +9881,7 @@ const CommodityDiroNew$1 = (_a) => {
|
|
9867
9881
|
objectFit: 'cover',
|
9868
9882
|
height: '100%',
|
9869
9883
|
display: 'block',
|
9870
|
-
|
9884
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
9871
9885
|
}), src: src })),
|
9872
9886
|
React.createElement("div", { className: css({
|
9873
9887
|
color: '#fff',
|
@@ -9877,8 +9891,8 @@ const CommodityDiroNew$1 = (_a) => {
|
|
9877
9891
|
width: '100%',
|
9878
9892
|
overflow: 'hidden'
|
9879
9893
|
}) },
|
9880
|
-
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9881
|
-
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9894
|
+
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_g = product === null || product === void 0 ? void 0 : product.title) !== null && _g !== void 0 ? _g : 'Product Name'),
|
9895
|
+
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_j = (_h = product === null || product === void 0 ? void 0 : product.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop now'))));
|
9882
9896
|
};
|
9883
9897
|
var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
|
9884
9898
|
|
@@ -10011,7 +10025,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
10011
10025
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
10012
10026
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
10013
10027
|
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, style: {
|
10014
|
-
|
10028
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
10015
10029
|
} })),
|
10016
10030
|
React.createElement("div", { className: css({
|
10017
10031
|
color: '#000',
|
@@ -10126,7 +10140,7 @@ const MultiCommodity$1 = (_a) => {
|
|
10126
10140
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
10127
10141
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
10128
10142
|
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, style: {
|
10129
|
-
|
10143
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
10130
10144
|
} })),
|
10131
10145
|
React.createElement("div", { className: css({
|
10132
10146
|
color: '#fff',
|
@@ -10240,7 +10254,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
10240
10254
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
10241
10255
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
10242
10256
|
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, style: {
|
10243
|
-
|
10257
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
10244
10258
|
} })),
|
10245
10259
|
React.createElement("div", { className: css({
|
10246
10260
|
color: '#fff',
|
@@ -12930,7 +12944,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
12930
12944
|
* @Author: binruan@chatlabs.com
|
12931
12945
|
* @Date: 2024-01-15 19:03:09
|
12932
12946
|
* @LastEditors: binruan@chatlabs.com
|
12933
|
-
* @LastEditTime: 2024-05-
|
12947
|
+
* @LastEditTime: 2024-05-29 17:41:35
|
12934
12948
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12935
12949
|
*
|
12936
12950
|
*/
|
@@ -13056,7 +13070,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13056
13070
|
useEffect(() => {
|
13057
13071
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
13058
13072
|
const visibleChange = () => {
|
13059
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
13073
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
13060
13074
|
if (document.visibilityState === 'hidden') {
|
13061
13075
|
// 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
|
13062
13076
|
// 移动端h5直接杀掉浏览器或宿主app时不会触发,pc端直接杀掉标签页时能触发
|
@@ -13067,16 +13081,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13067
13081
|
if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
13068
13082
|
fromKName = 'pdpPage';
|
13069
13083
|
}
|
13070
|
-
else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
|
13084
|
+
else if (popupDetailData && ((_g = tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item) === null || _g === void 0 ? void 0 : _g.type) === 'Appoint') {
|
13071
13085
|
fromKName = 'formPage';
|
13072
13086
|
}
|
13073
13087
|
else if (isFromHashtag) {
|
13074
13088
|
fromKName = 'hashTagPage';
|
13075
13089
|
}
|
13076
|
-
else if ((
|
13090
|
+
else if ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.url) {
|
13077
13091
|
fromKName = 'videoPage';
|
13078
13092
|
}
|
13079
|
-
else if (((
|
13093
|
+
else if (((_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.imgUrls) && ((_l = (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.imgUrls) === null || _l === void 0 ? void 0 : _l.length)) {
|
13080
13094
|
fromKName = 'imagePage';
|
13081
13095
|
}
|
13082
13096
|
else if (item === null || item === void 0 ? void 0 : item.product) {
|
@@ -13087,12 +13101,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13087
13101
|
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
13088
13102
|
eventSubject: 'sessionCompleted',
|
13089
13103
|
eventDescription: 'Session completed',
|
13090
|
-
contentId: (
|
13091
|
-
productId: (
|
13104
|
+
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
13105
|
+
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
13092
13106
|
position: activeIndex + '',
|
13093
13107
|
fromKName,
|
13094
13108
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
13095
|
-
ctatId: (
|
13109
|
+
ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : ''
|
13096
13110
|
}
|
13097
13111
|
});
|
13098
13112
|
}
|
@@ -13180,8 +13194,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13180
13194
|
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
13181
13195
|
React.createElement("div", { className: 'clc-sxp-bottom' },
|
13182
13196
|
React.createElement(Nudge, { nudge: nudge }),
|
13183
|
-
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)
|
13184
|
-
React.createElement(
|
13197
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)
|
13198
|
+
? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
13199
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })))
|
13200
|
+
: null,
|
13185
13201
|
React.createElement("div", null,
|
13186
13202
|
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
13187
13203
|
React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
|
@@ -13331,17 +13347,19 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13331
13347
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
|
13332
13348
|
}
|
13333
13349
|
return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
|
13334
|
-
return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading)
|
13335
|
-
|
13336
|
-
|
13337
|
-
|
13338
|
-
|
13339
|
-
|
13340
|
-
|
13341
|
-
|
13342
|
-
|
13343
|
-
|
13344
|
-
|
13350
|
+
return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading)
|
13351
|
+
? (React.createElement("div", { style: {
|
13352
|
+
height,
|
13353
|
+
width: containerWidth,
|
13354
|
+
display: 'flex',
|
13355
|
+
justifyContent: 'center',
|
13356
|
+
alignItems: 'center'
|
13357
|
+
} },
|
13358
|
+
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })))
|
13359
|
+
: (React.createElement(React.Fragment, null,
|
13360
|
+
renderContent(rec, index),
|
13361
|
+
renderBottom(rec, index),
|
13362
|
+
renderLikeButton(rec, index)))))));
|
13345
13363
|
});
|
13346
13364
|
}, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
|
13347
13365
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
@@ -13352,7 +13370,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13352
13370
|
} })),
|
13353
13371
|
renderLogo,
|
13354
13372
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13355
|
-
isShowFingerTip
|
13373
|
+
isShowFingerTip
|
13374
|
+
? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } }))
|
13375
|
+
: null,
|
13356
13376
|
React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
|
13357
13377
|
swiperRef.current.swiper.allowTouchMove = false;
|
13358
13378
|
setTimeout(() => {
|
@@ -13776,7 +13796,7 @@ var index$1 = memo(DiyPortalPreview);
|
|
13776
13796
|
* @Author: binruan@chatlabs.com
|
13777
13797
|
* @Date: 2023-10-31 10:56:01
|
13778
13798
|
* @LastEditors: binruan@chatlabs.com
|
13779
|
-
* @LastEditTime: 2024-05-
|
13799
|
+
* @LastEditTime: 2024-05-27 18:19:31
|
13780
13800
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
13781
13801
|
*
|
13782
13802
|
*/
|
@@ -13822,14 +13842,14 @@ const Popup = () => {
|
|
13822
13842
|
const renderPopupDetail = useMemo(() => {
|
13823
13843
|
var _a, _b, _c;
|
13824
13844
|
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
|
13825
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
13845
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
13826
13846
|
if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
|
13827
13847
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
13828
13848
|
const Component = withBindDataSource(t);
|
13829
13849
|
const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
13830
13850
|
const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
|
13831
13851
|
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
13832
|
-
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '
|
13852
|
+
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
|
13833
13853
|
}
|
13834
13854
|
else {
|
13835
13855
|
return React.createElement(React.Fragment, null);
|