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

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 (64) hide show
  1. package/dist/index.cjs +159 -171
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +15 -7
  4. package/dist/index.js +159 -171
  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 +159 -171
  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 +5 -3
  15. package/es/core/components/DiyStoryPreview/index.js +7 -18
  16. package/es/core/components/SxpPageRender/RenderCard.d.ts +0 -1
  17. package/es/core/components/SxpPageRender/RenderCard.js +14 -2
  18. package/es/core/components/SxpPageRender/index.js +4 -4
  19. package/es/materials/sxp/consentPopup/Display/index.js +1 -1
  20. package/es/materials/sxp/cta/AniLinkPopup/material.js +2 -3
  21. package/es/materials/sxp/popup/CommodityDetail/material.js +1 -2
  22. package/es/materials/sxp/popup/CommodityList/index.js +4 -5
  23. package/es/materials/sxp/popup/CommodityList/material.js +1 -1
  24. package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
  25. package/es/materials/sxp/template/Appoint/material.js +1 -2
  26. package/es/materials/sxp/template/Commodity/material.js +2 -3
  27. package/es/materials/sxp/template/CommodityDiro/material.js +2 -3
  28. package/es/materials/sxp/template/CommodityDiroNew/material.js +2 -4
  29. package/es/materials/sxp/template/Link/material.js +2 -4
  30. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  31. package/es/materials/sxp/template/MultiCommodity/material.js +1 -2
  32. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  33. package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
  34. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  35. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
  36. package/es/materials/sxp/template/NineCommodity/material.js +2 -3
  37. package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
  38. package/es/materials/sxp/template/components/settingRender.js +1 -1
  39. package/lib/core/components/DiyPortalPreview/index.js +5 -3
  40. package/lib/core/components/DiyStoryPreview/index.js +7 -18
  41. package/lib/core/components/SxpPageRender/RenderCard.d.ts +0 -1
  42. package/lib/core/components/SxpPageRender/RenderCard.js +14 -2
  43. package/lib/core/components/SxpPageRender/index.js +4 -4
  44. package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
  45. package/lib/materials/sxp/cta/AniLinkPopup/material.js +1 -2
  46. package/lib/materials/sxp/popup/CommodityDetail/material.js +1 -2
  47. package/lib/materials/sxp/popup/CommodityList/index.js +4 -5
  48. package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
  49. package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
  50. package/lib/materials/sxp/template/Appoint/material.js +1 -2
  51. package/lib/materials/sxp/template/Commodity/material.js +2 -3
  52. package/lib/materials/sxp/template/CommodityDiro/material.js +2 -3
  53. package/lib/materials/sxp/template/CommodityDiroNew/material.js +2 -4
  54. package/lib/materials/sxp/template/Link/material.js +2 -4
  55. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  56. package/lib/materials/sxp/template/MultiCommodity/material.js +1 -2
  57. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  58. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
  59. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  60. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
  61. package/lib/materials/sxp/template/NineCommodity/material.js +2 -3
  62. package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
  63. package/lib/materials/sxp/template/components/settingRender.js +1 -1
  64. package/package.json +1 -1
@@ -8,7 +8,6 @@ interface IRenderCardProps {
8
8
  resolver: any;
9
9
  includesCtaType?: string[];
10
10
  isActive?: boolean;
11
- value?: any;
12
11
  isNineProduct?: boolean;
13
12
  }
14
13
  declare const _default: React.NamedExoticComponent<IRenderCardProps>;
@@ -6,10 +6,22 @@ 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, value, isNineProduct }) => {
9
+ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
10
+ var _a, _b, _c, _d, _e;
10
11
  const { schema } = (0, hooks_1.useEditor)();
11
12
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
12
13
  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];
13
25
  const renderComp = (0, react_1.useMemo)(() => {
14
26
  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;
15
27
  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)))
@@ -34,7 +46,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
34
46
  const sbf = style.backdropFilter;
35
47
  style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
36
48
  }
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 })));
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 })));
38
50
  }
39
51
  else {
40
52
  return null;
@@ -319,17 +319,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
319
319
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
320
320
  ((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
321
321
  return (react_1.default.createElement(react_1.default.Fragment, null,
322
- isNineProduct && (react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
322
+ isNineProduct && (react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
323
323
  ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
324
324
  react_1.default.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
325
325
  react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
326
326
  ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
327
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
327
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
328
328
  react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
329
329
  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: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', 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' }), onChange: onExpandableChange }),
330
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
330
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
331
331
  react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
332
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
332
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
333
333
  }
334
334
  return null;
335
335
  }, [
@@ -28,7 +28,7 @@ const Display = (_a) => {
28
28
  react_1.default.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
29
29
  __html: (0, tool_1.setFontForText)((_b = content === null || content === void 0 ? void 0 : content.text) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '</br>'), content === null || content === void 0 ? void 0 : content.style)
30
30
  } }),
31
- react_1.default.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginLeft: '5px' }), dangerouslySetInnerHTML: {
31
+ react_1.default.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginInlineStart: '5px' }), dangerouslySetInnerHTML: {
32
32
  __html: (0, tool_1.setFontForText)((_c = interaction === null || interaction === void 0 ? void 0 : interaction.text) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '</br>'), interaction === null || interaction === void 0 ? void 0 : interaction.style)
33
33
  }, onClick: handleClick })),
34
34
  isShowClose && (react_1.default.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AniLinkPopup = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
6
7
  const _1 = tslib_1.__importDefault(require("."));
7
8
  const create_1 = require("../../../../core/create");
8
- const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
9
9
  const AniLinkPopup = (0, create_1.createMaterial)(_1.default, {
10
10
  displayName: '竖版弹窗CTA',
11
11
  icon: '',
@@ -28,7 +28,6 @@ const AniLinkPopup = (0, create_1.createMaterial)(_1.default, {
28
28
  title: {
29
29
  fontSize: 14,
30
30
  color: '#000',
31
- textAlign: 'left',
32
31
  lineHeight: 2.6
33
32
  },
34
33
  ctaTitle: {
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CommodityDetail = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
6
7
  const _1 = tslib_1.__importDefault(require("."));
7
8
  const create_1 = require("../../../../core/create");
8
- const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
9
9
  const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
10
10
  displayName: '商品详情',
11
11
  icon: '',
@@ -44,7 +44,6 @@ const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
44
44
  taxInfo: {
45
45
  color: '#000',
46
46
  fontSize: 13,
47
- textAlign: 'left',
48
47
  marginBottom: '10px'
49
48
  }
50
49
  },
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const css_1 = require("@emotion/css");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
+ const lodash_1 = require("lodash");
7
+ const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
6
8
  const hooks_1 = require("../../../../core/hooks");
7
9
  require("./index.less");
8
10
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
9
11
  const tool_1 = require("../../../../core/utils/tool");
10
- const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
11
- const lodash_1 = require("lodash");
12
12
  const materials_1 = require("../../../../core/utils/materials");
13
13
  const CommodityList = (_a) => {
14
14
  var _b, _c, _d;
@@ -55,12 +55,11 @@ const CommodityList = (_a) => {
55
55
  react_1.default.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: (0, css_1.css)({
56
56
  display: 'flex',
57
57
  alignItems: 'normal',
58
- width: '100%',
59
- textAlign: 'left'
58
+ width: '100%'
60
59
  }) }, props),
61
60
  react_1.default.createElement(Img_1.default, { 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 }),
62
61
  react_1.default.createElement("div", { style: {
63
- 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)`,
62
+ 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)`,
64
63
  display: 'flex',
65
64
  flexDirection: 'column',
66
65
  justifyContent: 'space-between'
@@ -20,7 +20,7 @@ const CommodityList = (0, create_1.createMaterial)(_1.default, {
20
20
  commodityPicture: {
21
21
  width: 100,
22
22
  height: 100,
23
- marginRight: 10
23
+ marginInlineEnd: 10
24
24
  },
25
25
  commodityStyles: {
26
26
  price: {
@@ -73,7 +73,7 @@ exports.default = [
73
73
  type: 'Number',
74
74
  label: '与右侧边距',
75
75
  addonAfter: 'px',
76
- name: ['props', 'commodityPicture', 'marginRight']
76
+ name: ['props', 'commodityPicture', 'marginInlineEnd']
77
77
  },
78
78
  {
79
79
  label: '居中垂直偏移',
@@ -23,12 +23,11 @@ const Appoint = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 3,
24
24
  width: 30,
25
25
  height: 30,
26
- marginRight: 8
26
+ marginInlineEnd: 8
27
27
  },
28
28
  ctaTitle: {
29
29
  fontSize: 12,
30
30
  color: '#fff',
31
- textAlign: 'left',
32
31
  width: 130,
33
32
  height: 20
34
33
  }
@@ -23,12 +23,11 @@ const Commodity = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 3,
24
24
  width: 60,
25
25
  height: 60,
26
- marginRight: 8
26
+ marginInlineEnd: 8
27
27
  },
28
28
  title: {
29
29
  fontSize: 12,
30
- color: '#fff',
31
- textAlign: 'left'
30
+ color: '#fff'
32
31
  },
33
32
  ctaTitle: {
34
33
  fontSize: 10,
@@ -23,12 +23,11 @@ const CommodityDiro = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 3,
24
24
  width: 60,
25
25
  height: 60,
26
- marginRight: 8
26
+ marginInlineEnd: 8
27
27
  },
28
28
  title: {
29
29
  fontSize: 12,
30
- color: '#000',
31
- textAlign: 'left'
30
+ color: '#000'
32
31
  },
33
32
  ctaTitle: {
34
33
  fontSize: 10,
@@ -23,19 +23,17 @@ const CommodityDiroNew = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 8,
24
24
  width: 78,
25
25
  height: 78,
26
- marginRight: 16
26
+ marginInlineEnd: 16
27
27
  },
28
28
  title: {
29
29
  fontSize: 13,
30
- color: '#000',
31
- textAlign: 'left'
30
+ color: '#000'
32
31
  },
33
32
  ctaTitle: {
34
33
  textDecoration: 'underline',
35
34
  fontSize: 14,
36
35
  fontWeight: 'bold',
37
36
  color: '#000',
38
- textAlign: 'left',
39
37
  width: 150,
40
38
  height: 20
41
39
  }
@@ -5,9 +5,9 @@ exports.Link = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const settingRender_1 = tslib_1.__importDefault(require("../components/settingRender"));
7
7
  const settingRender_2 = tslib_1.__importDefault(require("./settingRender"));
8
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
8
9
  const _1 = tslib_1.__importDefault(require("."));
9
10
  const create_1 = require("../../../../core/create");
10
- const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
11
11
  const Link = (0, create_1.createMaterial)(_1.default, {
12
12
  displayName: '普通CTA',
13
13
  icon: '',
@@ -25,19 +25,17 @@ const Link = (0, create_1.createMaterial)(_1.default, {
25
25
  borderRadius: 3,
26
26
  width: 60,
27
27
  height: 60,
28
- marginRight: 8
28
+ marginInlineEnd: 8
29
29
  },
30
30
  ctaTitle: {
31
31
  fontSize: 12,
32
32
  color: '#fff',
33
- textAlign: 'left',
34
33
  width: 130,
35
34
  height: 20
36
35
  }
37
36
  },
38
37
  customTitle: {
39
38
  style: {
40
- textAlign: 'left',
41
39
  textDecoration: 'underline',
42
40
  fontWeight: 'bold',
43
41
  width: 130,
@@ -6,10 +6,10 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_2 = require("swiper/react");
7
7
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
8
8
  const Scroll_1 = tslib_1.__importDefault(require("../components/Scroll"));
9
+ const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
9
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
11
  const hooks_1 = require("../../../../core/hooks");
11
12
  const tool_1 = require("../../../../core/utils/tool");
12
- const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
13
13
  const MultiCommodity = (_a) => {
14
14
  var _b, _c;
15
15
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -17,7 +17,7 @@ const MultiCommodity = (_a) => {
17
17
  const [products] = (0, react_1.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]);
18
18
  return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
19
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
20
- return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
20
+ return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
21
21
  react_1.default.createElement(EventProvider_1.default, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
22
22
  react_1.default.createElement(Img_1.default, { 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 }),
23
23
  react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -23,12 +23,11 @@ const MultiCommodity = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 3,
24
24
  width: 60,
25
25
  height: 60,
26
- marginRight: 8
26
+ marginInlineEnd: 8
27
27
  },
28
28
  title: {
29
29
  fontSize: 12,
30
30
  color: '#fff',
31
- textAlign: 'left'
32
31
  },
33
32
  ctaTitle: {
34
33
  fontSize: 10,
@@ -6,10 +6,10 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_2 = require("swiper/react");
7
7
  const Scroll_1 = tslib_1.__importDefault(require("../components/Scroll"));
8
8
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
9
+ const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
9
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
11
  const hooks_1 = require("../../../../core/hooks");
11
12
  const tool_1 = require("../../../../core/utils/tool");
12
- const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
13
13
  const MultiCommodityDiro = (_a) => {
14
14
  var _b, _c;
15
15
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -17,7 +17,7 @@ const MultiCommodityDiro = (_a) => {
17
17
  const [products] = (0, react_1.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]);
18
18
  return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
19
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
20
- return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
20
+ return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
21
21
  react_1.default.createElement(EventProvider_1.default, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
22
22
  react_1.default.createElement(Img_1.default, { 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 }),
23
23
  react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -23,12 +23,11 @@ const MultiCommodityDiro = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 3,
24
24
  width: 60,
25
25
  height: 60,
26
- marginRight: 8
26
+ marginInlineEnd: 8
27
27
  },
28
28
  title: {
29
29
  fontSize: 12,
30
- color: '#000',
31
- textAlign: 'left'
30
+ color: '#000'
32
31
  },
33
32
  ctaTitle: {
34
33
  fontSize: 10,
@@ -6,10 +6,10 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_2 = require("swiper/react");
7
7
  const Scroll_1 = tslib_1.__importDefault(require("../components/Scroll"));
8
8
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
9
+ const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
9
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
11
  const hooks_1 = require("../../../../core/hooks");
11
12
  const tool_1 = require("../../../../core/utils/tool");
12
- const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
13
13
  const MultiCommodityDiroNew = (_a) => {
14
14
  var _b, _c;
15
15
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -17,7 +17,7 @@ const MultiCommodityDiroNew = (_a) => {
17
17
  const [products] = (0, react_1.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]);
18
18
  return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
19
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
20
- return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
20
+ return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, { key: itemIndex, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
21
21
  react_1.default.createElement(EventProvider_1.default, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
22
22
  react_1.default.createElement(Img_1.default, { 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 }),
23
23
  react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -23,19 +23,17 @@ const MultiCommodityDiroNew = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 8,
24
24
  width: 78,
25
25
  height: 78,
26
- marginRight: 16
26
+ marginInlineEnd: 16
27
27
  },
28
28
  title: {
29
29
  fontSize: 12,
30
- color: '#000',
31
- textAlign: 'left'
30
+ color: '#000'
32
31
  },
33
32
  ctaTitle: {
34
33
  textDecoration: 'underline',
35
34
  fontSize: 12,
36
35
  fontWeight: 'bold',
37
36
  color: '#000',
38
- textAlign: 'left',
39
37
  width: 150,
40
38
  height: 20
41
39
  }
@@ -23,12 +23,11 @@ const NineCommodity = (0, create_1.createMaterial)(_1.default, {
23
23
  borderRadius: 3,
24
24
  width: 60,
25
25
  height: 60,
26
- marginRight: 8
26
+ marginInlineEnd: 8
27
27
  },
28
28
  title: {
29
29
  fontSize: 12,
30
- color: '#fff',
31
- textAlign: 'left'
30
+ color: '#fff'
32
31
  },
33
32
  ctaTitle: {
34
33
  fontSize: 10,
@@ -24,7 +24,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
24
24
  return (react_1.default.createElement(react_1.default.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (react_1.default.createElement(react_2.SwiperSlide, { className: (0, css_1.css)({
25
25
  width: '50px',
26
26
  height: '50px',
27
- marginRight: '10px'
27
+ marginInlineEnd: '10px'
28
28
  }), onClick: () => {
29
29
  handleClick(item, index);
30
30
  }, key: index },
@@ -102,7 +102,7 @@ exports.default = [
102
102
  type: 'Number',
103
103
  label: '与右侧边距',
104
104
  addonAfter: 'px',
105
- name: ['props', 'ctaTempStyles', 'img', 'marginRight']
105
+ name: ['props', 'ctaTempStyles', 'img', 'marginInlineEnd']
106
106
  },
107
107
  {
108
108
  label: '居中垂直偏移',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.19.0-alpha.2",
3
+ "version": "1.19.0-alpha.3",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",