pb-sxp-ui 1.0.69 → 1.0.71
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 +301 -174
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -2
- package/dist/index.js +301 -174
- 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 +304 -177
- 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/DiyPortalPreview/VideoWidget.js +3 -2
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
- package/es/core/components/SxpPageRender/FormatImage.js +1 -2
- package/es/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +5 -9
- package/es/core/components/SxpPageRender/index.d.ts +5 -0
- package/es/core/components/SxpPageRender/index.js +21 -24
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
- package/es/core/context/SxpDataSourceProvider.js +12 -4
- package/es/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/es/materials/sxp/HashTag/settingRender.js +0 -5
- package/es/materials/sxp/defaultSetting.d.ts +1 -4
- package/es/materials/sxp/defaultSetting.js +4 -5
- package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
- package/es/materials/sxp/popup/AppointForm/index.js +3 -8
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
- package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
- package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
- package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
- package/es/materials/sxp/popup/Prompt/index.js +2 -2
- package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
- package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
- package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/index.js +12 -6
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +12 -6
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +12 -6
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +7 -5
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
- package/es/materials/sxp/template/components/Img.d.ts +2 -1
- package/es/materials/sxp/template/components/Img.js +2 -2
- package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
- package/es/materials/sxp/template/components/settingRender.js +8 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
- package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
- package/lib/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -9
- package/lib/core/components/SxpPageRender/index.d.ts +5 -0
- package/lib/core/components/SxpPageRender/index.js +21 -24
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
- package/lib/core/context/SxpDataSourceProvider.js +12 -4
- package/lib/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/lib/materials/sxp/HashTag/settingRender.js +0 -5
- package/lib/materials/sxp/defaultSetting.d.ts +1 -4
- package/lib/materials/sxp/defaultSetting.js +4 -5
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
- package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
- package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
- package/lib/materials/sxp/popup/Prompt/index.js +2 -2
- package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
- package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
- package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/index.js +12 -6
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +12 -6
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +12 -6
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -5
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
- package/lib/materials/sxp/template/components/Img.d.ts +2 -1
- package/lib/materials/sxp/template/components/Img.js +2 -2
- package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
- package/lib/materials/sxp/template/components/settingRender.js +8 -0
- package/package.json +2 -3
package/dist/index.js
CHANGED
@@ -5,8 +5,8 @@ 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';
|
9
8
|
import * as ReactDOM from 'react-dom';
|
9
|
+
import Hls from 'hls.js';
|
10
10
|
|
11
11
|
/******************************************************************************
|
12
12
|
Copyright (c) Microsoft Corporation.
|
@@ -423,7 +423,7 @@ var DataSourceType;
|
|
423
423
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
424
424
|
})(DataSourceType || (DataSourceType = {}));
|
425
425
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
426
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false
|
426
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
|
427
427
|
const [rtcList, setRtcList] = useState([]);
|
428
428
|
const [tagList, setTagList] = useState([]);
|
429
429
|
const [loading, setLoading] = useState(false);
|
@@ -556,9 +556,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
556
556
|
if (!enableReportEvent || !enabledMetaConversionApi) {
|
557
557
|
return;
|
558
558
|
}
|
559
|
+
const fakeUserId = storeAndLoadFeUserId();
|
559
560
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
560
561
|
method: 'POST',
|
561
|
-
body: {
|
562
|
+
body: {
|
563
|
+
eventName,
|
564
|
+
actionSource,
|
565
|
+
eventSourceUrl,
|
566
|
+
userData: {
|
567
|
+
externalId: fakeUserId
|
568
|
+
}
|
569
|
+
},
|
562
570
|
type: 'beacon'
|
563
571
|
});
|
564
572
|
}, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
|
@@ -577,7 +585,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
577
585
|
// 获取 Tag
|
578
586
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
579
587
|
var _h, _j, _k, _l, _m;
|
580
|
-
if (!utmVal
|
588
|
+
if (!utmVal)
|
581
589
|
return;
|
582
590
|
try {
|
583
591
|
const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
@@ -590,7 +598,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
590
598
|
catch (e) {
|
591
599
|
console.log('e', e);
|
592
600
|
}
|
593
|
-
}), [bffFetch, utmVal
|
601
|
+
}), [bffFetch, utmVal]);
|
594
602
|
const ctaEvent = useCallback((eventInfo, rec, product, position) => {
|
595
603
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
596
604
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -923,23 +931,30 @@ var interactionRender$8 = [
|
|
923
931
|
}
|
924
932
|
];
|
925
933
|
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
934
|
+
/*
|
935
|
+
* @Author: binruan@chatlabs.com
|
936
|
+
* @Date: 2024-04-28 14:42:22
|
937
|
+
* @LastEditors: binruan@chatlabs.com
|
938
|
+
* @LastEditTime: 2024-05-23 17:01:21
|
939
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\defaultSetting.ts
|
940
|
+
*
|
941
|
+
*/
|
942
|
+
const fontOptions = [{ label: 'defalut', value: 'appFont' }];
|
943
|
+
const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
|
944
|
+
const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
|
930
945
|
var defaultSetting = {
|
931
|
-
fontOptions
|
946
|
+
fontOptions: [...fontOptions, ...data]
|
932
947
|
};
|
933
948
|
|
934
949
|
/*
|
935
950
|
* @Author: binruan@chatlabs.com
|
936
951
|
* @Date: 2023-07-28 18:29:57
|
937
952
|
* @LastEditors: binruan@chatlabs.com
|
938
|
-
* @LastEditTime:
|
953
|
+
* @LastEditTime: 2024-05-17 10:11:41
|
939
954
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
|
940
955
|
*
|
941
956
|
*/
|
942
|
-
var _a$
|
957
|
+
var _a$5, _b$5, _c;
|
943
958
|
var settingRender$5 = [
|
944
959
|
{
|
945
960
|
type: 'Text',
|
@@ -966,7 +981,7 @@ var settingRender$5 = [
|
|
966
981
|
type: 'Select',
|
967
982
|
name: ['textStyle', 'fontFamily'],
|
968
983
|
options: fontOptions,
|
969
|
-
initialValue: (_a$
|
984
|
+
initialValue: (_a$5 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$5 === void 0 ? void 0 : _a$5.value
|
970
985
|
},
|
971
986
|
{
|
972
987
|
type: 'Number',
|
@@ -1009,6 +1024,37 @@ var settingRender$5 = [
|
|
1009
1024
|
type: 'Text',
|
1010
1025
|
name: ['props', 'submitText']
|
1011
1026
|
},
|
1027
|
+
{
|
1028
|
+
type: 'Group',
|
1029
|
+
label: '提交按钮字体',
|
1030
|
+
child: [
|
1031
|
+
{
|
1032
|
+
type: 'Color',
|
1033
|
+
name: ['props', 'submitButtonStyle', 'color'],
|
1034
|
+
initialValue: '#fff'
|
1035
|
+
},
|
1036
|
+
{
|
1037
|
+
type: 'Select',
|
1038
|
+
name: ['props', 'submitButtonStyle', 'fontFamily'],
|
1039
|
+
options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
|
1040
|
+
initialValue: (_c = (_b$5 = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _b$5 === void 0 ? void 0 : _b$5[0]) === null || _c === void 0 ? void 0 : _c.value
|
1041
|
+
},
|
1042
|
+
{
|
1043
|
+
type: 'Number',
|
1044
|
+
name: ['props', 'submitButtonStyle', 'fontSize'],
|
1045
|
+
addonAfter: 'px',
|
1046
|
+
initialValue: 12
|
1047
|
+
}
|
1048
|
+
]
|
1049
|
+
},
|
1050
|
+
{
|
1051
|
+
type: 'TextStyle',
|
1052
|
+
name: ['props', 'submitButtonStyle']
|
1053
|
+
},
|
1054
|
+
{
|
1055
|
+
type: 'TextAlign',
|
1056
|
+
name: ['props', 'submitButtonStyle']
|
1057
|
+
},
|
1012
1058
|
{
|
1013
1059
|
label: '提交文本颜色',
|
1014
1060
|
type: 'Color',
|
@@ -1129,7 +1175,7 @@ function useEventReport() {
|
|
1129
1175
|
}
|
1130
1176
|
|
1131
1177
|
const AppointForm$1 = (_a) => {
|
1132
|
-
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
|
1178
|
+
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
|
1133
1179
|
const { submitForm, popupDetailData } = useSxpDataSource();
|
1134
1180
|
const { jumpToWeb } = useEventReport();
|
1135
1181
|
const formRef = useRef();
|
@@ -1160,7 +1206,7 @@ const AppointForm$1 = (_a) => {
|
|
1160
1206
|
key: '4'
|
1161
1207
|
}
|
1162
1208
|
], []);
|
1163
|
-
|
1209
|
+
useMemo(() => {
|
1164
1210
|
if (layoutType === undefined) {
|
1165
1211
|
const list = cloneDeep(columns) || defaultColumns;
|
1166
1212
|
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 } })));
|
@@ -1203,13 +1249,9 @@ const AppointForm$1 = (_a) => {
|
|
1203
1249
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1204
1250
|
React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
|
1205
1251
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
1206
|
-
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1207
|
-
React.createElement(BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1252
|
+
React.createElement("div", { className: 'pb-appoint-form-container' })),
|
1208
1253
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1209
|
-
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
1210
|
-
color: submitColor,
|
1211
|
-
background: submitBgColor
|
1212
|
-
} }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
|
1254
|
+
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))));
|
1213
1255
|
};
|
1214
1256
|
var AppointFormComponent = memo(AppointForm$1);
|
1215
1257
|
|
@@ -1257,23 +1299,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
|
|
1257
1299
|
sort: 2
|
1258
1300
|
});
|
1259
1301
|
|
1260
|
-
|
1261
|
-
* @Author: binruan@chatlabs.com
|
1262
|
-
* @Date: 2024-04-02 18:01:34
|
1263
|
-
* @LastEditors: binruan@chatlabs.com
|
1264
|
-
* @LastEditTime: 2024-04-12 16:46:04
|
1265
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
|
1266
|
-
*
|
1267
|
-
*/
|
1268
|
-
var _a$3, _b$3;
|
1269
|
-
/*
|
1270
|
-
* @Author: binruan@chatlabs.com
|
1271
|
-
* @Date: 2024-03-26 16:50:25
|
1272
|
-
* @LastEditors: binruan@chatlabs.com
|
1273
|
-
* @LastEditTime: 2024-03-28 18:42:26
|
1274
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
1275
|
-
*
|
1276
|
-
*/
|
1302
|
+
var _a$4, _b$4;
|
1277
1303
|
var settingRender$4 = [
|
1278
1304
|
{
|
1279
1305
|
title: '商品图片',
|
@@ -1297,6 +1323,19 @@ var settingRender$4 = [
|
|
1297
1323
|
type: 'Number',
|
1298
1324
|
name: ['props', 'swiper', 'delay'],
|
1299
1325
|
addonAfter: 's'
|
1326
|
+
},
|
1327
|
+
{
|
1328
|
+
type: 'Group',
|
1329
|
+
child: [
|
1330
|
+
{
|
1331
|
+
label: '居中垂直偏移',
|
1332
|
+
type: 'Number',
|
1333
|
+
name: ['props', 'swiper', 'translateY'],
|
1334
|
+
min: -100,
|
1335
|
+
addonAfter: '%',
|
1336
|
+
initialValue: 0
|
1337
|
+
}
|
1338
|
+
]
|
1300
1339
|
}
|
1301
1340
|
]
|
1302
1341
|
},
|
@@ -1331,6 +1370,23 @@ var settingRender$4 = [
|
|
1331
1370
|
name: ['props', 'commodityStyles', 'field'],
|
1332
1371
|
initialValue: 'title'
|
1333
1372
|
},
|
1373
|
+
{
|
1374
|
+
type: 'Group',
|
1375
|
+
child: [
|
1376
|
+
{
|
1377
|
+
label: '上边距',
|
1378
|
+
type: 'Number',
|
1379
|
+
addonAfter: 'px',
|
1380
|
+
name: ['marginTop']
|
1381
|
+
},
|
1382
|
+
{
|
1383
|
+
label: '下边距',
|
1384
|
+
type: 'Number',
|
1385
|
+
addonAfter: 'px',
|
1386
|
+
name: ['marginBottom']
|
1387
|
+
}
|
1388
|
+
]
|
1389
|
+
},
|
1334
1390
|
{
|
1335
1391
|
type: 'Group',
|
1336
1392
|
label: '标题字体',
|
@@ -1343,7 +1399,7 @@ var settingRender$4 = [
|
|
1343
1399
|
type: 'Select',
|
1344
1400
|
options: fontOptions,
|
1345
1401
|
name: ['fontFamily'],
|
1346
|
-
initialValue: (_a$
|
1402
|
+
initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
|
1347
1403
|
},
|
1348
1404
|
{
|
1349
1405
|
type: 'Number',
|
@@ -1423,7 +1479,7 @@ var settingRender$4 = [
|
|
1423
1479
|
type: 'Select',
|
1424
1480
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
1425
1481
|
options: fontOptions,
|
1426
|
-
initialValue: (_b$
|
1482
|
+
initialValue: (_b$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$4 === void 0 ? void 0 : _b$4.value
|
1427
1483
|
},
|
1428
1484
|
{
|
1429
1485
|
type: 'Number',
|
@@ -8368,7 +8424,7 @@ var ExpandableText$1 = memo(ExpandableText);
|
|
8368
8424
|
* @Author: binruan@chatlabs.com
|
8369
8425
|
* @Date: 2024-03-20 10:27:31
|
8370
8426
|
* @LastEditors: binruan@chatlabs.com
|
8371
|
-
* @LastEditTime: 2024-
|
8427
|
+
* @LastEditTime: 2024-04-19 14:12:55
|
8372
8428
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8373
8429
|
*
|
8374
8430
|
*/
|
@@ -8383,30 +8439,6 @@ const FormatImage = forwardRef((props, ref) => {
|
|
8383
8439
|
useEffect(() => {
|
8384
8440
|
setImgSrc(src);
|
8385
8441
|
}, [src]);
|
8386
|
-
useRef(null);
|
8387
|
-
// useEffect(() => {
|
8388
|
-
// let observer: any = null;
|
8389
|
-
// const { current } = imgRef;
|
8390
|
-
// if (current) {
|
8391
|
-
// observer = new IntersectionObserver(
|
8392
|
-
// (entries) => {
|
8393
|
-
// entries.forEach((entry) => {
|
8394
|
-
// if (entry.isIntersecting) {
|
8395
|
-
// setImgSrc(src);
|
8396
|
-
// observer.unobserve(current);
|
8397
|
-
// }
|
8398
|
-
// });
|
8399
|
-
// },
|
8400
|
-
// { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8401
|
-
// );
|
8402
|
-
// observer.observe(current);
|
8403
|
-
// }
|
8404
|
-
// return () => {
|
8405
|
-
// if (observer && current) {
|
8406
|
-
// observer.unobserve(current);
|
8407
|
-
// }
|
8408
|
-
// };
|
8409
|
-
// }, [src]);
|
8410
8442
|
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
8411
8443
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
8412
8444
|
React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
@@ -8503,7 +8535,13 @@ const CommodityDetail$1 = (_a) => {
|
|
8503
8535
|
width,
|
8504
8536
|
height: width
|
8505
8537
|
} },
|
8506
|
-
React.createElement(FormatImage$1, { style: {
|
8538
|
+
React.createElement(FormatImage$1, { style: {
|
8539
|
+
height: '100%',
|
8540
|
+
width: '100%',
|
8541
|
+
objectFit: 'cover',
|
8542
|
+
display: 'block',
|
8543
|
+
transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
|
8544
|
+
}, src: src }))));
|
8507
8545
|
}))),
|
8508
8546
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
8509
8547
|
position: 'relative',
|
@@ -8552,7 +8590,9 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
8552
8590
|
commodityStyles: {
|
8553
8591
|
price: {
|
8554
8592
|
color: '#000',
|
8555
|
-
fontSize: 18
|
8593
|
+
fontSize: 18,
|
8594
|
+
marginTop: 24,
|
8595
|
+
marginBottom: 10
|
8556
8596
|
},
|
8557
8597
|
title: {
|
8558
8598
|
color: '#000',
|
@@ -8560,7 +8600,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
8560
8600
|
},
|
8561
8601
|
collection: {
|
8562
8602
|
fontSize: 12,
|
8563
|
-
color: '#000'
|
8603
|
+
color: '#000',
|
8604
|
+
marginBottom: 14
|
8564
8605
|
},
|
8565
8606
|
info: {
|
8566
8607
|
color: 'gray',
|
@@ -8599,26 +8640,68 @@ var interactionRender$7 = [
|
|
8599
8640
|
* @Author: binruan@chatlabs.com
|
8600
8641
|
* @Date: 2023-10-27 14:06:35
|
8601
8642
|
* @LastEditors: binruan@chatlabs.com
|
8602
|
-
* @LastEditTime:
|
8643
|
+
* @LastEditTime: 2024-05-17 10:29:41
|
8603
8644
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
|
8604
8645
|
*
|
8605
8646
|
*/
|
8647
|
+
var _a$3, _b$3;
|
8606
8648
|
var settingRender$3 = [
|
8607
8649
|
{
|
8608
|
-
|
8609
|
-
|
8610
|
-
|
8611
|
-
|
8612
|
-
|
8613
|
-
|
8614
|
-
|
8615
|
-
|
8616
|
-
|
8617
|
-
|
8618
|
-
|
8619
|
-
|
8620
|
-
|
8621
|
-
|
8650
|
+
title: '',
|
8651
|
+
child: [
|
8652
|
+
{
|
8653
|
+
type: 'Media',
|
8654
|
+
label: '图标',
|
8655
|
+
name: ['props', 'icon'],
|
8656
|
+
mediaType: 'Image'
|
8657
|
+
},
|
8658
|
+
{
|
8659
|
+
type: 'TextArea',
|
8660
|
+
label: '内容',
|
8661
|
+
name: ['props', 'content']
|
8662
|
+
},
|
8663
|
+
{
|
8664
|
+
type: 'Text',
|
8665
|
+
label: '按钮文案',
|
8666
|
+
name: ['props', 'btnText']
|
8667
|
+
},
|
8668
|
+
{
|
8669
|
+
type: 'Group',
|
8670
|
+
label: '提交按钮字体',
|
8671
|
+
child: [
|
8672
|
+
{
|
8673
|
+
type: 'Color',
|
8674
|
+
name: ['props', 'submitButtonStyle', 'color'],
|
8675
|
+
initialValue: '#fff'
|
8676
|
+
},
|
8677
|
+
{
|
8678
|
+
type: 'Select',
|
8679
|
+
name: ['props', 'submitButtonStyle', 'fontFamily'],
|
8680
|
+
options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
|
8681
|
+
initialValue: (_b$3 = (_a$3 = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _a$3 === void 0 ? void 0 : _a$3[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
|
8682
|
+
},
|
8683
|
+
{
|
8684
|
+
type: 'Number',
|
8685
|
+
name: ['props', 'submitButtonStyle', 'fontSize'],
|
8686
|
+
addonAfter: 'px',
|
8687
|
+
initialValue: 12
|
8688
|
+
}
|
8689
|
+
]
|
8690
|
+
},
|
8691
|
+
{
|
8692
|
+
type: 'TextStyle',
|
8693
|
+
name: ['props', 'submitButtonStyle']
|
8694
|
+
},
|
8695
|
+
{
|
8696
|
+
type: 'TextAlign',
|
8697
|
+
name: ['props', 'submitButtonStyle']
|
8698
|
+
},
|
8699
|
+
{
|
8700
|
+
label: '提交按钮颜色',
|
8701
|
+
type: 'Color',
|
8702
|
+
name: ['props', 'submitButtonStyle', 'backgroundColor']
|
8703
|
+
}
|
8704
|
+
]
|
8622
8705
|
}
|
8623
8706
|
];
|
8624
8707
|
|
@@ -8657,7 +8740,7 @@ const getMediaValueByMode = (obj) => {
|
|
8657
8740
|
};
|
8658
8741
|
|
8659
8742
|
const Prompt$1 = (_a) => {
|
8660
|
-
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
|
8743
|
+
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
|
8661
8744
|
const { popupDetailData } = useSxpDataSource();
|
8662
8745
|
const { jumpToWeb } = useEventReport();
|
8663
8746
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
@@ -8679,7 +8762,7 @@ const Prompt$1 = (_a) => {
|
|
8679
8762
|
React.createElement("div", { className: 'pb-prompt-icon' },
|
8680
8763
|
React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
|
8681
8764
|
React.createElement("div", { className: 'pb-prompt-content' }, content),
|
8682
|
-
React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
|
8765
|
+
React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
|
8683
8766
|
};
|
8684
8767
|
var PromptComponent = memo(Prompt$1);
|
8685
8768
|
|
@@ -8738,6 +8821,19 @@ var settingRender$2 = [
|
|
8738
8821
|
type: 'Number',
|
8739
8822
|
name: ['props', 'swiper', 'delay'],
|
8740
8823
|
addonAfter: 's'
|
8824
|
+
},
|
8825
|
+
{
|
8826
|
+
type: 'Group',
|
8827
|
+
child: [
|
8828
|
+
{
|
8829
|
+
label: '居中垂直偏移',
|
8830
|
+
type: 'Number',
|
8831
|
+
name: ['props', 'swiper', 'translateY'],
|
8832
|
+
min: -100,
|
8833
|
+
addonAfter: '%',
|
8834
|
+
initialValue: 0
|
8835
|
+
}
|
8836
|
+
]
|
8741
8837
|
}
|
8742
8838
|
]
|
8743
8839
|
},
|
@@ -8969,7 +9065,13 @@ Made in Italy` })));
|
|
8969
9065
|
width,
|
8970
9066
|
height: width
|
8971
9067
|
} },
|
8972
|
-
React.createElement(FormatImage$1, { style: {
|
9068
|
+
React.createElement(FormatImage$1, { style: {
|
9069
|
+
height: '100%',
|
9070
|
+
width: '100%',
|
9071
|
+
objectFit: 'cover',
|
9072
|
+
display: 'block',
|
9073
|
+
transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
|
9074
|
+
}, src: src }))));
|
8973
9075
|
}))),
|
8974
9076
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
8975
9077
|
position: 'relative',
|
@@ -9070,7 +9172,7 @@ var _a$1, _b$1;
|
|
9070
9172
|
* @Author: binruan@chatlabs.com
|
9071
9173
|
* @Date: 2024-03-26 16:50:25
|
9072
9174
|
* @LastEditors: binruan@chatlabs.com
|
9073
|
-
* @LastEditTime: 2024-
|
9175
|
+
* @LastEditTime: 2024-05-21 16:39:34
|
9074
9176
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
9075
9177
|
*
|
9076
9178
|
*/
|
@@ -9171,6 +9273,14 @@ var settingRender$1 = [
|
|
9171
9273
|
label: '与右侧边距',
|
9172
9274
|
addonAfter: 'px',
|
9173
9275
|
name: ['props', 'ctaTempStyles', 'img', 'marginRight']
|
9276
|
+
},
|
9277
|
+
{
|
9278
|
+
label: '居中垂直偏移',
|
9279
|
+
type: 'Number',
|
9280
|
+
name: ['props', 'translateY'],
|
9281
|
+
min: -100,
|
9282
|
+
addonAfter: '%',
|
9283
|
+
initialValue: 0
|
9174
9284
|
}
|
9175
9285
|
]
|
9176
9286
|
},
|
@@ -9375,14 +9485,20 @@ var EventProvider$1 = memo(EventProvider);
|
|
9375
9485
|
var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
|
9376
9486
|
|
9377
9487
|
const Commodity$1 = (_a) => {
|
9378
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
9379
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
9488
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
9489
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9380
9490
|
const { sxpParameter } = useSxpDataSource();
|
9381
9491
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9382
|
-
const src = (
|
9492
|
+
const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
|
9383
9493
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9384
9494
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9385
|
-
React.createElement(FormatImage$1, { className: css({
|
9495
|
+
React.createElement(FormatImage$1, { className: css({
|
9496
|
+
width: '100%',
|
9497
|
+
objectFit: 'cover',
|
9498
|
+
height: '100%',
|
9499
|
+
display: 'block',
|
9500
|
+
transform: `translateY(${translateY}%)`
|
9501
|
+
}), src: src })),
|
9386
9502
|
React.createElement("div", { className: css({
|
9387
9503
|
color: '#fff',
|
9388
9504
|
display: 'flex',
|
@@ -9391,8 +9507,8 @@ const Commodity$1 = (_a) => {
|
|
9391
9507
|
width: '100%',
|
9392
9508
|
overflow: 'hidden'
|
9393
9509
|
}) },
|
9394
|
-
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9395
|
-
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)) }, (
|
9510
|
+
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
|
9511
|
+
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)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now'))));
|
9396
9512
|
};
|
9397
9513
|
var CommodityComponent = memo(Commodity$1);
|
9398
9514
|
|
@@ -9618,14 +9734,20 @@ var interactionRender$4 = [
|
|
9618
9734
|
var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
|
9619
9735
|
|
9620
9736
|
const CommodityDiro$1 = (_a) => {
|
9621
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
9622
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
9737
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
9738
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9623
9739
|
const { sxpParameter } = useSxpDataSource();
|
9624
9740
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9625
|
-
const src = (
|
9741
|
+
const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
|
9626
9742
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9627
9743
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9628
|
-
React.createElement(FormatImage$1, { className: css({
|
9744
|
+
React.createElement(FormatImage$1, { className: css({
|
9745
|
+
width: '100%',
|
9746
|
+
objectFit: 'cover',
|
9747
|
+
height: '100%',
|
9748
|
+
display: 'block',
|
9749
|
+
transform: `translateY(${translateY}%)`
|
9750
|
+
}), src: src })),
|
9629
9751
|
React.createElement("div", { className: css({
|
9630
9752
|
color: '#fff',
|
9631
9753
|
display: 'flex',
|
@@ -9634,8 +9756,8 @@ const CommodityDiro$1 = (_a) => {
|
|
9634
9756
|
width: '100%',
|
9635
9757
|
overflow: 'hidden'
|
9636
9758
|
}) },
|
9637
|
-
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9638
|
-
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)) }, (
|
9759
|
+
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
|
9760
|
+
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)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now'))));
|
9639
9761
|
};
|
9640
9762
|
var CommodityDiroComponent = memo(CommodityDiro$1);
|
9641
9763
|
|
@@ -9710,14 +9832,20 @@ var interactionRender$3 = [
|
|
9710
9832
|
var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
|
9711
9833
|
|
9712
9834
|
const CommodityDiroNew$1 = (_a) => {
|
9713
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
9714
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
9835
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
9836
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9715
9837
|
const { sxpParameter } = useSxpDataSource();
|
9716
9838
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9717
|
-
const src = (
|
9839
|
+
const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
|
9718
9840
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9719
9841
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9720
|
-
React.createElement(FormatImage$1, { className: css({
|
9842
|
+
React.createElement(FormatImage$1, { className: css({
|
9843
|
+
width: '100%',
|
9844
|
+
objectFit: 'cover',
|
9845
|
+
height: '100%',
|
9846
|
+
display: 'block',
|
9847
|
+
transform: `translateY(${translateY}%)`
|
9848
|
+
}), src: src })),
|
9721
9849
|
React.createElement("div", { className: css({
|
9722
9850
|
color: '#fff',
|
9723
9851
|
display: 'flex',
|
@@ -9726,8 +9854,8 @@ const CommodityDiroNew$1 = (_a) => {
|
|
9726
9854
|
width: '100%',
|
9727
9855
|
overflow: 'hidden'
|
9728
9856
|
}) },
|
9729
|
-
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9730
|
-
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9857
|
+
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
|
9858
|
+
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop now'))));
|
9731
9859
|
};
|
9732
9860
|
var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
|
9733
9861
|
|
@@ -9809,11 +9937,11 @@ var Scroll$1 = memo(Scroll);
|
|
9809
9937
|
* @Author: binruan@chatlabs.com
|
9810
9938
|
* @Date: 2024-01-16 14:50:13
|
9811
9939
|
* @LastEditors: binruan@chatlabs.com
|
9812
|
-
* @LastEditTime: 2024-
|
9940
|
+
* @LastEditTime: 2024-05-21 16:34:13
|
9813
9941
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
|
9814
9942
|
*
|
9815
9943
|
*/
|
9816
|
-
const Img = ({ src, rec, item, index }) => {
|
9944
|
+
const Img = ({ src, rec, item, index, style }) => {
|
9817
9945
|
const ref = useRef(null);
|
9818
9946
|
const isOnScreen = useOnScreen(ref);
|
9819
9947
|
const { ctaEvent } = useSxpDataSource();
|
@@ -9826,7 +9954,7 @@ const Img = ({ src, rec, item, index }) => {
|
|
9826
9954
|
}
|
9827
9955
|
}, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
|
9828
9956
|
return (React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
|
9829
|
-
React.createElement(FormatImage$1, { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })));
|
9957
|
+
React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }, style)), src: src })));
|
9830
9958
|
};
|
9831
9959
|
var Img$1 = memo(Img);
|
9832
9960
|
|
@@ -9834,7 +9962,7 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
|
|
9834
9962
|
|
9835
9963
|
const MultiCommodityDiro$1 = (_a) => {
|
9836
9964
|
var _b, _c;
|
9837
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
9965
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
9838
9966
|
const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
|
9839
9967
|
const { popup } = useEditor();
|
9840
9968
|
const { jumpToWeb } = useEventReport();
|
@@ -9856,10 +9984,12 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
9856
9984
|
}
|
9857
9985
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
9858
9986
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
9859
|
-
var _a, _b, _c, _d, _e, _f;
|
9987
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9860
9988
|
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) }),
|
9861
9989
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9862
|
-
React.createElement(Img$1, { src: (
|
9990
|
+
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: {
|
9991
|
+
transform: `translateY(${translateY}%)`
|
9992
|
+
} })),
|
9863
9993
|
React.createElement("div", { className: css({
|
9864
9994
|
color: '#000',
|
9865
9995
|
display: 'flex',
|
@@ -9868,8 +9998,8 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
9868
9998
|
width: '100%',
|
9869
9999
|
overflow: 'hidden'
|
9870
10000
|
}) },
|
9871
|
-
React.createElement("div", { className: styles$2['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9872
|
-
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)) }, (
|
10001
|
+
React.createElement("div", { className: styles$2['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
10002
|
+
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)) }, (_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'))));
|
9873
10003
|
})));
|
9874
10004
|
};
|
9875
10005
|
var MultiCommodityDiroComponent = memo(MultiCommodityDiro$1);
|
@@ -9946,7 +10076,7 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
|
|
9946
10076
|
|
9947
10077
|
const MultiCommodity$1 = (_a) => {
|
9948
10078
|
var _b, _c;
|
9949
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
10079
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
9950
10080
|
const { sxpParameter } = useSxpDataSource();
|
9951
10081
|
const { ctaEvent, setPopupDetailData } = useSxpDataSource();
|
9952
10082
|
const { popup } = useEditor();
|
@@ -9969,10 +10099,12 @@ const MultiCommodity$1 = (_a) => {
|
|
9969
10099
|
}
|
9970
10100
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
9971
10101
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
9972
|
-
var _a, _b, _c, _d, _e, _f;
|
10102
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9973
10103
|
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) }),
|
9974
10104
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9975
|
-
React.createElement(Img$1, { src: (
|
10105
|
+
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: {
|
10106
|
+
transform: `translateY(${translateY}%)`
|
10107
|
+
} })),
|
9976
10108
|
React.createElement("div", { className: css({
|
9977
10109
|
color: '#fff',
|
9978
10110
|
display: 'flex',
|
@@ -9981,8 +10113,8 @@ const MultiCommodity$1 = (_a) => {
|
|
9981
10113
|
width: '100%',
|
9982
10114
|
overflow: 'hidden'
|
9983
10115
|
}) },
|
9984
|
-
React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9985
|
-
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)) }, (
|
10116
|
+
React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
10117
|
+
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)) }, (_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'))));
|
9986
10118
|
})));
|
9987
10119
|
};
|
9988
10120
|
var MultiCommodityComponent = memo(MultiCommodity$1);
|
@@ -10059,7 +10191,7 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
|
|
10059
10191
|
|
10060
10192
|
const MultiCommodityDiroNew$1 = (_a) => {
|
10061
10193
|
var _b, _c;
|
10062
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
10194
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
10063
10195
|
const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
|
10064
10196
|
const { popup } = useEditor();
|
10065
10197
|
const { jumpToWeb } = useEventReport();
|
@@ -10081,10 +10213,12 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
10081
10213
|
}
|
10082
10214
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
10083
10215
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
10084
|
-
var _a, _b, _c, _d, _e, _f;
|
10216
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10085
10217
|
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) }),
|
10086
10218
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
10087
|
-
React.createElement(Img$1, { src: (
|
10219
|
+
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: {
|
10220
|
+
transform: `translateY(${translateY}%)`
|
10221
|
+
} })),
|
10088
10222
|
React.createElement("div", { className: css({
|
10089
10223
|
color: '#fff',
|
10090
10224
|
display: 'flex',
|
@@ -10094,8 +10228,8 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
10094
10228
|
overflow: 'hidden',
|
10095
10229
|
lineHeight: '20px'
|
10096
10230
|
}) },
|
10097
|
-
React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
10098
|
-
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
10231
|
+
React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
10232
|
+
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_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'))));
|
10099
10233
|
})));
|
10100
10234
|
};
|
10101
10235
|
var MultiCommodityDiroNewComponent = memo(MultiCommodityDiroNew$1);
|
@@ -10104,7 +10238,7 @@ var MultiCommodityDiroNewComponent = memo(MultiCommodityDiroNew$1);
|
|
10104
10238
|
* @Author: binruan@chatlabs.com
|
10105
10239
|
* @Date: 2023-07-28 18:29:57
|
10106
10240
|
* @LastEditors: binruan@chatlabs.com
|
10107
|
-
* @LastEditTime: 2024-
|
10241
|
+
* @LastEditTime: 2024-05-21 16:44:00
|
10108
10242
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
|
10109
10243
|
*
|
10110
10244
|
*/
|
@@ -10162,7 +10296,7 @@ var _a, _b;
|
|
10162
10296
|
* @Author: binruan@chatlabs.com
|
10163
10297
|
* @Date: 2024-04-07 14:07:12
|
10164
10298
|
* @LastEditors: binruan@chatlabs.com
|
10165
|
-
* @LastEditTime: 2024-
|
10299
|
+
* @LastEditTime: 2024-05-23 11:03:15
|
10166
10300
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
10167
10301
|
*
|
10168
10302
|
*/
|
@@ -10170,11 +10304,11 @@ var settingRender = [
|
|
10170
10304
|
{
|
10171
10305
|
title: '卡片样式',
|
10172
10306
|
child: [
|
10173
|
-
{
|
10174
|
-
|
10175
|
-
|
10176
|
-
|
10177
|
-
},
|
10307
|
+
// {
|
10308
|
+
// type: 'Number',
|
10309
|
+
// label: '文本行数',
|
10310
|
+
// name: ['props', 'lineClamp']
|
10311
|
+
// },
|
10178
10312
|
{
|
10179
10313
|
type: 'Number',
|
10180
10314
|
label: '上下边距',
|
@@ -11658,19 +11792,15 @@ const WaterfallFlowItem = (props) => {
|
|
11658
11792
|
const canvasRef = useRef(null);
|
11659
11793
|
const [firstFrameSrc, setFirstFrameSrc] = useState('');
|
11660
11794
|
const src = useMemo(() => {
|
11661
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
11795
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
11662
11796
|
if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) {
|
11663
11797
|
return (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
|
11664
11798
|
}
|
11665
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.
|
11666
|
-
|
11667
|
-
return (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.url;
|
11668
|
-
}
|
11669
|
-
else if ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.imgUrls) === null || _f === void 0 ? void 0 : _f.length) {
|
11670
|
-
return (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.imgUrls) === null || _h === void 0 ? void 0 : _h[0];
|
11799
|
+
else if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.imgUrls) === null || _d === void 0 ? void 0 : _d.length) {
|
11800
|
+
return (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.imgUrls) === null || _f === void 0 ? void 0 : _f[0];
|
11671
11801
|
}
|
11672
|
-
else if ((
|
11673
|
-
return (
|
11802
|
+
else if ((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.homePage) === null || _h === void 0 ? void 0 : _h.length) {
|
11803
|
+
return (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.homePage) === null || _k === void 0 ? void 0 : _k[0];
|
11674
11804
|
}
|
11675
11805
|
else {
|
11676
11806
|
return (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) || '';
|
@@ -12314,7 +12444,6 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12314
12444
|
const videoSrc = rec.video.url;
|
12315
12445
|
if (!videoSrc)
|
12316
12446
|
return;
|
12317
|
-
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
12318
12447
|
setIsPauseVideo(false);
|
12319
12448
|
const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
|
12320
12449
|
const dom = document.querySelector('#player-container-id');
|
@@ -12322,6 +12451,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12322
12451
|
if (!dom && !dom2)
|
12323
12452
|
return;
|
12324
12453
|
videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
|
12454
|
+
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
12325
12455
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
|
12326
12456
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
|
12327
12457
|
// videoRef?.on('canplay', handleCanplay);
|
@@ -12461,7 +12591,7 @@ var ToggleButton$1 = memo(ToggleButton);
|
|
12461
12591
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
|
12462
12592
|
*
|
12463
12593
|
*/
|
12464
|
-
const FingerSwipeTip = ({ imageUrl }) => {
|
12594
|
+
const FingerSwipeTip = ({ imageUrl, style }) => {
|
12465
12595
|
const [show, setShow] = useState(true);
|
12466
12596
|
useEditor();
|
12467
12597
|
useEffect(() => {
|
@@ -12473,7 +12603,7 @@ const FingerSwipeTip = ({ imageUrl }) => {
|
|
12473
12603
|
const animationCls = useMemo(() => {
|
12474
12604
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
12475
12605
|
}, [show]);
|
12476
|
-
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}
|
12606
|
+
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
12477
12607
|
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
|
12478
12608
|
};
|
12479
12609
|
|
@@ -12719,7 +12849,7 @@ var RenderCard$1 = memo(RenderCard);
|
|
12719
12849
|
* @Author: binruan@chatlabs.com
|
12720
12850
|
* @Date: 2024-03-26 10:07:41
|
12721
12851
|
* @LastEditors: binruan@chatlabs.com
|
12722
|
-
* @LastEditTime: 2024-
|
12852
|
+
* @LastEditTime: 2024-05-23 14:31:12
|
12723
12853
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
|
12724
12854
|
*
|
12725
12855
|
*/
|
@@ -12732,8 +12862,8 @@ const Nudge = ({ nudge }) => {
|
|
12732
12862
|
backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
|
12733
12863
|
borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
|
12734
12864
|
} },
|
12735
|
-
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
|
12736
|
-
React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
|
12865
|
+
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
|
12866
|
+
React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', flex: 1, marginBottom: 0 }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
|
12737
12867
|
};
|
12738
12868
|
|
12739
12869
|
const DEFAULT_TAG = 'FOR U';
|
@@ -12777,12 +12907,12 @@ var Tagbar$1 = memo(Tagbar);
|
|
12777
12907
|
* @Author: binruan@chatlabs.com
|
12778
12908
|
* @Date: 2024-01-15 19:03:09
|
12779
12909
|
* @LastEditors: binruan@chatlabs.com
|
12780
|
-
* @LastEditTime: 2024-05-
|
12910
|
+
* @LastEditTime: 2024-05-23 10:41:27
|
12781
12911
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12782
12912
|
*
|
12783
12913
|
*/
|
12784
12914
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
12785
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
12915
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12786
12916
|
const { schema } = useEditor();
|
12787
12917
|
const [activeIndex, setActiveIndex] = useState(0);
|
12788
12918
|
const viewImageStartTime = useRef(0);
|
@@ -12837,29 +12967,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12837
12967
|
};
|
12838
12968
|
const firstRef = useRef();
|
12839
12969
|
useEffect(() => {
|
12840
|
-
|
12841
|
-
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
12970
|
+
if (!firstRef.current && !videoRef) {
|
12842
12971
|
firstRef.current = true;
|
12843
12972
|
const player = TCPlayer('player-container-id', {
|
12844
12973
|
licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
|
12845
12974
|
controls: false,
|
12975
|
+
autoplay: false,
|
12846
12976
|
loop: false,
|
12847
|
-
autoplay: true,
|
12848
12977
|
muted: true,
|
12849
12978
|
preload: 'auto',
|
12850
12979
|
posterImage: false,
|
12851
|
-
bigPlayButton: true
|
12852
|
-
sources: [
|
12853
|
-
{
|
12854
|
-
src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
|
12855
|
-
}
|
12856
|
-
]
|
12980
|
+
bigPlayButton: true
|
12857
12981
|
});
|
12858
12982
|
player === null || player === void 0 ? void 0 : player.ready(() => {
|
12859
12983
|
setVideoRef(player);
|
12860
12984
|
});
|
12861
12985
|
}
|
12862
|
-
}, [videoRef, licenseUrl
|
12986
|
+
}, [videoRef, licenseUrl]);
|
12863
12987
|
useEffect(() => {
|
12864
12988
|
if (!isInit)
|
12865
12989
|
handleH5EnterLink();
|
@@ -13048,7 +13172,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13048
13172
|
lineGradStyle
|
13049
13173
|
]);
|
13050
13174
|
const renderLikeButton = useCallback((rec, index) => {
|
13051
|
-
var _a, _b;
|
13175
|
+
var _a, _b, _c, _d;
|
13052
13176
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
13053
13177
|
return;
|
13054
13178
|
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
@@ -13057,8 +13181,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13057
13181
|
}
|
13058
13182
|
if (rec.video) {
|
13059
13183
|
return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
|
13060
|
-
|
13061
|
-
|
13184
|
+
[(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
|
13185
|
+
[(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
|
13062
13186
|
}, position: index }));
|
13063
13187
|
}
|
13064
13188
|
return null;
|
@@ -13085,7 +13209,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13085
13209
|
}
|
13086
13210
|
};
|
13087
13211
|
const handleScrollEvent = (swiper) => {
|
13088
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
13212
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13089
13213
|
viewTime.current = new Date();
|
13090
13214
|
const item = data[swiper.previousIndex];
|
13091
13215
|
if (!item)
|
@@ -13118,14 +13242,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13118
13242
|
}
|
13119
13243
|
// 商品浏览事件
|
13120
13244
|
handleReportProductView(item);
|
13245
|
+
const curItem = data[swiper.activeIndex];
|
13246
|
+
if (!((_j = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _j === void 0 ? void 0 : _j.url) && !((_k = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _k === void 0 ? void 0 : _k.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
|
13247
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13248
|
+
eventName: 'ProductView'
|
13249
|
+
});
|
13250
|
+
}
|
13121
13251
|
};
|
13122
13252
|
const handleReportProductView = (item) => {
|
13123
13253
|
var _a, _b, _c;
|
13124
13254
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && !((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) && (item === null || item === void 0 ? void 0 : item.product)) {
|
13125
13255
|
productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current, activeIndex);
|
13126
|
-
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13127
|
-
eventName: 'ProductView'
|
13128
|
-
});
|
13129
13256
|
}
|
13130
13257
|
};
|
13131
13258
|
useEffect(() => {
|
@@ -13196,7 +13323,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13196
13323
|
} })),
|
13197
13324
|
renderLogo,
|
13198
13325
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13199
|
-
isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
|
13326
|
+
isShowFingerTip ? (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)}%` } })) : null,
|
13200
13327
|
React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
|
13201
13328
|
swiperRef.current.swiper.allowTouchMove = false;
|
13202
13329
|
setTimeout(() => {
|
@@ -13238,13 +13365,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13238
13365
|
direction: 'vertical', height: height },
|
13239
13366
|
React.createElement(ToggleButton$1, { style: {
|
13240
13367
|
position: 'fixed',
|
13241
|
-
right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
|
13242
13368
|
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
13243
|
-
|
13244
|
-
|
13369
|
+
zIndex: 999,
|
13370
|
+
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
|
13371
|
+
[(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
|
13245
13372
|
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
|
13246
13373
|
renderView),
|
13247
|
-
React.createElement(WaterFall$1, Object.assign({}, (
|
13374
|
+
React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props)),
|
13248
13375
|
React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
|
13249
13376
|
React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
|
13250
13377
|
backgroundColor: 'transparent',
|
@@ -13400,8 +13527,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
13400
13527
|
if (!videoRef.current.src) {
|
13401
13528
|
const videoSrc = rec.video.url;
|
13402
13529
|
if (videoSrc.includes('.m3u8')) {
|
13403
|
-
if (
|
13404
|
-
const hls = new
|
13530
|
+
if (Hls.isSupported()) {
|
13531
|
+
const hls = new Hls();
|
13405
13532
|
hls.loadSource(videoSrc);
|
13406
13533
|
hls.attachMedia(videoRef.current);
|
13407
13534
|
}
|
@@ -13687,7 +13814,7 @@ const Popup = () => {
|
|
13687
13814
|
* @Author: binruan@chatlabs.com
|
13688
13815
|
* @Date: 2024-01-15 19:03:09
|
13689
13816
|
* @LastEditors: binruan@chatlabs.com
|
13690
|
-
* @LastEditTime: 2024-05-17
|
13817
|
+
* @LastEditTime: 2024-05-06 17:26:37
|
13691
13818
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
13692
13819
|
*
|
13693
13820
|
*/
|
@@ -13704,14 +13831,14 @@ Object.values(_materials_).forEach((v) => {
|
|
13704
13831
|
RESOLVER[v.extend.type] = v;
|
13705
13832
|
});
|
13706
13833
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
13707
|
-
var _a, _b, _c, _d, _e, _f
|
13834
|
+
var _a, _b, _c, _d, _e, _f;
|
13708
13835
|
const utmVal = useMemo(() => {
|
13709
13836
|
var _a;
|
13710
13837
|
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('?', '') : '';
|
13711
13838
|
return searchParams;
|
13712
13839
|
}, []);
|
13713
13840
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
13714
|
-
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,
|
13841
|
+
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, render: ({ rtcList, tagList }) => {
|
13715
13842
|
var _a;
|
13716
13843
|
return (React.createElement(React.Fragment, null,
|
13717
13844
|
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 })),
|