pb-sxp-ui 1.0.69 → 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 +250 -130
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -2
  4. package/dist/index.js +250 -130
  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 +253 -133
  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 +14 -20
  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 +14 -20
  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
@@ -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);
@@ -1,12 +1,47 @@
1
- declare const _default: ({
2
- type: string;
3
- label: string;
4
- name: string[];
5
- mediaType: string;
6
- } | {
7
- type: string;
8
- label: string;
9
- name: string[];
10
- mediaType?: undefined;
11
- })[];
1
+ declare const _default: {
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ mediaType: string;
8
+ child?: undefined;
9
+ } | {
10
+ type: string;
11
+ label: string;
12
+ name: string[];
13
+ mediaType?: undefined;
14
+ child?: undefined;
15
+ } | {
16
+ type: string;
17
+ label: string;
18
+ child: ({
19
+ type: string;
20
+ name: string[];
21
+ initialValue: string;
22
+ options?: undefined;
23
+ addonAfter?: undefined;
24
+ } | {
25
+ type: string;
26
+ name: string[];
27
+ options: any[];
28
+ initialValue: any;
29
+ addonAfter?: undefined;
30
+ } | {
31
+ type: string;
32
+ name: string[];
33
+ addonAfter: string;
34
+ initialValue: number;
35
+ options?: undefined;
36
+ })[];
37
+ name?: undefined;
38
+ mediaType?: undefined;
39
+ } | {
40
+ type: string;
41
+ name: string[];
42
+ label?: undefined;
43
+ mediaType?: undefined;
44
+ child?: undefined;
45
+ })[];
46
+ }[];
12
47
  export default _default;
@@ -1,18 +1,61 @@
1
+ var _a, _b;
2
+ import defaultSetting from '../../defaultSetting';
1
3
  export default [
2
4
  {
3
- type: 'Media',
4
- label: '图标',
5
- name: ['props', 'icon'],
6
- mediaType: 'Image'
7
- },
8
- {
9
- type: 'TextArea',
10
- label: '内容',
11
- name: ['props', 'content']
12
- },
13
- {
14
- type: 'Text',
15
- label: '按钮文案',
16
- name: ['props', 'btnText']
5
+ title: '',
6
+ child: [
7
+ {
8
+ type: 'Media',
9
+ label: '图标',
10
+ name: ['props', 'icon'],
11
+ mediaType: 'Image'
12
+ },
13
+ {
14
+ type: 'TextArea',
15
+ label: '内容',
16
+ name: ['props', 'content']
17
+ },
18
+ {
19
+ type: 'Text',
20
+ label: '按钮文案',
21
+ name: ['props', 'btnText']
22
+ },
23
+ {
24
+ type: 'Group',
25
+ label: '提交按钮字体',
26
+ child: [
27
+ {
28
+ type: 'Color',
29
+ name: ['props', 'submitButtonStyle', 'color'],
30
+ initialValue: '#fff'
31
+ },
32
+ {
33
+ type: 'Select',
34
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
35
+ options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
36
+ initialValue: (_b = (_a = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value
37
+ },
38
+ {
39
+ type: 'Number',
40
+ name: ['props', 'submitButtonStyle', 'fontSize'],
41
+ addonAfter: 'px',
42
+ initialValue: 12
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ type: 'TextStyle',
48
+ name: ['props', 'submitButtonStyle']
49
+ },
50
+ {
51
+ type: 'TextAlign',
52
+ name: ['props', 'submitButtonStyle']
53
+ },
54
+ {
55
+ label: '提交按钮颜色',
56
+ type: 'Color',
57
+ name: ['props', 'submitButtonStyle', 'backgroundColor']
58
+ }
59
+ ]
17
60
  }
18
61
  ];
@@ -10,6 +10,7 @@ export interface ICommodityProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ translateY?: number;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<ICommodityProps>;
15
16
  export default _default;
@@ -7,13 +7,19 @@ import { useSxpDataSource } from '../../../../core/hooks';
7
7
  import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
8
8
  const Commodity = (_a) => {
9
9
  var _b, _c, _d, _e, _f, _g, _h;
10
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
10
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
11
11
  const { sxpParameter } = useSxpDataSource();
12
12
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
13
13
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
14
14
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
15
15
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
16
- React.createElement(FormatImage, { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
16
+ React.createElement(FormatImage, { className: css({
17
+ width: '100%',
18
+ objectFit: 'cover',
19
+ height: '100%',
20
+ display: 'block',
21
+ transform: `translateY(${translateY}%)`
22
+ }), src: src })),
17
23
  React.createElement("div", { className: css({
18
24
  color: '#fff',
19
25
  display: 'flex',
@@ -10,6 +10,7 @@ export interface ICommodityDiroProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ translateY?: number;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
15
16
  export default _default;
@@ -7,13 +7,19 @@ import { useSxpDataSource } from '../../../../core/hooks';
7
7
  import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
8
8
  const CommodityDiro = (_a) => {
9
9
  var _b, _c, _d, _e, _f, _g, _h;
10
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
10
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
11
11
  const { sxpParameter } = useSxpDataSource();
12
12
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
13
13
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
14
14
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
15
15
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
16
- React.createElement(FormatImage, { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
16
+ React.createElement(FormatImage, { className: css({
17
+ width: '100%',
18
+ objectFit: 'cover',
19
+ height: '100%',
20
+ display: 'block',
21
+ transform: `translateY(${translateY}%)`
22
+ }), src: src })),
17
23
  React.createElement("div", { className: css({
18
24
  color: '#fff',
19
25
  display: 'flex',
@@ -10,6 +10,7 @@ export interface ICommodityDiroNewProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ translateY?: number;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<ICommodityDiroNewProps>;
15
16
  export default _default;
@@ -7,13 +7,19 @@ import { useSxpDataSource } from '../../../../core/hooks';
7
7
  import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
8
8
  const CommodityDiroNew = (_a) => {
9
9
  var _b, _c, _d, _e, _f, _g, _h;
10
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
10
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
11
11
  const { sxpParameter } = useSxpDataSource();
12
12
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
13
13
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
14
14
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
15
15
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
16
- React.createElement(FormatImage, { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
16
+ React.createElement(FormatImage, { className: css({
17
+ width: '100%',
18
+ objectFit: 'cover',
19
+ height: '100%',
20
+ display: 'block',
21
+ transform: `translateY(${translateY}%)`
22
+ }), src: src })),
17
23
  React.createElement("div", { className: css({
18
24
  color: '#fff',
19
25
  display: 'flex',
@@ -11,6 +11,7 @@ export interface IMultiCommodityProps {
11
11
  ctaTempStyles?: ICtaTempStylesType;
12
12
  isExternalLink?: boolean;
13
13
  index?: number;
14
+ translateY?: number;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<IMultiCommodityProps>;
16
17
  export default _default;
@@ -10,7 +10,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
10
10
  import { useEventReport } from '../../../../core/hooks/useEventReport';
11
11
  const MultiCommodity = (_a) => {
12
12
  var _b, _c;
13
- 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"]);
13
+ 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"]);
14
14
  const { sxpParameter } = useSxpDataSource();
15
15
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
16
16
  const { popup } = useEditor();
@@ -36,7 +36,9 @@ const MultiCommodity = (_a) => {
36
36
  var _a, _b, _c, _d, _e, _f;
37
37
  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) }),
38
38
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
39
- React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
39
+ React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index, style: {
40
+ transform: `translateY(${translateY}%)`
41
+ } })),
40
42
  React.createElement("div", { className: css({
41
43
  color: '#fff',
42
44
  display: 'flex',
@@ -11,6 +11,7 @@ export interface IMultiCommodityDiroProps {
11
11
  ctaTempStyles?: ICtaTempStylesType;
12
12
  isExternalLink?: boolean;
13
13
  index?: number;
14
+ translateY?: number;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<IMultiCommodityDiroProps>;
16
17
  export default _default;
@@ -10,7 +10,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
10
10
  import { useEventReport } from '../../../../core/hooks/useEventReport';
11
11
  const MultiCommodityDiro = (_a) => {
12
12
  var _b, _c;
13
- 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"]);
13
+ 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"]);
14
14
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
15
15
  const { popup } = useEditor();
16
16
  const { jumpToWeb } = useEventReport();
@@ -35,7 +35,9 @@ const MultiCommodityDiro = (_a) => {
35
35
  var _a, _b, _c, _d, _e, _f;
36
36
  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) }),
37
37
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
38
- React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
38
+ React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index, style: {
39
+ transform: `translateY(${translateY}%)`
40
+ } })),
39
41
  React.createElement("div", { className: css({
40
42
  color: '#000',
41
43
  display: 'flex',
@@ -11,6 +11,7 @@ export interface IMultiCommodityDiroNewProps {
11
11
  ctaTempStyles?: ICtaTempStylesType;
12
12
  isExternalLink?: boolean;
13
13
  index?: number;
14
+ translateY?: number;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<IMultiCommodityDiroNewProps>;
16
17
  export default _default;
@@ -10,7 +10,7 @@ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
10
10
  import { useEventReport } from '../../../../core/hooks/useEventReport';
11
11
  const MultiCommodityDiroNew = (_a) => {
12
12
  var _b, _c;
13
- 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"]);
13
+ 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"]);
14
14
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
15
15
  const { popup } = useEditor();
16
16
  const { jumpToWeb } = useEventReport();
@@ -35,7 +35,9 @@ const MultiCommodityDiroNew = (_a) => {
35
35
  var _a, _b, _c, _d, _e, _f;
36
36
  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) }),
37
37
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
38
- React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
38
+ React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index, style: {
39
+ transform: `translateY(${translateY}%)`
40
+ } })),
39
41
  React.createElement("div", { className: css({
40
42
  color: '#fff',
41
43
  display: 'flex',
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { ProductInfoType, RecItemType } from '../../../../core/components/SxpPageRender/typing';
3
3
  export interface IImgProps {
4
4
  src: string;
5
5
  rec?: RecItemType;
6
6
  item?: ProductInfoType;
7
7
  index?: number;
8
+ style?: CSSProperties;
8
9
  }
9
10
  declare const _default: React.NamedExoticComponent<IImgProps>;
10
11
  export default _default;
@@ -3,7 +3,7 @@ import React, { memo, useEffect, useRef } from 'react';
3
3
  import useOnScreen from '../../../../core/hooks/useOnScreen';
4
4
  import { useSxpDataSource } from '../../../../core/hooks';
5
5
  import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
6
- const Img = ({ src, rec, item, index }) => {
6
+ const Img = ({ src, rec, item, index, style }) => {
7
7
  const ref = useRef(null);
8
8
  const isOnScreen = useOnScreen(ref);
9
9
  const { ctaEvent } = useSxpDataSource();
@@ -16,6 +16,6 @@ const Img = ({ src, rec, item, index }) => {
16
16
  }
17
17
  }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
18
18
  return (React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
19
- React.createElement(FormatImage, { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })));
19
+ React.createElement(FormatImage, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }, style)), src: src })));
20
20
  };
21
21
  export default memo(Img);
@@ -40,6 +40,56 @@ declare const _default: ({
40
40
  child?: undefined;
41
41
  })[];
42
42
  type?: undefined;
43
+ } | {
44
+ title: string;
45
+ child: ({
46
+ type: string;
47
+ label: string;
48
+ child: {
49
+ type: string;
50
+ name: string[];
51
+ addonAfter: string;
52
+ }[];
53
+ addonAfter?: undefined;
54
+ name?: undefined;
55
+ min?: undefined;
56
+ initialValue?: undefined;
57
+ } | {
58
+ type: string;
59
+ label: string;
60
+ child: ({
61
+ type: string;
62
+ name: string[];
63
+ max: number;
64
+ addonAfter?: undefined;
65
+ } | {
66
+ type: string;
67
+ name: string[];
68
+ addonAfter: string;
69
+ max: number;
70
+ })[];
71
+ addonAfter?: undefined;
72
+ name?: undefined;
73
+ min?: undefined;
74
+ initialValue?: undefined;
75
+ } | {
76
+ type: string;
77
+ label: string;
78
+ addonAfter: string;
79
+ name: string[];
80
+ child?: undefined;
81
+ min?: undefined;
82
+ initialValue?: undefined;
83
+ } | {
84
+ label: string;
85
+ type: string;
86
+ name: string[];
87
+ min: number;
88
+ addonAfter: string;
89
+ initialValue: number;
90
+ child?: undefined;
91
+ })[];
92
+ type?: undefined;
43
93
  } | {
44
94
  title: string;
45
95
  type: string;
@@ -97,6 +97,14 @@ export default [
97
97
  label: '与右侧边距',
98
98
  addonAfter: 'px',
99
99
  name: ['props', 'ctaTempStyles', 'img', 'marginRight']
100
+ },
101
+ {
102
+ label: '居中垂直偏移',
103
+ type: 'Number',
104
+ name: ['props', 'translateY'],
105
+ min: -100,
106
+ addonAfter: '%',
107
+ initialValue: 0
100
108
  }
101
109
  ]
102
110
  },
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
+ const hls_js_1 = tslib_1.__importDefault(require("hls.js"));
5
6
  const useIconLink_1 = require("../SxpPageRender/useIconLink");
6
7
  const FormatImage_1 = tslib_1.__importDefault(require("../SxpPageRender/FormatImage"));
7
8
  const hooks_1 = require("../../../core/hooks");
@@ -141,8 +142,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
141
142
  if (!videoRef.current.src) {
142
143
  const videoSrc = rec.video.url;
143
144
  if (videoSrc.includes('.m3u8')) {
144
- if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
145
- const hls = new window.Hls();
145
+ if (hls_js_1.default.isSupported()) {
146
+ const hls = new hls_js_1.default();
146
147
  hls.loadSource(videoSrc);
147
148
  hls.attachMedia(videoRef.current);
148
149
  }
@@ -12,14 +12,14 @@ Object.values(_materials_).forEach((v) => {
12
12
  RESOLVER[v.extend.type] = v;
13
13
  });
14
14
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
15
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15
+ var _a, _b, _c, _d, _e, _f;
16
16
  const utmVal = (0, react_1.useMemo)(() => {
17
17
  var _a;
18
18
  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('?', '') : '';
19
19
  return searchParams;
20
20
  }, []);
21
21
  return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
22
- react_1.default.createElement(SxpDataSourceProvider_1.default, { 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 }) => {
22
+ react_1.default.createElement(SxpDataSourceProvider_1.default, { 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 }) => {
23
23
  var _a;
24
24
  return (react_1.default.createElement(react_1.default.Fragment, null,
25
25
  react_1.default.createElement(SxpPageRender_1.default, 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;
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const useIconLink_1 = require("../useIconLink");
6
6
  const hooks_1 = require("../../../../core/hooks");
7
- const FingerSwipeTip = ({ imageUrl }) => {
7
+ const FingerSwipeTip = ({ imageUrl, style }) => {
8
8
  const [show, setShow] = (0, react_1.useState)(true);
9
9
  const { schema: { sxpPageConf } } = (0, hooks_1.useEditor)();
10
10
  (0, react_1.useEffect)(() => {
@@ -16,7 +16,7 @@ const FingerSwipeTip = ({ imageUrl }) => {
16
16
  const animationCls = (0, react_1.useMemo)(() => {
17
17
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
18
18
  }, [show]);
19
- return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}` },
19
+ return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
20
20
  react_1.default.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
21
21
  };
22
22
  exports.default = FingerSwipeTip;
@@ -13,7 +13,6 @@ const FormatImage = (0, react_1.forwardRef)((props, ref) => {
13
13
  (0, react_1.useEffect)(() => {
14
14
  setImgSrc(src);
15
15
  }, [src]);
16
- const imgRef = (0, react_1.useRef)(null);
17
16
  return (react_1.default.createElement(react_1.default.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (react_1.default.createElement("picture", null,
18
17
  react_1.default.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
19
18
  react_1.default.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -184,7 +184,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
184
184
  const videoSrc = rec.video.url;
185
185
  if (!videoSrc)
186
186
  return;
187
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
188
187
  setIsPauseVideo(false);
189
188
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
190
189
  const dom = document.querySelector('#player-container-id');
@@ -192,6 +191,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
192
191
  if (!dom && !dom2)
193
192
  return;
194
193
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
194
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
195
195
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
196
196
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
197
197
  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?: {