pb-sxp-ui 1.0.68 → 1.0.70

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 (104) hide show
  1. package/dist/index.cjs +247 -121
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -2
  4. package/dist/index.js +247 -121
  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 +250 -124
  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/VideoWidget/index.js +1 -1
  20. package/es/core/components/SxpPageRender/index.d.ts +5 -0
  21. package/es/core/components/SxpPageRender/index.js +11 -11
  22. package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
  23. package/es/core/context/SxpDataSourceProvider.js +3 -3
  24. package/es/materials/sxp/defaultSetting.d.ts +1 -4
  25. package/es/materials/sxp/defaultSetting.js +4 -5
  26. package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  27. package/es/materials/sxp/popup/AppointForm/index.js +3 -8
  28. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  29. package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
  30. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  31. package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
  32. package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
  33. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  34. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  35. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  36. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  39. package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
  40. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  41. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  42. package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
  43. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  44. package/es/materials/sxp/template/Commodity/index.js +8 -2
  45. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  46. package/es/materials/sxp/template/CommodityDiro/index.js +8 -2
  47. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  48. package/es/materials/sxp/template/CommodityDiroNew/index.js +8 -2
  49. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  50. package/es/materials/sxp/template/MultiCommodity/index.js +4 -2
  51. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  52. package/es/materials/sxp/template/MultiCommodityDiro/index.js +4 -2
  53. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  54. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -2
  55. package/es/materials/sxp/template/components/Img.d.ts +2 -1
  56. package/es/materials/sxp/template/components/Img.js +2 -2
  57. package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
  58. package/es/materials/sxp/template/components/settingRender.js +8 -0
  59. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
  60. package/lib/core/components/SxpPageCore/index.js +2 -2
  61. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  62. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  63. package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
  64. package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  65. package/lib/core/components/SxpPageRender/index.d.ts +5 -0
  66. package/lib/core/components/SxpPageRender/index.js +11 -11
  67. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
  68. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  69. package/lib/materials/sxp/defaultSetting.d.ts +1 -4
  70. package/lib/materials/sxp/defaultSetting.js +4 -5
  71. package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  72. package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
  73. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  74. package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
  75. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  76. package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
  77. package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
  78. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  79. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  81. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  82. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  83. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  84. package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
  85. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  86. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  87. package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
  88. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  89. package/lib/materials/sxp/template/Commodity/index.js +8 -2
  90. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  91. package/lib/materials/sxp/template/CommodityDiro/index.js +8 -2
  92. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  93. package/lib/materials/sxp/template/CommodityDiroNew/index.js +8 -2
  94. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  95. package/lib/materials/sxp/template/MultiCommodity/index.js +4 -2
  96. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  97. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +4 -2
  98. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  99. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -2
  100. package/lib/materials/sxp/template/components/Img.d.ts +2 -1
  101. package/lib/materials/sxp/template/components/Img.js +2 -2
  102. package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
  103. package/lib/materials/sxp/template/components/settingRender.js +8 -0
  104. 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` }),
@@ -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);
@@ -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,7 +76,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
76
76
  };
77
77
  const firstRef = useRef();
78
78
  useEffect(() => {
79
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
79
+ if (!firstRef.current && !videoRef) {
80
80
  firstRef.current = true;
81
81
  const player = TCPlayer('player-container-id', {
82
82
  licenseUrl,
@@ -258,7 +258,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
258
258
  lineGradStyle
259
259
  ]);
260
260
  const renderLikeButton = useCallback((rec, index) => {
261
- var _a, _b;
261
+ var _a, _b, _c, _d;
262
262
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
263
263
  return;
264
264
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -267,8 +267,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
267
267
  }
268
268
  if (rec.video) {
269
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: {
270
- top,
271
- 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
272
272
  }, position: index }));
273
273
  }
274
274
  return null;
@@ -402,7 +402,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
402
402
  } })),
403
403
  renderLogo,
404
404
  React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex }),
405
- isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
405
+ 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,
406
406
  React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
407
407
  swiperRef.current.swiper.allowTouchMove = false;
408
408
  setTimeout(() => {
@@ -426,13 +426,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
426
426
  }, direction: 'vertical', height: height },
427
427
  React.createElement(ToggleButton, { style: {
428
428
  position: 'fixed',
429
- right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
430
429
  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',
431
- bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
432
- zIndex: 999
430
+ zIndex: 999,
431
+ [(_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,
432
+ [(_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
433
433
  }, 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 }),
434
434
  renderView),
435
- 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)),
435
+ 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)),
436
436
  React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
437
437
  React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
438
438
  backgroundColor: 'transparent',
@@ -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);
@@ -156,7 +156,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
156
156
  }), [bffFetch]);
157
157
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
158
158
  var _h, _j, _k, _l, _m;
159
- if (!utmVal || !isShowTag)
159
+ if (!utmVal)
160
160
  return;
161
161
  try {
162
162
  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 +169,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
169
169
  catch (e) {
170
170
  console.log('e', e);
171
171
  }
172
- }), [bffFetch, utmVal, isShowTag]);
172
+ }), [bffFetch, utmVal]);
173
173
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
174
174
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
175
175
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -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: '默认字体', 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;
@@ -23,6 +23,19 @@ export default [
23
23
  type: 'Number',
24
24
  name: ['props', 'swiper', 'delay'],
25
25
  addonAfter: 's'
26
+ },
27
+ {
28
+ type: 'Group',
29
+ child: [
30
+ {
31
+ label: '居中垂直偏移',
32
+ type: 'Number',
33
+ name: ['props', 'swiper', 'translateY'],
34
+ min: -100,
35
+ addonAfter: '%',
36
+ initialValue: 0
37
+ }
38
+ ]
26
39
  }
27
40
  ]
28
41
  },
@@ -57,6 +70,23 @@ export default [
57
70
  name: ['props', 'commodityStyles', 'field'],
58
71
  initialValue: 'title'
59
72
  },
73
+ {
74
+ type: 'Group',
75
+ child: [
76
+ {
77
+ label: '上边距',
78
+ type: 'Number',
79
+ addonAfter: 'px',
80
+ name: ['marginTop']
81
+ },
82
+ {
83
+ label: '下边距',
84
+ type: 'Number',
85
+ addonAfter: 'px',
86
+ name: ['marginBottom']
87
+ }
88
+ ]
89
+ },
60
90
  {
61
91
  type: 'Group',
62
92
  label: '标题字体',
@@ -20,6 +20,7 @@ export interface ICommodityDetailDiroNewProps {
20
20
  swiper: {
21
21
  dotsAlign: 'left' | 'center';
22
22
  delay: number;
23
+ translateY?: number;
23
24
  };
24
25
  commodityStyles?: {
25
26
  title: CSSProperties;
@@ -111,7 +111,13 @@ Made in Italy` })));
111
111
  width,
112
112
  height: width
113
113
  } },
114
- React.createElement(FormatImage, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
114
+ React.createElement(FormatImage, { style: {
115
+ height: '100%',
116
+ width: '100%',
117
+ objectFit: 'cover',
118
+ display: 'block',
119
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
120
+ }, src: src }))));
115
121
  }))),
116
122
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
117
123
  position: 'relative',
@@ -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;
@@ -23,6 +23,19 @@ export default [
23
23
  type: 'Number',
24
24
  name: ['props', 'swiper', 'delay'],
25
25
  addonAfter: 's'
26
+ },
27
+ {
28
+ type: 'Group',
29
+ child: [
30
+ {
31
+ label: '居中垂直偏移',
32
+ type: 'Number',
33
+ name: ['props', 'swiper', 'translateY'],
34
+ min: -100,
35
+ addonAfter: '%',
36
+ initialValue: 0
37
+ }
38
+ ]
26
39
  }
27
40
  ]
28
41
  },
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import './index.less';
3
3
  export interface IPromptProps {
4
4
  content?: string;
@@ -9,6 +9,7 @@ export interface IPromptProps {
9
9
  isPopup?: boolean;
10
10
  onClose?: () => void;
11
11
  onClick?: () => void;
12
+ submitButtonStyle?: CSSProperties;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IPromptProps>;
14
15
  export default _default;
@@ -7,7 +7,7 @@ import './index.less';
7
7
  import { useSxpDataSource } from '../../../../core/hooks';
8
8
  import { useEventReport } from '../../../../core/hooks/useEventReport';
9
9
  const Prompt = (_a) => {
10
- var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
10
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
11
11
  const { popupDetailData } = useSxpDataSource();
12
12
  const { jumpToWeb } = useEventReport();
13
13
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
@@ -29,6 +29,6 @@ const Prompt = (_a) => {
29
29
  React.createElement("div", { className: 'pb-prompt-icon' },
30
30
  React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success })),
31
31
  React.createElement("div", { className: 'pb-prompt-content' }, content),
32
- React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
32
+ React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
33
33
  };
34
34
  export default memo(Prompt);