pb-sxp-ui 1.0.2 → 1.0.3-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 (182) hide show
  1. package/dist/index.cjs +3624 -1460
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +143 -245
  4. package/dist/index.js +3625 -1461
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -5
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -5
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +3624 -1460
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -5
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/ExpandableText.js +17 -10
  18. package/es/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
  19. package/es/core/components/SxpPageRender/Hashtag/index.js +3 -3
  20. package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  21. package/es/core/components/SxpPageRender/Modal/index.js +7 -4
  22. package/es/core/components/SxpPageRender/Navbar.d.ts +1 -0
  23. package/es/core/components/SxpPageRender/Navbar.js +3 -2
  24. package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  25. package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
  26. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
  27. package/es/core/components/SxpPageRender/Popup/index.js +3 -3
  28. package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  29. package/es/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
  30. package/es/core/components/SxpPageRender/WaterFall/List.js +24 -14
  31. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
  32. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -14
  33. package/es/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
  34. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  35. package/es/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
  36. package/es/core/components/SxpPageRender/index.d.ts +22 -1
  37. package/es/core/components/SxpPageRender/index.js +22 -19
  38. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  39. package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  40. package/es/core/components/SxpPageRender/useIconLink.js +8 -3
  41. package/es/core/context/EditorContext.d.ts +5 -0
  42. package/es/core/context/EditorContext.js +21 -3
  43. package/es/core/context/EditorDataProvider.d.ts +3 -1
  44. package/es/core/context/EditorDataProvider.js +5 -2
  45. package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
  46. package/es/core/context/SxpDataSourceProvider.js +8 -4
  47. package/es/core/create.d.ts +1 -1
  48. package/es/materials/sxp/HashTag/index.d.ts +14 -0
  49. package/es/materials/sxp/HashTag/index.js +6 -0
  50. package/es/materials/sxp/HashTag/material.d.ts +2 -0
  51. package/es/materials/sxp/HashTag/material.js +52 -0
  52. package/es/materials/sxp/HashTag/settingRender.d.ts +122 -0
  53. package/es/materials/sxp/HashTag/settingRender.js +153 -0
  54. package/es/materials/sxp/index.d.ts +1 -0
  55. package/es/materials/sxp/index.js +1 -0
  56. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  57. package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
  58. package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
  59. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  60. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
  61. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  62. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  63. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  64. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  65. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
  66. package/es/materials/sxp/popup/index.d.ts +0 -1
  67. package/es/materials/sxp/popup/index.js +0 -1
  68. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  69. package/es/materials/sxp/template/Appoint/index.js +4 -18
  70. package/es/materials/sxp/template/Appoint/material.js +22 -6
  71. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  72. package/es/materials/sxp/template/Commodity/index.js +5 -22
  73. package/es/materials/sxp/template/Commodity/material.js +31 -6
  74. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  75. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  76. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  77. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  78. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  79. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  80. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  81. package/es/materials/sxp/template/Link/index.js +4 -13
  82. package/es/materials/sxp/template/Link/material.js +22 -5
  83. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  84. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  85. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  86. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  87. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  88. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  89. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  90. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  91. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  92. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  93. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  94. package/es/materials/sxp/template/components/settingRender.d.ts +123 -0
  95. package/es/materials/sxp/template/components/settingRender.js +215 -0
  96. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  97. package/es/materials/sxp/template/components/typing.js +1 -0
  98. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  99. package/lib/core/components/SxpPageCore/index.js +2 -2
  100. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  101. package/lib/core/components/SxpPageRender/ExpandableText.js +17 -10
  102. package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
  103. package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -3
  104. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  105. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  106. package/lib/core/components/SxpPageRender/Navbar.d.ts +1 -0
  107. package/lib/core/components/SxpPageRender/Navbar.js +3 -2
  108. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  109. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  110. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  111. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  112. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  113. package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
  114. package/lib/core/components/SxpPageRender/WaterFall/List.js +23 -14
  115. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
  116. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +15 -13
  117. package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
  118. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  119. package/lib/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
  120. package/lib/core/components/SxpPageRender/index.d.ts +22 -1
  121. package/lib/core/components/SxpPageRender/index.js +22 -19
  122. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  123. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  124. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  125. package/lib/core/context/EditorContext.d.ts +5 -0
  126. package/lib/core/context/EditorContext.js +21 -3
  127. package/lib/core/context/EditorDataProvider.d.ts +3 -1
  128. package/lib/core/context/EditorDataProvider.js +4 -1
  129. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
  130. package/lib/core/context/SxpDataSourceProvider.js +8 -4
  131. package/lib/core/create.d.ts +1 -1
  132. package/lib/materials/sxp/HashTag/index.d.ts +14 -0
  133. package/lib/materials/sxp/HashTag/index.js +9 -0
  134. package/lib/materials/sxp/HashTag/material.d.ts +2 -0
  135. package/lib/materials/sxp/HashTag/material.js +56 -0
  136. package/lib/materials/sxp/HashTag/settingRender.d.ts +122 -0
  137. package/lib/materials/sxp/HashTag/settingRender.js +155 -0
  138. package/lib/materials/sxp/index.d.ts +1 -0
  139. package/lib/materials/sxp/index.js +1 -0
  140. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  141. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
  142. package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
  143. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  144. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
  145. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  146. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  147. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  148. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  149. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
  150. package/lib/materials/sxp/popup/index.d.ts +0 -1
  151. package/lib/materials/sxp/popup/index.js +0 -1
  152. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  153. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  154. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  155. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  156. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  157. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  158. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  159. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  160. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  161. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  162. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  163. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  164. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  165. package/lib/materials/sxp/template/Link/index.js +4 -13
  166. package/lib/materials/sxp/template/Link/material.js +22 -5
  167. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  168. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  169. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  170. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  171. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  172. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  173. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  174. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  175. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  176. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  177. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  178. package/lib/materials/sxp/template/components/settingRender.d.ts +123 -0
  179. package/lib/materials/sxp/template/components/settingRender.js +217 -0
  180. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  181. package/lib/materials/sxp/template/components/typing.js +2 -0
  182. package/package.json +1 -1
@@ -9,8 +9,8 @@ import Modal from '../../../../core/components/SxpPageRender/Modal';
9
9
  import ExpandableText from '../../../../core/components/SxpPageRender/ExpandableText';
10
10
  import { useEventReport } from '../../../../core/hooks/useEventReport';
11
11
  const CommodityDetailDiroNew = (_a) => {
12
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
12
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
14
14
  const [spread, setSpread] = useState(true);
15
15
  const { sxpParameter } = useSxpDataSource();
16
16
  const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
@@ -79,14 +79,22 @@ const CommodityDetailDiroNew = (_a) => {
79
79
  }
80
80
  }
81
81
  };
82
+ const productInfoText = ({ isPost }) => {
83
+ return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
84
+ React.createElement(ExpandableText, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
85
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
86
+ Made in Italy` })));
87
+ };
82
88
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
83
89
  React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
84
90
  product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
85
91
  clickable: true,
86
92
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
87
- clickableClass: 'commondityDiroNew-swiper-clickable'
93
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
94
+ ? 'commondityDiroNew-swiper-clickable-left'
95
+ : 'commondityDiroNew-swiper-clickable-center'
88
96
  }, loop: true, autoplay: {
89
- delay: 3000
97
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
90
98
  } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
91
99
  return (React.createElement(SwiperSlide, { key: src },
92
100
  React.createElement("div", { style: {
@@ -112,18 +120,13 @@ const CommodityDetailDiroNew = (_a) => {
112
120
  }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
113
121
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
114
122
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
115
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
116
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText)),
117
- React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
118
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn' }, (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'Shop now')),
119
- React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, isPost ? (React.createElement(ExpandableText, { onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
120
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
121
- Made in Italy` })) : (React.createElement("div", { className: 'pb-commondityDiroNew-info' }, (product === null || product === void 0 ? void 0 : product.info) ||
122
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
123
- Made in Italy`))))),
124
- React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) },
125
- React.createElement("div", { className: 'pb-commondityDiroNew-info', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, (product === null || product === void 0 ? void 0 : product.info) ||
126
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
127
- Made in Italy`))));
123
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
124
+ React.createElement("div", { className: '' },
125
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
126
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
127
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
128
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
129
+ productInfoText({ isPost }))),
130
+ React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
128
131
  };
129
132
  export default memo(CommodityDetailDiroNew);
@@ -1,3 +1,4 @@
1
+ import settingRender from './settingRender';
1
2
  import CommodityDetailDiroNewComponent from '.';
2
3
  import { createMaterial } from '../../../../core/create';
3
4
  const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
@@ -5,8 +6,52 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
5
6
  icon: '',
6
7
  category: 'popup',
7
8
  type: 'CommodityDetailDiroNew',
9
+ related: {
10
+ settingRender
11
+ },
8
12
  defaulSetting: {
9
- props: {},
13
+ props: {
14
+ swiper: {
15
+ dotsAlign: 'left',
16
+ delay: 3
17
+ },
18
+ commodityStyles: {
19
+ price: {
20
+ color: '#000',
21
+ fontWeight: 'bold',
22
+ fontSize: 18
23
+ },
24
+ title: {
25
+ color: '#000',
26
+ fontSize: 13
27
+ },
28
+ collection: {
29
+ color: '#757575',
30
+ fontSize: 13
31
+ },
32
+ info: {
33
+ color: '#757575',
34
+ fontSize: 13
35
+ },
36
+ taxInfo: {
37
+ color: '#000',
38
+ fontWeight: 'bold',
39
+ fontSize: 13,
40
+ textAlign: 'right'
41
+ }
42
+ },
43
+ buttonStyle: {
44
+ backgroundColor: '#000',
45
+ fontSize: 12,
46
+ height: 52,
47
+ fontWeight: 'bold',
48
+ textAlign: 'center',
49
+ color: '#fff',
50
+ borderRadius: 25,
51
+ marginTop: 16,
52
+ marginBottom: 16
53
+ }
54
+ },
10
55
  style: {}
11
56
  },
12
57
  w: 100,
@@ -0,0 +1,134 @@
1
+ declare const _default: ({
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ options: {
7
+ label: string;
8
+ value: string;
9
+ }[];
10
+ name: string[];
11
+ addonAfter?: undefined;
12
+ } | {
13
+ type: string;
14
+ name: string[];
15
+ addonAfter: string;
16
+ label?: undefined;
17
+ options?: undefined;
18
+ })[];
19
+ } | {
20
+ title: string;
21
+ child: {
22
+ name: string[];
23
+ type: string;
24
+ child: ({
25
+ label: string;
26
+ type: string;
27
+ options: {
28
+ label: string;
29
+ value: string;
30
+ }[];
31
+ name: string[];
32
+ initialValue: string;
33
+ child?: undefined;
34
+ } | {
35
+ type: string;
36
+ label: string;
37
+ child: ({
38
+ type: string;
39
+ name: string[];
40
+ options?: undefined;
41
+ addonAfter?: undefined;
42
+ } | {
43
+ type: string;
44
+ options: {
45
+ label: string;
46
+ value: string;
47
+ }[];
48
+ name: string[];
49
+ addonAfter?: undefined;
50
+ } | {
51
+ type: string;
52
+ addonAfter: string;
53
+ name: string[];
54
+ options?: undefined;
55
+ })[];
56
+ options?: undefined;
57
+ name?: undefined;
58
+ initialValue?: undefined;
59
+ } | {
60
+ label: string;
61
+ type: string;
62
+ options?: undefined;
63
+ name?: undefined;
64
+ initialValue?: undefined;
65
+ child?: undefined;
66
+ } | {
67
+ label: string;
68
+ type: string;
69
+ name: string[];
70
+ options?: undefined;
71
+ initialValue?: undefined;
72
+ child?: undefined;
73
+ })[];
74
+ }[];
75
+ } | {
76
+ title: string;
77
+ child: ({
78
+ type: string;
79
+ label: string;
80
+ name: string[];
81
+ initialValue: string;
82
+ child?: undefined;
83
+ } | {
84
+ type: string;
85
+ label: string;
86
+ child: ({
87
+ type: string;
88
+ name: string[];
89
+ max: number;
90
+ addonAfter?: undefined;
91
+ } | {
92
+ type: string;
93
+ name: string[];
94
+ addonAfter: string;
95
+ max: number;
96
+ })[];
97
+ name?: undefined;
98
+ initialValue?: undefined;
99
+ } | {
100
+ type: string;
101
+ name: string[];
102
+ label?: undefined;
103
+ initialValue?: undefined;
104
+ child?: undefined;
105
+ } | {
106
+ type: string;
107
+ label: string;
108
+ child: ({
109
+ type: string;
110
+ name: string[];
111
+ initialValue: string;
112
+ options?: undefined;
113
+ addonAfter?: undefined;
114
+ } | {
115
+ type: string;
116
+ name: string[];
117
+ options: {
118
+ label: string;
119
+ value: string;
120
+ }[];
121
+ initialValue?: undefined;
122
+ addonAfter?: undefined;
123
+ } | {
124
+ type: string;
125
+ name: string[];
126
+ addonAfter: string;
127
+ initialValue?: undefined;
128
+ options?: undefined;
129
+ })[];
130
+ name?: undefined;
131
+ initialValue?: undefined;
132
+ })[];
133
+ })[];
134
+ export default _default;
@@ -0,0 +1,171 @@
1
+ export default [
2
+ {
3
+ title: '商品图片',
4
+ child: [
5
+ {
6
+ type: 'Radius',
7
+ label: '轮播指示器',
8
+ options: [
9
+ {
10
+ label: '居左',
11
+ value: 'left'
12
+ },
13
+ {
14
+ label: '居中',
15
+ value: 'center'
16
+ }
17
+ ],
18
+ name: ['props', 'swiper', 'dotsAlign']
19
+ },
20
+ {
21
+ type: 'Number',
22
+ name: ['props', 'swiper', 'delay'],
23
+ addonAfter: 's'
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ title: '商品文本',
29
+ child: [
30
+ {
31
+ name: ['props', 'commodityStyles'],
32
+ type: 'SelectLinkage',
33
+ child: [
34
+ {
35
+ label: '字段',
36
+ type: 'Select',
37
+ options: [
38
+ {
39
+ label: '商品名称',
40
+ value: 'title'
41
+ },
42
+ {
43
+ label: '系列名称',
44
+ value: 'collection'
45
+ },
46
+ {
47
+ label: '价格',
48
+ value: 'price'
49
+ },
50
+ {
51
+ label: '税费说明',
52
+ value: 'taxInfo'
53
+ },
54
+ {
55
+ label: '商品描述',
56
+ value: 'info'
57
+ }
58
+ ],
59
+ name: ['props', 'commodityStyles', 'field'],
60
+ initialValue: 'title'
61
+ },
62
+ {
63
+ type: 'Group',
64
+ label: '标题字体',
65
+ child: [
66
+ {
67
+ type: 'Color',
68
+ name: ['color']
69
+ },
70
+ {
71
+ type: 'Select',
72
+ options: [{ label: '黑体', value: '黑体' }],
73
+ name: ['fontFamily']
74
+ },
75
+ {
76
+ type: 'Number',
77
+ addonAfter: 'px',
78
+ name: ['fontSize']
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ label: '标题样式',
84
+ type: 'TextStyle'
85
+ },
86
+ {
87
+ label: '标题对齐',
88
+ type: 'TextAlign'
89
+ },
90
+ {
91
+ label: '默认行数',
92
+ type: 'Number',
93
+ name: ['lineClamp']
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ title: '购买按钮样式',
101
+ child: [
102
+ {
103
+ type: 'Color',
104
+ label: '背景色',
105
+ name: ['props', 'buttonStyle', 'backgroundColor'],
106
+ initialValue: '#000'
107
+ },
108
+ {
109
+ type: 'Group',
110
+ label: '尺寸',
111
+ child: [
112
+ {
113
+ type: 'Number',
114
+ name: ['props', 'buttonStyle', 'height'],
115
+ addonAfter: 'H'
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ type: 'Group',
121
+ label: '圆角',
122
+ child: [
123
+ {
124
+ type: 'Slider',
125
+ name: ['props', 'buttonStyle', 'borderRadius'],
126
+ max: 100
127
+ },
128
+ {
129
+ type: 'Number',
130
+ name: ['props', 'buttonStyle', 'borderRadius'],
131
+ addonAfter: 'px',
132
+ max: 100
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ type: 'TextMargin',
138
+ name: ['props', 'buttonStyle']
139
+ },
140
+ {
141
+ type: 'Group',
142
+ label: '字体',
143
+ child: [
144
+ {
145
+ type: 'Color',
146
+ name: ['props', 'buttonStyle', 'color'],
147
+ initialValue: '#fff'
148
+ },
149
+ {
150
+ type: 'Select',
151
+ name: ['props', 'buttonStyle', 'fontFamily'],
152
+ options: [{ label: '黑体', value: '黑体' }]
153
+ },
154
+ {
155
+ type: 'Number',
156
+ name: ['props', 'buttonStyle', 'fontSize'],
157
+ addonAfter: 'px'
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ type: 'TextStyle',
163
+ name: ['props', 'buttonStyle']
164
+ },
165
+ {
166
+ type: 'TextAlign',
167
+ name: ['props', 'buttonStyle']
168
+ }
169
+ ]
170
+ }
171
+ ];
@@ -1,5 +1,4 @@
1
1
  export * from './AppointForm/material';
2
2
  export * from './CommodityDetail/material';
3
3
  export * from './Prompt/material';
4
- export * from './CommodityDetailDiro/material';
5
4
  export * from './CommodityDetailDiroNew/material';
@@ -1,5 +1,4 @@
1
1
  export * from './AppointForm/material';
2
2
  export * from './CommodityDetail/material';
3
3
  export * from './Prompt/material';
4
- export * from './CommodityDetailDiro/material';
5
4
  export * from './CommodityDetailDiroNew/material';
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ICtaTempStylesType } from '../components/typing';
2
3
  import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
3
4
  export interface IAppointProps {
4
5
  content?: string;
@@ -6,6 +7,7 @@ export interface IAppointProps {
6
7
  bgImg?: Record<string, any> | string;
7
8
  recData?: RecItemType;
8
9
  bottom_image?: string;
10
+ ctaTempStyles?: ICtaTempStylesType;
9
11
  }
10
12
  declare const _default: React.NamedExoticComponent<IAppointProps>;
11
13
  export default _default;
@@ -5,26 +5,12 @@ import EventProvider from '../components/EventProvider';
5
5
  import { useSxpDataSource } from '../../../../core/hooks';
6
6
  const Appoint = (_a) => {
7
7
  var _b, _c, _d, _e;
8
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
8
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9
9
  const { sxpParameter } = useSxpDataSource();
10
10
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
11
- return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
12
- React.createElement("div", { className: css({
13
- width: '30px',
14
- height: '30px',
15
- marginRight: '8px',
16
- borderRadius: '3px',
17
- overflow: 'hidden',
18
- flexShrink: 0,
19
- backgroundColor: '#f2f2f2'
20
- }) },
11
+ return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
12
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
21
13
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
22
- React.createElement("div", { className: css({
23
- color: '#fff',
24
- width: '100%',
25
- overflow: 'hidden',
26
- fontSize: '12px',
27
- textOverflow: 'ellipsis'
28
- }) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
14
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
29
15
  };
30
16
  export default memo(Appoint);
@@ -1,3 +1,4 @@
1
+ import settingRender from '../components/settingRender';
1
2
  import interactionRender from './interactionRender';
2
3
  import AppointComponent from '.';
3
4
  import { createMaterial } from '../../../../core/create';
@@ -8,18 +9,33 @@ const Appoint = createMaterial(AppointComponent, {
8
9
  type: 'Appoint',
9
10
  related: {
10
11
  interactionRender,
12
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
11
13
  bindableProps: []
12
14
  },
13
15
  defaulSetting: {
14
16
  props: {
15
- content: '按钮'
17
+ ctaTempStyles: {
18
+ img: {
19
+ borderRadius: 3,
20
+ width: 30,
21
+ height: 30,
22
+ marginRight: 8
23
+ },
24
+ ctaTitle: {
25
+ fontSize: 12,
26
+ color: '#fff',
27
+ textAlign: 'left',
28
+ width: 130,
29
+ height: 20
30
+ }
31
+ }
16
32
  },
17
33
  style: {
18
- padding: '7px',
19
- display: 'flex',
20
- alignItems: 'center',
21
- background: 'rgba(0,0,0,.3)',
22
- borderRadius: '3px'
34
+ padding: 7,
35
+ width: 236,
36
+ height: 44,
37
+ borderRadius: 3,
38
+ backgroundColor: 'rgba(0,0,0,.3)'
23
39
  }
24
40
  },
25
41
  w: 100,
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ICtaTempStylesType } from '../components/typing';
2
3
  import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
3
4
  export interface ICommodityProps {
4
5
  content?: string;
@@ -6,6 +7,7 @@ export interface ICommodityProps {
6
7
  bgImg?: Record<string, any> | string;
7
8
  recData?: RecItemType;
8
9
  bottom_image?: string;
10
+ ctaTempStyles?: ICtaTempStylesType;
9
11
  }
10
12
  declare const _default: React.NamedExoticComponent<ICommodityProps>;
11
13
  export default _default;
@@ -6,20 +6,12 @@ import styles from './index.module.less';
6
6
  import { useSxpDataSource } from '../../../../core/hooks';
7
7
  const Commodity = (_a) => {
8
8
  var _b, _c, _d, _e, _f, _g, _h;
9
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
10
10
  const { sxpParameter } = useSxpDataSource();
11
11
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12
12
  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;
13
- return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
14
- React.createElement("div", { className: css({
15
- width: '60px',
16
- height: '60px',
17
- marginRight: '8px',
18
- borderRadius: '3px',
19
- overflow: 'hidden',
20
- flexShrink: 0,
21
- backgroundColor: '#f2f2f2'
22
- }) },
13
+ return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
14
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
23
15
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
24
16
  React.createElement("div", { className: css({
25
17
  color: '#fff',
@@ -29,16 +21,7 @@ const Commodity = (_a) => {
29
21
  width: '100%',
30
22
  overflow: 'hidden'
31
23
  }) },
32
- React.createElement("div", { className: styles['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
33
- React.createElement("div", { className: css({
34
- background: 'rgba(0,0,0,.5)',
35
- fontSize: '10px',
36
- padding: '2px 7px',
37
- width: 'auto',
38
- textAlign: 'center',
39
- textOverflow: 'ellipsis',
40
- overflow: 'hidden',
41
- whiteSpace: 'nowrap'
42
- }) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
24
+ React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
25
+ React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
43
26
  };
44
27
  export default memo(Commodity);
@@ -1,3 +1,4 @@
1
+ import settingRender from '../components/settingRender';
1
2
  import interactionRender from './interactionRender';
2
3
  import CommodityComponent from '.';
3
4
  import { createMaterial } from '../../../../core/create';
@@ -8,15 +9,39 @@ const Commodity = createMaterial(CommodityComponent, {
8
9
  type: 'Commodity',
9
10
  related: {
10
11
  interactionRender,
11
- bindableProps: []
12
+ bindableProps: [],
13
+ settingRender
12
14
  },
13
15
  defaulSetting: {
14
- props: {},
16
+ props: {
17
+ ctaTempStyles: {
18
+ img: {
19
+ borderRadius: 3,
20
+ width: 60,
21
+ height: 60,
22
+ marginRight: 8
23
+ },
24
+ title: {
25
+ fontSize: 12,
26
+ color: '#fff',
27
+ textAlign: 'left'
28
+ },
29
+ ctaTitle: {
30
+ fontSize: 10,
31
+ color: '#fff',
32
+ textAlign: 'center',
33
+ width: 130,
34
+ height: 20,
35
+ backgroundColor: 'rgba(0,0,0,.5)'
36
+ }
37
+ }
38
+ },
15
39
  style: {
16
- padding: '7px',
17
- display: 'flex',
18
- background: 'rgba(0,0,0,.3)',
19
- borderRadius: '3px'
40
+ padding: 7,
41
+ width: 236,
42
+ height: 74,
43
+ borderRadius: 3,
44
+ backgroundColor: 'rgba(0,0,0,.3)'
20
45
  }
21
46
  },
22
47
  w: 100,