pb-sxp-ui 1.0.3-alpha.3 → 1.0.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 (56) hide show
  1. package/dist/index.cjs +70 -53
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +11 -8
  4. package/dist/index.js +70 -53
  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 +70 -53
  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/SxpPageRender/ExpandableText.js +1 -1
  15. package/es/core/components/SxpPageRender/Popup/index.js +5 -3
  16. package/es/core/components/SxpPageRender/RenderCard.js +5 -3
  17. package/es/core/components/SxpPageRender/index.js +5 -3
  18. package/es/core/context/EditorContext.js +3 -1
  19. package/es/materials/sxp/popup/CommodityDetail/index.js +9 -8
  20. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -5
  21. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
  22. package/es/materials/sxp/template/Appoint/material.js +2 -1
  23. package/es/materials/sxp/template/Commodity/material.js +2 -1
  24. package/es/materials/sxp/template/CommodityDiro/material.js +2 -1
  25. package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -3
  26. package/es/materials/sxp/template/Link/material.js +2 -1
  27. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  28. package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
  29. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  30. package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
  31. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  32. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
  33. package/es/materials/sxp/template/components/Scroll.d.ts +1 -0
  34. package/es/materials/sxp/template/components/Scroll.js +2 -2
  35. package/lib/core/components/SxpPageRender/ExpandableText.js +1 -1
  36. package/lib/core/components/SxpPageRender/Popup/index.js +5 -3
  37. package/lib/core/components/SxpPageRender/RenderCard.js +5 -3
  38. package/lib/core/components/SxpPageRender/index.js +5 -3
  39. package/lib/core/context/EditorContext.js +3 -1
  40. package/lib/materials/sxp/popup/CommodityDetail/index.js +9 -8
  41. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -5
  42. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
  43. package/lib/materials/sxp/template/Appoint/material.js +2 -1
  44. package/lib/materials/sxp/template/Commodity/material.js +2 -1
  45. package/lib/materials/sxp/template/CommodityDiro/material.js +2 -1
  46. package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -3
  47. package/lib/materials/sxp/template/Link/material.js +2 -1
  48. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  49. package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
  50. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  51. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
  52. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  53. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
  54. package/lib/materials/sxp/template/components/Scroll.d.ts +1 -0
  55. package/lib/materials/sxp/template/components/Scroll.js +2 -2
  56. package/package.json +1 -1
@@ -24,9 +24,9 @@ const MultiCommodity = (_a) => {
24
24
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
25
25
  onClick === null || onClick === void 0 ? void 0 : onClick();
26
26
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
27
- return (react_1.default.createElement(Scroll_1.default, null, products === null || products === void 0 ? void 0 : products.map((item) => {
27
+ return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
28
28
  var _a, _b, _c, _d, _e, _f;
29
- return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: (0, css_1.css)(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
29
+ return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
30
30
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
31
31
  react_1.default.createElement(Img_1.default, { 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 })),
32
32
  react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -45,7 +45,8 @@ const MultiCommodity = (0, create_1.createMaterial)(_1.default, {
45
45
  width: 236,
46
46
  height: 74,
47
47
  borderRadius: 3,
48
- backgroundColor: 'rgba(0,0,0,.3)'
48
+ backgroundColor: 'rgba(0,0,0,.3)',
49
+ marginBottom: 8
49
50
  }
50
51
  },
51
52
  w: 100,
@@ -23,9 +23,9 @@ const MultiCommodityDiro = (_a) => {
23
23
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
24
24
  onClick === null || onClick === void 0 ? void 0 : onClick();
25
25
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
26
- return (react_1.default.createElement(Scroll_1.default, null, products === null || products === void 0 ? void 0 : products.map((item) => {
26
+ return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
27
27
  var _a, _b, _c, _d, _e, _f;
28
- return (react_1.default.createElement(react_2.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: (0, css_1.css)(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
28
+ return (react_1.default.createElement(react_2.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: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
29
29
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
30
30
  react_1.default.createElement(Img_1.default, { 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 })),
31
31
  react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -45,7 +45,8 @@ const MultiCommodityDiro = (0, create_1.createMaterial)(_1.default, {
45
45
  width: 236,
46
46
  height: 74,
47
47
  borderRadius: 3,
48
- backgroundColor: '#fff'
48
+ backgroundColor: '#fff',
49
+ marginBottom: 8
49
50
  }
50
51
  },
51
52
  w: 100,
@@ -23,9 +23,9 @@ const MultiCommodityDiroNew = (_a) => {
23
23
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
24
24
  onClick === null || onClick === void 0 ? void 0 : onClick();
25
25
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
26
- return (react_1.default.createElement(Scroll_1.default, null, products === null || products === void 0 ? void 0 : products.map((item) => {
26
+ return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
27
27
  var _a, _b, _c, _d, _e, _f;
28
- return (react_1.default.createElement(react_2.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: (0, css_1.css)(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
28
+ return (react_1.default.createElement(react_2.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: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
29
29
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
30
30
  react_1.default.createElement(Img_1.default, { 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 })),
31
31
  react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -46,7 +46,8 @@ const MultiCommodityDiroNew = (0, create_1.createMaterial)(_1.default, {
46
46
  width: 260,
47
47
  height: 86,
48
48
  padding: 4,
49
- backgroundColor: 'rgba(255,255,255,0.75)'
49
+ backgroundColor: 'rgba(255,255,255,0.75)',
50
+ marginBottom: 8
50
51
  }
51
52
  },
52
53
  w: 100,
@@ -4,6 +4,7 @@ import 'swiper/css/free-mode';
4
4
  import 'swiper/css/scrollbar';
5
5
  interface IScrollProps {
6
6
  children: any;
7
+ isPadding?: boolean;
7
8
  }
8
9
  declare const _default: React.NamedExoticComponent<IScrollProps>;
9
10
  export default _default;
@@ -7,7 +7,7 @@ require("swiper/css");
7
7
  require("swiper/css/free-mode");
8
8
  require("swiper/css/scrollbar");
9
9
  const modules_1 = require("swiper/modules");
10
- const Scroll = ({ children }) => {
11
- return (react_1.default.createElement(react_2.Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: { paddingRight: '20px' } }, children));
10
+ const Scroll = ({ children, isPadding = true }) => {
11
+ return (react_1.default.createElement(react_2.Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: { padding: isPadding ? '0 12px 0 20px' : 0 } }, children));
12
12
  };
13
13
  exports.default = (0, react_1.memo)(Scroll);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.3-alpha.3",
3
+ "version": "1.0.3",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",