pb-sxp-ui 1.18.2 → 1.19.0-alpha.2

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 (74) hide show
  1. package/dist/index.cjs +364 -252
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +7 -15
  4. package/dist/index.js +364 -252
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +6 -6
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +6 -6
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +364 -252
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +6 -6
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/DiyPortalPreview/index.js +3 -5
  15. package/es/core/components/DiyStoryPreview/index.js +18 -7
  16. package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/RenderCard.js +2 -14
  18. package/es/core/components/SxpPageRender/index.d.ts +1 -0
  19. package/es/core/components/SxpPageRender/index.js +98 -64
  20. package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
  21. package/es/core/context/SxpDataSourceProvider.js +71 -27
  22. package/es/core/utils/tool.d.ts +3 -1
  23. package/es/core/utils/tool.js +29 -1
  24. package/es/materials/sxp/consentPopup/Display/index.js +1 -1
  25. package/es/materials/sxp/cta/AniLinkPopup/material.js +3 -2
  26. package/es/materials/sxp/popup/CommodityDetail/material.js +2 -1
  27. package/es/materials/sxp/popup/CommodityList/index.js +5 -4
  28. package/es/materials/sxp/popup/CommodityList/material.js +1 -1
  29. package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
  30. package/es/materials/sxp/template/Appoint/material.js +2 -1
  31. package/es/materials/sxp/template/Commodity/material.js +3 -2
  32. package/es/materials/sxp/template/CommodityDiro/material.js +3 -2
  33. package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -2
  34. package/es/materials/sxp/template/Link/material.js +4 -2
  35. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  36. package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
  37. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  38. package/es/materials/sxp/template/MultiCommodityDiro/material.js +3 -2
  39. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  40. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +4 -2
  41. package/es/materials/sxp/template/NineCommodity/material.js +3 -2
  42. package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
  43. package/es/materials/sxp/template/components/settingRender.js +1 -1
  44. package/lib/core/components/DiyPortalPreview/index.js +3 -5
  45. package/lib/core/components/DiyStoryPreview/index.js +18 -7
  46. package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  47. package/lib/core/components/SxpPageRender/RenderCard.js +2 -14
  48. package/lib/core/components/SxpPageRender/index.d.ts +1 -0
  49. package/lib/core/components/SxpPageRender/index.js +98 -64
  50. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
  51. package/lib/core/context/SxpDataSourceProvider.js +71 -27
  52. package/lib/core/utils/tool.d.ts +3 -1
  53. package/lib/core/utils/tool.js +31 -1
  54. package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
  55. package/lib/materials/sxp/cta/AniLinkPopup/material.js +2 -1
  56. package/lib/materials/sxp/popup/CommodityDetail/material.js +2 -1
  57. package/lib/materials/sxp/popup/CommodityList/index.js +5 -4
  58. package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
  59. package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
  60. package/lib/materials/sxp/template/Appoint/material.js +2 -1
  61. package/lib/materials/sxp/template/Commodity/material.js +3 -2
  62. package/lib/materials/sxp/template/CommodityDiro/material.js +3 -2
  63. package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -2
  64. package/lib/materials/sxp/template/Link/material.js +4 -2
  65. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  66. package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
  67. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  68. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +3 -2
  69. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  70. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +4 -2
  71. package/lib/materials/sxp/template/NineCommodity/material.js +3 -2
  72. package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
  73. package/lib/materials/sxp/template/components/settingRender.js +1 -1
  74. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import settingRender from './settingRender';
2
- import interactionRender from './interactionRender';
3
2
  import CommodityDetailComponent from '.';
4
3
  import { createMaterial } from '../../../../core/create';
4
+ import interactionRender from './interactionRender';
5
5
  const CommodityDetail = createMaterial(CommodityDetailComponent, {
6
6
  displayName: '商品详情',
7
7
  icon: '',
@@ -40,6 +40,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
40
40
  taxInfo: {
41
41
  color: '#000',
42
42
  fontSize: 13,
43
+ textAlign: 'left',
43
44
  marginBottom: '10px'
44
45
  }
45
46
  },
@@ -1,12 +1,12 @@
1
1
  import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
3
  import React, { memo, useCallback, useEffect } from 'react';
4
- import { throttle } from 'lodash';
5
- import Img from '../../template/components/Img';
6
4
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
7
5
  import './index.less';
8
6
  import { useEventReport } from '../../../../core/hooks/useEventReport';
9
7
  import { setFontForText } from '../../../../core/utils/tool';
8
+ import Img from '../../template/components/Img';
9
+ import { throttle } from 'lodash';
10
10
  import { getPriceText } from '../../../../core/utils/materials';
11
11
  const CommodityList = (_a) => {
12
12
  var _b, _c, _d;
@@ -53,11 +53,12 @@ const CommodityList = (_a) => {
53
53
  React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css({
54
54
  display: 'flex',
55
55
  alignItems: 'normal',
56
- width: '100%'
56
+ width: '100%',
57
+ textAlign: 'left'
57
58
  }) }, props),
58
59
  React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
59
60
  React.createElement("div", { style: {
60
- width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginInlineEnd) !== null && _f !== void 0 ? _f : 0}px)`,
61
+ width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px)`,
61
62
  display: 'flex',
62
63
  flexDirection: 'column',
63
64
  justifyContent: 'space-between'
@@ -16,7 +16,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
16
16
  commodityPicture: {
17
17
  width: 100,
18
18
  height: 100,
19
- marginInlineEnd: 10
19
+ marginRight: 10
20
20
  },
21
21
  commodityStyles: {
22
22
  price: {
@@ -71,7 +71,7 @@ export default [
71
71
  type: 'Number',
72
72
  label: '与右侧边距',
73
73
  addonAfter: 'px',
74
- name: ['props', 'commodityPicture', 'marginInlineEnd']
74
+ name: ['props', 'commodityPicture', 'marginRight']
75
75
  },
76
76
  {
77
77
  label: '居中垂直偏移',
@@ -19,11 +19,12 @@ const Appoint = createMaterial(AppointComponent, {
19
19
  borderRadius: 3,
20
20
  width: 30,
21
21
  height: 30,
22
- marginInlineEnd: 8
22
+ marginRight: 8
23
23
  },
24
24
  ctaTitle: {
25
25
  fontSize: 12,
26
26
  color: '#fff',
27
+ textAlign: 'left',
27
28
  width: 130,
28
29
  height: 20
29
30
  }
@@ -19,11 +19,12 @@ const Commodity = createMaterial(CommodityComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginInlineEnd: 8
22
+ marginRight: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#fff'
26
+ color: '#fff',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  fontSize: 10,
@@ -19,11 +19,12 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginInlineEnd: 8
22
+ marginRight: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#000'
26
+ color: '#000',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  fontSize: 10,
@@ -19,17 +19,19 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
19
19
  borderRadius: 8,
20
20
  width: 78,
21
21
  height: 78,
22
- marginInlineEnd: 16
22
+ marginRight: 16
23
23
  },
24
24
  title: {
25
25
  fontSize: 13,
26
- color: '#000'
26
+ color: '#000',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  textDecoration: 'underline',
30
31
  fontSize: 14,
31
32
  fontWeight: 'bold',
32
33
  color: '#000',
34
+ textAlign: 'left',
33
35
  width: 150,
34
36
  height: 20
35
37
  }
@@ -1,9 +1,9 @@
1
1
  var _a;
2
2
  import settingRender from '../components/settingRender';
3
3
  import linkSettingRender from './settingRender';
4
- import interactionRender from './interactionRender';
5
4
  import LinkComponent from '.';
6
5
  import { createMaterial } from '../../../../core/create';
6
+ import interactionRender from './interactionRender';
7
7
  const Link = createMaterial(LinkComponent, {
8
8
  displayName: '普通CTA',
9
9
  icon: '',
@@ -21,17 +21,19 @@ const Link = createMaterial(LinkComponent, {
21
21
  borderRadius: 3,
22
22
  width: 60,
23
23
  height: 60,
24
- marginInlineEnd: 8
24
+ marginRight: 8
25
25
  },
26
26
  ctaTitle: {
27
27
  fontSize: 12,
28
28
  color: '#fff',
29
+ textAlign: 'left',
29
30
  width: 130,
30
31
  height: 20
31
32
  }
32
33
  },
33
34
  customTitle: {
34
35
  style: {
36
+ textAlign: 'left',
35
37
  textDecoration: 'underline',
36
38
  fontWeight: 'bold',
37
39
  width: 130,
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
4
4
  import { SwiperSlide } from 'swiper/react';
5
5
  import Img from '../components/Img';
6
6
  import Scroll from '../components/Scroll';
7
- import EventProvider from '../components/EventProvider';
8
7
  import styles from './index.module.less';
9
8
  import { useSxpDataSource } from '../../../../core/hooks';
10
9
  import { setFontForText } from '../../../../core/utils/tool';
10
+ import EventProvider from '../components/EventProvider';
11
11
  const MultiCommodity = (_a) => {
12
12
  var _b, _c;
13
13
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -15,7 +15,7 @@ const MultiCommodity = (_a) => {
15
15
  const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
16
16
  return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
18
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
19
19
  React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
20
20
  React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
21
21
  React.createElement("div", { className: css({
@@ -19,11 +19,12 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginInlineEnd: 8
22
+ marginRight: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
26
  color: '#fff',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  fontSize: 10,
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
4
4
  import { SwiperSlide } from 'swiper/react';
5
5
  import Scroll from '../components/Scroll';
6
6
  import Img from '../components/Img';
7
- import EventProvider from '../components/EventProvider';
8
7
  import styles from './index.module.less';
9
8
  import { useSxpDataSource } from '../../../../core/hooks';
10
9
  import { setFontForText } from '../../../../core/utils/tool';
10
+ import EventProvider from '../components/EventProvider';
11
11
  const MultiCommodityDiro = (_a) => {
12
12
  var _b, _c;
13
13
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -15,7 +15,7 @@ const MultiCommodityDiro = (_a) => {
15
15
  const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
16
16
  return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
18
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
19
19
  React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
20
20
  React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
21
21
  React.createElement("div", { className: css({
@@ -19,11 +19,12 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginInlineEnd: 8
22
+ marginRight: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#000'
26
+ color: '#000',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  fontSize: 10,
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
4
4
  import { SwiperSlide } from 'swiper/react';
5
5
  import Scroll from '../components/Scroll';
6
6
  import Img from '../components/Img';
7
- import EventProvider from '../components/EventProvider';
8
7
  import styles from './index.module.less';
9
8
  import { useSxpDataSource } from '../../../../core/hooks';
10
9
  import { setFontForText } from '../../../../core/utils/tool';
10
+ import EventProvider from '../components/EventProvider';
11
11
  const MultiCommodityDiroNew = (_a) => {
12
12
  var _b, _c;
13
13
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -15,7 +15,7 @@ const MultiCommodityDiroNew = (_a) => {
15
15
  const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
16
16
  return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
18
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
19
19
  React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
20
20
  React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
21
21
  React.createElement("div", { className: css({
@@ -19,17 +19,19 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
19
19
  borderRadius: 8,
20
20
  width: 78,
21
21
  height: 78,
22
- marginInlineEnd: 16
22
+ marginRight: 16
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#000'
26
+ color: '#000',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  textDecoration: 'underline',
30
31
  fontSize: 12,
31
32
  fontWeight: 'bold',
32
33
  color: '#000',
34
+ textAlign: 'left',
33
35
  width: 150,
34
36
  height: 20
35
37
  }
@@ -19,11 +19,12 @@ const NineCommodity = createMaterial(NineCommodityComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginInlineEnd: 8
22
+ marginRight: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#fff'
26
+ color: '#fff',
27
+ textAlign: 'left'
27
28
  },
28
29
  ctaTitle: {
29
30
  fontSize: 10,
@@ -21,7 +21,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
21
21
  return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css({
22
22
  width: '50px',
23
23
  height: '50px',
24
- marginInlineEnd: '10px'
24
+ marginRight: '10px'
25
25
  }), onClick: () => {
26
26
  handleClick(item, index);
27
27
  }, key: index },
@@ -100,7 +100,7 @@ export default [
100
100
  type: 'Number',
101
101
  label: '与右侧边距',
102
102
  addonAfter: 'px',
103
- name: ['props', 'ctaTempStyles', 'img', 'marginInlineEnd']
103
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
104
104
  },
105
105
  {
106
106
  label: '居中垂直偏移',
@@ -62,7 +62,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
62
62
  const CTA = (rec, index) => {
63
63
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
64
64
  return (react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
65
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: true })));
65
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER })));
66
66
  }
67
67
  return null;
68
68
  };
@@ -75,10 +75,8 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
75
75
  react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
76
76
  CTA(rec, index),
77
77
  react_1.default.createElement("div", null,
78
- react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
79
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: true })),
80
- react_1.default.createElement(Hashtag_1.default, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })),
81
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: true })));
78
+ react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
79
+ react_1.default.createElement(Hashtag_1.default, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
82
80
  }
83
81
  return null;
84
82
  };
@@ -84,10 +84,21 @@ const DiyStoryPreview = (0, react_1.forwardRef)(({ data = [], globalConfig, tipT
84
84
  return null;
85
85
  }, [globalConfig]);
86
86
  const renderBottom = (rec, index) => {
87
- var _a, _b, _c, _d;
87
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
88
88
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
89
+ let cta = null;
90
+ if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
91
+ cta = '多商品CTA';
92
+ }
93
+ else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
94
+ cta = '商品CTA';
95
+ }
96
+ else {
97
+ cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
98
+ }
99
+ const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
89
100
  return (react_1.default.createElement(react_1.default.Fragment, null,
90
- ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && (react_1.default.createElement("div", { style: {
101
+ ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (react_1.default.createElement("div", { style: {
91
102
  background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
92
103
  height: '130px',
93
104
  position: 'absolute',
@@ -98,7 +109,7 @@ const DiyStoryPreview = (0, react_1.forwardRef)(({ data = [], globalConfig, tipT
98
109
  pointerEvents
99
110
  } })),
100
111
  react_1.default.createElement("div", { style: {
101
- marginBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px`,
112
+ marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
102
113
  zIndex: 999,
103
114
  position: 'absolute',
104
115
  bottom: 0,
@@ -107,11 +118,11 @@ const DiyStoryPreview = (0, react_1.forwardRef)(({ data = [], globalConfig, tipT
107
118
  paddingTop: '20px'
108
119
  } },
109
120
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (react_1.default.createElement("div", { style: {} },
110
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: index === activeIndex }))) : null,
121
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: index === activeIndex, value: value }))) : null,
111
122
  react_1.default.createElement("div", null,
112
- react_1.default.createElement(ExpandableText_1.default, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
113
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
114
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
123
+ react_1.default.createElement(ExpandableText_1.default, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_j = (_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
124
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
125
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
115
126
  }
116
127
  return null;
117
128
  };
@@ -8,6 +8,7 @@ interface IRenderCardProps {
8
8
  resolver: any;
9
9
  includesCtaType?: string[];
10
10
  isActive?: boolean;
11
+ value?: any;
11
12
  isNineProduct?: boolean;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IRenderCardProps>;
@@ -6,22 +6,10 @@ require("./index.less");
6
6
  const lodash_1 = require("lodash");
7
7
  const withBindDataSource_1 = tslib_1.__importDefault(require("../../../core/hoc/withBindDataSource"));
8
8
  const hooks_1 = require("../../../core/hooks");
9
- const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
10
- var _a, _b, _c, _d, _e;
9
+ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value, isNineProduct }) => {
11
10
  const { schema } = (0, hooks_1.useEditor)();
12
11
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
13
12
  return null;
14
- let cta = null;
15
- if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
16
- cta = '多商品CTA';
17
- }
18
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19
- cta = '商品CTA';
20
- }
21
- else {
22
- cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
23
- }
24
- const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
25
13
  const renderComp = (0, react_1.useMemo)(() => {
26
14
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
27
15
  if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type)))
@@ -46,7 +34,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
46
34
  const sbf = style.backdropFilter;
47
35
  style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
48
36
  }
49
- return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginInlineStart: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
37
+ return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
50
38
  }
51
39
  else {
52
40
  return null;
@@ -13,6 +13,7 @@ export type postConfigType = {
13
13
  };
14
14
  export interface ISxpPageRenderProps {
15
15
  globalConfig?: {
16
+ enableCookieSetting?: boolean;
16
17
  nineProductEnable?: boolean;
17
18
  isShowLogo?: boolean;
18
19
  isShowCTA?: boolean;