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.
Files changed (114) hide show
  1. package/dist/index.cjs +301 -174
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -2
  4. package/dist/index.js +301 -174
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +304 -177
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/DiyPortalPreview/VideoWidget.js +3 -2
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  17. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  18. package/es/core/components/SxpPageRender/FormatImage.js +1 -2
  19. package/es/core/components/SxpPageRender/Nudge/index.js +2 -2
  20. package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  21. package/es/core/components/SxpPageRender/WaterFall/List.js +5 -9
  22. package/es/core/components/SxpPageRender/index.d.ts +5 -0
  23. package/es/core/components/SxpPageRender/index.js +21 -24
  24. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  25. package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
  26. package/es/core/context/SxpDataSourceProvider.js +12 -4
  27. package/es/materials/sxp/HashTag/settingRender.d.ts +2 -7
  28. package/es/materials/sxp/HashTag/settingRender.js +0 -5
  29. package/es/materials/sxp/defaultSetting.d.ts +1 -4
  30. package/es/materials/sxp/defaultSetting.js +4 -5
  31. package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  32. package/es/materials/sxp/popup/AppointForm/index.js +3 -8
  33. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  34. package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
  35. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  36. package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
  37. package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
  38. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  39. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  43. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  44. package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
  45. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  46. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  47. package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
  48. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  49. package/es/materials/sxp/template/Commodity/index.js +12 -6
  50. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  51. package/es/materials/sxp/template/CommodityDiro/index.js +12 -6
  52. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  53. package/es/materials/sxp/template/CommodityDiroNew/index.js +12 -6
  54. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  55. package/es/materials/sxp/template/MultiCommodity/index.js +7 -5
  56. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  57. package/es/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
  58. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  59. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
  60. package/es/materials/sxp/template/components/Img.d.ts +2 -1
  61. package/es/materials/sxp/template/components/Img.js +2 -2
  62. package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
  63. package/es/materials/sxp/template/components/settingRender.js +8 -0
  64. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
  65. package/lib/core/components/SxpPageCore/index.js +2 -2
  66. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  67. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  68. package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
  69. package/lib/core/components/SxpPageRender/Nudge/index.js +2 -2
  70. package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  71. package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -9
  72. package/lib/core/components/SxpPageRender/index.d.ts +5 -0
  73. package/lib/core/components/SxpPageRender/index.js +21 -24
  74. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  75. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
  76. package/lib/core/context/SxpDataSourceProvider.js +12 -4
  77. package/lib/materials/sxp/HashTag/settingRender.d.ts +2 -7
  78. package/lib/materials/sxp/HashTag/settingRender.js +0 -5
  79. package/lib/materials/sxp/defaultSetting.d.ts +1 -4
  80. package/lib/materials/sxp/defaultSetting.js +4 -5
  81. package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  82. package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
  83. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  84. package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
  85. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  86. package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
  87. package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
  88. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  89. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  90. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  91. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  92. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  93. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  94. package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
  95. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  96. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  97. package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
  98. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  99. package/lib/materials/sxp/template/Commodity/index.js +12 -6
  100. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  101. package/lib/materials/sxp/template/CommodityDiro/index.js +12 -6
  102. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  103. package/lib/materials/sxp/template/CommodityDiroNew/index.js +12 -6
  104. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  105. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -5
  106. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  107. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
  108. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  109. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
  110. package/lib/materials/sxp/template/components/Img.d.ts +2 -1
  111. package/lib/materials/sxp/template/components/Img.js +2 -2
  112. package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
  113. package/lib/materials/sxp/template/components/settingRender.js +8 -0
  114. package/package.json +2 -3
@@ -1,4 +1,5 @@
1
1
  import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
+ import Hls from 'hls.js';
2
3
  import { useIconLink } from '../SxpPageRender/useIconLink';
3
4
  import FormatImage from '../SxpPageRender/FormatImage';
4
5
  import { useSxpDataSource } from '../../../core/hooks';
@@ -138,8 +139,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
138
139
  if (!videoRef.current.src) {
139
140
  const videoSrc = rec.video.url;
140
141
  if (videoSrc.includes('.m3u8')) {
141
- if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
142
- const hls = new window.Hls();
142
+ if (Hls.isSupported()) {
143
+ const hls = new Hls();
143
144
  hls.loadSource(videoSrc);
144
145
  hls.attachMedia(videoRef.current);
145
146
  }
@@ -9,14 +9,14 @@ Object.values(_materials_).forEach((v) => {
9
9
  RESOLVER[v.extend.type] = v;
10
10
  });
11
11
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
12
+ var _a, _b, _c, _d, _e, _f;
13
13
  const utmVal = useMemo(() => {
14
14
  var _a;
15
15
  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('?', '') : '';
16
16
  return searchParams;
17
17
  }, []);
18
18
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
19
- React.createElement(SxpDataSourceProvider, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
19
+ React.createElement(SxpDataSourceProvider, { 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 }) => {
20
20
  var _a;
21
21
  return (React.createElement(React.Fragment, null,
22
22
  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 })),
@@ -1,6 +1,7 @@
1
- import { FC } from 'react';
1
+ import { CSSProperties, FC } from 'react';
2
2
  interface IProps {
3
3
  imageUrl?: string;
4
+ style?: CSSProperties;
4
5
  }
5
6
  declare const FingerSwipeTip: FC<IProps>;
6
7
  export default FingerSwipeTip;
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
2
  import { useIconLink } from '../useIconLink';
3
3
  import { useEditor } from '../../../../core/hooks';
4
- const FingerSwipeTip = ({ imageUrl }) => {
4
+ const FingerSwipeTip = ({ imageUrl, style }) => {
5
5
  const [show, setShow] = useState(true);
6
6
  const { schema: { sxpPageConf } } = useEditor();
7
7
  useEffect(() => {
@@ -13,7 +13,7 @@ const FingerSwipeTip = ({ imageUrl }) => {
13
13
  const animationCls = useMemo(() => {
14
14
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
15
15
  }, [show]);
16
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}` },
16
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
17
17
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
18
18
  };
19
19
  export default FingerSwipeTip;
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react';
1
+ import React, { forwardRef, memo, useEffect, useImperativeHandle, useState } from 'react';
2
2
  const FormatImage = forwardRef((props, ref) => {
3
3
  const { src, onLoad, style, className, loading } = props;
4
4
  const [imgSrc, setImgSrc] = useState();
@@ -10,7 +10,6 @@ const FormatImage = forwardRef((props, ref) => {
10
10
  useEffect(() => {
11
11
  setImgSrc(src);
12
12
  }, [src]);
13
- const imgRef = useRef(null);
14
13
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
15
14
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
16
15
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -8,7 +8,7 @@ const Nudge = ({ nudge }) => {
8
8
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
9
9
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
10
10
  } },
11
- (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12
- 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 : '')))));
11
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
12
+ 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 : '')))));
13
13
  };
14
14
  export default Nudge;
@@ -181,7 +181,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
181
181
  const videoSrc = rec.video.url;
182
182
  if (!videoSrc)
183
183
  return;
184
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
185
184
  setIsPauseVideo(false);
186
185
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
187
186
  const dom = document.querySelector('#player-container-id');
@@ -189,6 +188,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
189
188
  if (!dom && !dom2)
190
189
  return;
191
190
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
191
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
192
192
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
193
193
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
194
194
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('playing', handlePlaying);
@@ -14,19 +14,15 @@ const WaterfallFlowItem = (props) => {
14
14
  const canvasRef = useRef(null);
15
15
  const [firstFrameSrc, setFirstFrameSrc] = useState('');
16
16
  const src = useMemo(() => {
17
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18
18
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) {
19
19
  return (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
20
20
  }
21
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.url) {
22
- setShowVideo(true);
23
- return (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.url;
21
+ 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) {
22
+ 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];
24
23
  }
25
- 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) {
26
- 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];
27
- }
28
- else if ((_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.length) {
29
- return (_m = (_l = rec === null || rec === void 0 ? void 0 : rec.product) === null || _l === void 0 ? void 0 : _l.homePage) === null || _m === void 0 ? void 0 : _m[0];
24
+ 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) {
25
+ 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];
30
26
  }
31
27
  else {
32
28
  return (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) || '';
@@ -29,6 +29,11 @@ export interface ISxpPageRenderProps {
29
29
  isOpenTextShadow?: boolean;
30
30
  videoPost?: postConfigType;
31
31
  imgUrlsPost?: postConfigType;
32
+ muteIconXPosit?: string;
33
+ muteIconYPosit?: string;
34
+ likeIconYPosit?: string;
35
+ likeIconXPosit?: string;
36
+ swipeTipOffset?: number;
32
37
  };
33
38
  descStyle?: CSSProperties;
34
39
  tipText?: {
@@ -20,10 +20,10 @@ import { refreshFeSessionId } from '../../../core/utils/sessionStore';
20
20
  import './index.less';
21
21
  import { useEventReport } from '../../../core/hooks/useEventReport';
22
22
  import withBindDataSource from '../../../core/hoc/withBindDataSource';
23
- import { getFeUserId } from '../../../core/utils/localStore';
24
23
  import Tagbar from './Tagbar';
24
+ import { getFeUserId } from '../../../core/utils/localStore';
25
25
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
26
- var _a, _b, _c, _d, _e, _f, _g;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
27
27
  const { schema } = useEditor();
28
28
  const [activeIndex, setActiveIndex] = useState(0);
29
29
  const viewImageStartTime = useRef(0);
@@ -76,29 +76,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
76
76
  };
77
77
  const firstRef = useRef();
78
78
  useEffect(() => {
79
- var _a, _b, _c;
80
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
79
+ if (!firstRef.current && !videoRef) {
81
80
  firstRef.current = true;
82
81
  const player = TCPlayer('player-container-id', {
83
82
  licenseUrl,
84
83
  controls: false,
84
+ autoplay: false,
85
85
  loop: false,
86
- autoplay: true,
87
86
  muted: true,
88
87
  preload: 'auto',
89
88
  posterImage: false,
90
- bigPlayButton: true,
91
- sources: [
92
- {
93
- 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 : ''
94
- }
95
- ]
89
+ bigPlayButton: true
96
90
  });
97
91
  player === null || player === void 0 ? void 0 : player.ready(() => {
98
92
  setVideoRef(player);
99
93
  });
100
94
  }
101
- }, [videoRef, licenseUrl, data]);
95
+ }, [videoRef, licenseUrl]);
102
96
  useEffect(() => {
103
97
  if (!isInit)
104
98
  handleH5EnterLink();
@@ -264,7 +258,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
264
258
  lineGradStyle
265
259
  ]);
266
260
  const renderLikeButton = useCallback((rec, index) => {
267
- var _a, _b;
261
+ var _a, _b, _c, _d;
268
262
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
269
263
  return;
270
264
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -273,8 +267,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
273
267
  }
274
268
  if (rec.video) {
275
269
  return (React.createElement(LikeButton, { 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: {
276
- top,
277
- right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
270
+ [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
271
+ [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
278
272
  }, position: index }));
279
273
  }
280
274
  return null;
@@ -301,7 +295,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
301
295
  }
302
296
  };
303
297
  const handleScrollEvent = (swiper) => {
304
- var _a, _b, _c, _d, _e, _f, _g, _h;
298
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
305
299
  viewTime.current = new Date();
306
300
  const item = data[swiper.previousIndex];
307
301
  if (!item)
@@ -331,14 +325,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
331
325
  handleReportViewImageEnd(item);
332
326
  }
333
327
  handleReportProductView(item);
328
+ const curItem = data[swiper.activeIndex];
329
+ 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)) {
330
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
331
+ eventName: 'ProductView'
332
+ });
333
+ }
334
334
  };
335
335
  const handleReportProductView = (item) => {
336
336
  var _a, _b, _c;
337
337
  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)) {
338
338
  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);
339
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
340
- eventName: 'ProductView'
341
- });
342
339
  }
343
340
  };
344
341
  useEffect(() => {
@@ -408,7 +405,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
408
405
  } })),
409
406
  renderLogo,
410
407
  React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex }),
411
- isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
408
+ 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,
412
409
  React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
413
410
  swiperRef.current.swiper.allowTouchMove = false;
414
411
  setTimeout(() => {
@@ -432,13 +429,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
432
429
  }, direction: 'vertical', height: height },
433
430
  React.createElement(ToggleButton, { style: {
434
431
  position: 'fixed',
435
- right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
436
432
  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',
437
- bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
438
- zIndex: 999
433
+ zIndex: 999,
434
+ [(_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,
435
+ [(_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
439
436
  }, 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 }),
440
437
  renderView),
441
- React.createElement(WaterFall, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props)),
438
+ React.createElement(WaterFall, 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)),
442
439
  React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
443
440
  React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
444
441
  backgroundColor: 'transparent',
@@ -40,6 +40,7 @@ export type ProductInfoType = {
40
40
  currency: string;
41
41
  bindCta?: CTAInfoType;
42
42
  taxInfo?: string;
43
+ cover?: string;
43
44
  };
44
45
  export type VideoInfoType = {
45
46
  bindCtaId: string;
@@ -102,7 +102,6 @@ export interface SxpDataSourceProviderProps {
102
102
  loadingImage?: string;
103
103
  isOpenHashTag?: boolean;
104
104
  enabledMetaConversionApi?: boolean;
105
- isShowTag?: boolean;
106
105
  }
107
106
  declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
108
107
  export default _default;
@@ -14,7 +14,7 @@ var DataSourceType;
14
14
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
15
15
  })(DataSourceType || (DataSourceType = {}));
16
16
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
17
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
17
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
18
18
  const [rtcList, setRtcList] = useState([]);
19
19
  const [tagList, setTagList] = useState([]);
20
20
  const [loading, setLoading] = useState(false);
@@ -136,9 +136,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
136
136
  if (!enableReportEvent || !enabledMetaConversionApi) {
137
137
  return;
138
138
  }
139
+ const fakeUserId = storeAndLoadFeUserId();
139
140
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
140
141
  method: 'POST',
141
- body: { eventName, actionSource, eventSourceUrl, 'userData.externalId': externalId },
142
+ body: {
143
+ eventName,
144
+ actionSource,
145
+ eventSourceUrl,
146
+ userData: {
147
+ externalId: fakeUserId
148
+ }
149
+ },
142
150
  type: 'beacon'
143
151
  });
144
152
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
@@ -156,7 +164,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
156
164
  }), [bffFetch]);
157
165
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
158
166
  var _h, _j, _k, _l, _m;
159
- if (!utmVal || !isShowTag)
167
+ if (!utmVal)
160
168
  return;
161
169
  try {
162
170
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -169,7 +177,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
169
177
  catch (e) {
170
178
  console.log('e', e);
171
179
  }
172
- }), [bffFetch, utmVal, isShowTag]);
180
+ }), [bffFetch, utmVal]);
173
181
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
174
182
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
175
183
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -1,16 +1,11 @@
1
1
  declare const _default: ({
2
2
  title: string;
3
- child: ({
4
- type: string;
5
- label: string;
6
- name: string[];
7
- addonAfter?: undefined;
8
- } | {
3
+ child: {
9
4
  type: string;
10
5
  label: string;
11
6
  name: string[];
12
7
  addonAfter: string;
13
- })[];
8
+ }[];
14
9
  } | {
15
10
  title: string;
16
11
  child: {
@@ -4,11 +4,6 @@ export default [
4
4
  {
5
5
  title: '卡片样式',
6
6
  child: [
7
- {
8
- type: 'Number',
9
- label: '文本行数',
10
- name: ['props', 'lineClamp']
11
- },
12
7
  {
13
8
  type: 'Number',
14
9
  label: '上下边距',
@@ -3,9 +3,6 @@ export declare const fontOptions: {
3
3
  value: string;
4
4
  }[];
5
5
  declare const _default: {
6
- fontOptions: {
7
- label: string;
8
- value: string;
9
- }[];
6
+ fontOptions: any[];
10
7
  };
11
8
  export default _default;
@@ -1,7 +1,6 @@
1
- export const fontOptions = [
2
- { label: '应用字体', value: 'appFont' },
3
- { label: '黑体', value: '黑体' }
4
- ];
1
+ export const fontOptions = [{ label: 'defalut', value: 'appFont' }];
2
+ const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
3
+ const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
5
4
  export default {
6
- fontOptions
5
+ fontOptions: [...fontOptions, ...data]
7
6
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import './index.less';
3
3
  export interface IAppointFormProps {
4
4
  columns?: any[];
@@ -14,6 +14,7 @@ export interface IAppointFormProps {
14
14
  layoutType?: 'horizontal' | 'vertical' | 'inline';
15
15
  isExternalLink?: boolean;
16
16
  isPopup?: boolean;
17
+ submitButtonStyle?: CSSProperties;
17
18
  onClick?: () => void;
18
19
  onClose?: () => void;
19
20
  }
@@ -1,13 +1,12 @@
1
1
  import { __awaiter, __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
3
  import React, { memo, useMemo, useRef, useState } from 'react';
4
- import { BetaSchemaForm } from '@ant-design/pro-components';
5
4
  import { cloneDeep, debounce } from 'lodash';
6
5
  import { useSxpDataSource } from '../../../../core/hooks';
7
6
  import './index.less';
8
7
  import { useEventReport } from '../../../../core/hooks/useEventReport';
9
8
  const AppointForm = (_a) => {
10
- 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"]);
9
+ 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"]);
11
10
  const { submitForm, popupDetailData } = useSxpDataSource();
12
11
  const { jumpToWeb } = useEventReport();
13
12
  const formRef = useRef();
@@ -81,12 +80,8 @@ const AppointForm = (_a) => {
81
80
  return (React.createElement("div", { className: 'pb-appoint-form' },
82
81
  React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
83
82
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
84
- React.createElement("div", { className: 'pb-appoint-form-container' },
85
- React.createElement(BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
83
+ React.createElement("div", { className: 'pb-appoint-form-container' })),
86
84
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
87
- React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
88
- color: submitColor,
89
- background: submitBgColor
90
- } }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
85
+ 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))));
91
86
  };
92
87
  export default memo(AppointForm);
@@ -51,16 +51,37 @@ declare const _default: ({
51
51
  })[];
52
52
  name: string[];
53
53
  child?: undefined;
54
- })[];
55
- type?: undefined;
56
- label?: undefined;
57
- name?: undefined;
58
- } | {
59
- title: string;
60
- child: {
54
+ } | {
55
+ type: string;
56
+ label: string;
57
+ child: ({
58
+ type: string;
59
+ name: string[];
60
+ initialValue: string;
61
+ options?: undefined;
62
+ addonAfter?: undefined;
63
+ } | {
64
+ type: string;
65
+ name: string[];
66
+ options: any[];
67
+ initialValue: any;
68
+ addonAfter?: undefined;
69
+ } | {
70
+ type: string;
71
+ name: string[];
72
+ addonAfter: string;
73
+ initialValue: number;
74
+ options?: undefined;
75
+ })[];
76
+ name?: undefined;
77
+ options?: undefined;
78
+ } | {
61
79
  type: string;
62
80
  name: string[];
63
- }[];
81
+ label?: undefined;
82
+ child?: undefined;
83
+ options?: undefined;
84
+ })[];
64
85
  type?: undefined;
65
86
  label?: undefined;
66
87
  name?: undefined;
@@ -1,5 +1,5 @@
1
- var _a;
2
- import { fontOptions } from '../../defaultSetting';
1
+ var _a, _b, _c;
2
+ import defaultSetting, { fontOptions } from '../../defaultSetting';
3
3
  export default [
4
4
  {
5
5
  type: 'Text',
@@ -69,6 +69,37 @@ export default [
69
69
  type: 'Text',
70
70
  name: ['props', 'submitText']
71
71
  },
72
+ {
73
+ type: 'Group',
74
+ label: '提交按钮字体',
75
+ child: [
76
+ {
77
+ type: 'Color',
78
+ name: ['props', 'submitButtonStyle', 'color'],
79
+ initialValue: '#fff'
80
+ },
81
+ {
82
+ type: 'Select',
83
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
84
+ options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
85
+ initialValue: (_c = (_b = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.value
86
+ },
87
+ {
88
+ type: 'Number',
89
+ name: ['props', 'submitButtonStyle', 'fontSize'],
90
+ addonAfter: 'px',
91
+ initialValue: 12
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ type: 'TextStyle',
97
+ name: ['props', 'submitButtonStyle']
98
+ },
99
+ {
100
+ type: 'TextAlign',
101
+ name: ['props', 'submitButtonStyle']
102
+ },
72
103
  {
73
104
  label: '提交文本颜色',
74
105
  type: 'Color',
@@ -20,6 +20,7 @@ export interface ICommodityDetailProps {
20
20
  swiper: {
21
21
  dotsAlign: 'left' | 'center';
22
22
  delay: number;
23
+ translateY?: number;
23
24
  };
24
25
  commodityStyles?: {
25
26
  title: CSSProperties;
@@ -93,7 +93,13 @@ const CommodityDetail = (_a) => {
93
93
  width,
94
94
  height: width
95
95
  } },
96
- React.createElement(FormatImage, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
96
+ React.createElement(FormatImage, { style: {
97
+ height: '100%',
98
+ width: '100%',
99
+ objectFit: 'cover',
100
+ display: 'block',
101
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
102
+ }, src: src }))));
97
103
  }))),
98
104
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
99
105
  position: 'relative',
@@ -18,7 +18,9 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
18
18
  commodityStyles: {
19
19
  price: {
20
20
  color: '#000',
21
- fontSize: 18
21
+ fontSize: 18,
22
+ marginTop: 24,
23
+ marginBottom: 10
22
24
  },
23
25
  title: {
24
26
  color: '#000',
@@ -26,7 +28,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
26
28
  },
27
29
  collection: {
28
30
  fontSize: 12,
29
- color: '#000'
31
+ color: '#000',
32
+ marginBottom: 14
30
33
  },
31
34
  info: {
32
35
  color: 'gray',
@@ -9,12 +9,28 @@ declare const _default: ({
9
9
  }[];
10
10
  name: string[];
11
11
  addonAfter?: undefined;
12
+ child?: undefined;
12
13
  } | {
13
14
  type: string;
14
15
  name: string[];
15
16
  addonAfter: string;
16
17
  label?: undefined;
17
18
  options?: undefined;
19
+ child?: undefined;
20
+ } | {
21
+ type: string;
22
+ child: {
23
+ label: string;
24
+ type: string;
25
+ name: string[];
26
+ min: number;
27
+ addonAfter: string;
28
+ initialValue: number;
29
+ }[];
30
+ label?: undefined;
31
+ options?: undefined;
32
+ name?: undefined;
33
+ addonAfter?: undefined;
18
34
  })[];
19
35
  } | {
20
36
  title: string;
@@ -31,6 +47,18 @@ declare const _default: ({
31
47
  name: string[];
32
48
  initialValue: string;
33
49
  child?: undefined;
50
+ } | {
51
+ type: string;
52
+ child: {
53
+ label: string;
54
+ type: string;
55
+ addonAfter: string;
56
+ name: string[];
57
+ }[];
58
+ label?: undefined;
59
+ options?: undefined;
60
+ name?: undefined;
61
+ initialValue?: undefined;
34
62
  } | {
35
63
  type: string;
36
64
  label: string;