@fonixtree/magic-design 2.0.169 → 2.0.171

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 (325) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +39 -3
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  7. package/es/assets/images/base64/index.js +8 -2
  8. package/es/assets/images/layout-icon/banner-slide-layout1.png +0 -0
  9. package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
  10. package/es/assets/images/layout-icon/bundleLayout1.png +0 -0
  11. package/es/assets/images/layout-icon/center.png +0 -0
  12. package/es/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
  13. package/es/assets/images/layout-icon/interestLayout1.png +0 -0
  14. package/es/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
  15. package/es/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
  16. package/es/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
  17. package/es/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
  18. package/es/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
  19. package/es/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
  20. package/es/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
  21. package/es/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
  22. package/es/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
  23. package/es/assets/images/layout-icon/layout-imagetext-p5.png +0 -0
  24. package/es/assets/images/layout-icon/layout-recommend-2.png +0 -0
  25. package/es/assets/images/layout-icon/layout-recommend-3.png +0 -0
  26. package/es/assets/images/layout-icon/layout-recommend-4.png +0 -0
  27. package/es/assets/images/layout-icon/layout-recommend-5.png +0 -0
  28. package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
  29. package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
  30. package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
  31. package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
  32. package/es/assets/images/layout-icon/layout-search.png +0 -0
  33. package/es/assets/images/layout-icon/left.png +0 -0
  34. package/es/assets/images/layout-icon/locationLayout.png +0 -0
  35. package/es/assets/images/layout-icon/merchantSalesLayout1.png +0 -0
  36. package/es/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
  37. package/es/assets/images/layout-icon/right.png +0 -0
  38. package/es/assets/images/layout-icon/storesLayout1.png +0 -0
  39. package/es/assets/images/layout-icon/storesLayout2.png +0 -0
  40. package/es/assets/images/layout-icon/textLayout1.png +0 -0
  41. package/es/assets/less/common.less +40 -3
  42. package/es/common/Field/index.js +5 -2
  43. package/es/common/Field/index.less +5 -0
  44. package/es/common/LayoutSelector/index.js +3 -21
  45. package/es/common/MyModal/index.less +12 -4
  46. package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/defaultJSON.js +1 -1
  47. package/es/composite-comp/ashita/components/WalletAshita/index.js +84 -0
  48. package/{lib/composite-comp/bol/config-panels/WalletConfig → es/composite-comp/ashita/config-panels/WalletAshitaConfig}/WalletConfigImageGroup/index.js +1 -1
  49. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +3 -0
  50. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -13
  51. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +3 -7
  52. package/es/composite-comp/bol/config-panels/TextCompConfig/index.js +3 -7
  53. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
  54. package/es/composite-comp/dito/config-panels/BargainConfig/index.js +3 -7
  55. package/es/composite-comp/dito/config-panels/GroupBuyConfig/index.js +3 -7
  56. package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +1 -5
  57. package/es/composite-comp/monpay/components/MonpayRecommend/index.js +1 -5
  58. package/es/composite-comp/monpay/config-panels/BundleConfig/index.js +3 -7
  59. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +3 -7
  60. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +3 -7
  61. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +3 -7
  62. package/es/composite-comp/public/components/Location/defaultJSON.js +104 -0
  63. package/es/composite-comp/public/components/Location/index.js +86 -0
  64. package/es/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
  65. package/es/composite-comp/public/components/Location/mobile/index.js +353 -0
  66. package/es/composite-comp/public/components/Location/mobile/index.less +90 -0
  67. package/es/composite-comp/public/components/Stores/defaultJSON.js +348 -0
  68. package/es/composite-comp/public/components/Stores/index.js +86 -0
  69. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +275 -0
  70. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +81 -0
  71. package/es/composite-comp/public/components/Stores/mobile/index.js +198 -0
  72. package/es/composite-comp/public/components/Stores/mobile/index.less +37 -0
  73. package/es/composite-comp/public/components/Wallet/defaultJSON.js +149 -0
  74. package/es/composite-comp/public/components/Wallet/mobile/index.js +350 -0
  75. package/es/composite-comp/public/components/Wallet/mobile/index.less +22 -0
  76. package/es/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +153 -0
  77. package/{lib/composite-comp/bol → es/composite-comp/public}/config-panels/LocationConfig/index.js +10 -52
  78. package/es/composite-comp/public/config-panels/LocationConfig/index.less +17 -0
  79. package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +176 -0
  80. package/es/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +103 -0
  81. package/es/composite-comp/public/config-panels/StoresConfig/index.js +134 -0
  82. package/es/constants/component-types.js +23 -13
  83. package/es/constants/index.js +9 -1
  84. package/es/constants/layout.js +125 -16
  85. package/es/locale/en/en.json +15 -1
  86. package/es/locale/es/es.json +15 -1
  87. package/es/locale/index.js +5 -1
  88. package/es/locale/mn/mn.json +15 -1
  89. package/es/meta-comp/components/Text/index.less +6 -0
  90. package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +207 -0
  91. package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +81 -0
  92. package/es/meta-comp/config-panels/ButtonConfig/index.js +7 -8
  93. package/es/utils/businessUtil.js +33 -7
  94. package/es/utils/commonUtil.js +21 -9
  95. package/lib/assets/fonts/.DS_Store +0 -0
  96. package/lib/assets/fonts/magic-box-iconfont.css +39 -3
  97. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  98. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  99. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  100. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  101. package/lib/assets/images/base64/index.js +8 -2
  102. package/lib/assets/images/layout-icon/banner-slide-layout1.png +0 -0
  103. package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
  104. package/lib/assets/images/layout-icon/bundleLayout1.png +0 -0
  105. package/lib/assets/images/layout-icon/center.png +0 -0
  106. package/lib/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
  107. package/lib/assets/images/layout-icon/interestLayout1.png +0 -0
  108. package/lib/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
  109. package/lib/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
  110. package/lib/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
  111. package/lib/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
  112. package/lib/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
  113. package/lib/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
  114. package/lib/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
  115. package/lib/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
  116. package/lib/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
  117. package/lib/assets/images/layout-icon/layout-imagetext-p5.png +0 -0
  118. package/lib/assets/images/layout-icon/layout-recommend-2.png +0 -0
  119. package/lib/assets/images/layout-icon/layout-recommend-3.png +0 -0
  120. package/lib/assets/images/layout-icon/layout-recommend-4.png +0 -0
  121. package/lib/assets/images/layout-icon/layout-recommend-5.png +0 -0
  122. package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
  123. package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
  124. package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
  125. package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
  126. package/lib/assets/images/layout-icon/layout-search.png +0 -0
  127. package/lib/assets/images/layout-icon/left.png +0 -0
  128. package/lib/assets/images/layout-icon/locationLayout.png +0 -0
  129. package/lib/assets/images/layout-icon/merchantSalesLayout1.png +0 -0
  130. package/lib/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
  131. package/lib/assets/images/layout-icon/right.png +0 -0
  132. package/lib/assets/images/layout-icon/storesLayout1.png +0 -0
  133. package/lib/assets/images/layout-icon/storesLayout2.png +0 -0
  134. package/lib/assets/images/layout-icon/textLayout1.png +0 -0
  135. package/lib/assets/less/common.less +40 -3
  136. package/lib/common/Field/index.js +5 -2
  137. package/lib/common/Field/index.less +5 -0
  138. package/lib/common/LayoutSelector/index.js +3 -21
  139. package/lib/common/MyModal/index.less +12 -4
  140. package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/defaultJSON.js +1 -1
  141. package/lib/composite-comp/ashita/components/WalletAshita/index.js +84 -0
  142. package/{es/composite-comp/bol/config-panels/WalletConfig → lib/composite-comp/ashita/config-panels/WalletAshitaConfig}/WalletConfigImageGroup/index.js +1 -1
  143. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
  144. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +3 -0
  145. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -13
  146. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +3 -7
  147. package/lib/composite-comp/bol/config-panels/TextCompConfig/index.js +3 -7
  148. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
  149. package/lib/composite-comp/dito/config-panels/BargainConfig/index.js +3 -7
  150. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/index.js +3 -7
  151. package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +1 -5
  152. package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +1 -5
  153. package/lib/composite-comp/monpay/config-panels/BundleConfig/index.js +3 -7
  154. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +3 -7
  155. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +3 -7
  156. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +3 -7
  157. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
  158. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
  159. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
  160. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  161. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/index.js +61 -0
  162. package/lib/composite-comp/nuri/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
  163. package/lib/composite-comp/public/components/Location/defaultJSON.js +104 -0
  164. package/lib/composite-comp/public/components/Location/index.js +86 -0
  165. package/lib/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
  166. package/lib/composite-comp/public/components/Location/mobile/index.js +353 -0
  167. package/lib/composite-comp/public/components/Location/mobile/index.less +90 -0
  168. package/lib/composite-comp/public/components/Stores/defaultJSON.js +348 -0
  169. package/lib/composite-comp/public/components/Stores/index.js +86 -0
  170. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +275 -0
  171. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +81 -0
  172. package/lib/composite-comp/public/components/Stores/mobile/index.js +198 -0
  173. package/lib/composite-comp/public/components/Stores/mobile/index.less +37 -0
  174. package/lib/composite-comp/public/components/Wallet/defaultJSON.js +149 -0
  175. package/lib/composite-comp/public/components/Wallet/mobile/index.js +350 -0
  176. package/lib/composite-comp/public/components/Wallet/mobile/index.less +22 -0
  177. package/lib/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +153 -0
  178. package/{es/composite-comp/bol → lib/composite-comp/public}/config-panels/LocationConfig/index.js +10 -52
  179. package/lib/composite-comp/public/config-panels/LocationConfig/index.less +17 -0
  180. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +176 -0
  181. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +0 -0
  182. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +103 -0
  183. package/lib/composite-comp/public/config-panels/StoresConfig/index.js +134 -0
  184. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +100 -0
  185. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +72 -0
  186. package/lib/composite-comp/public/config-panels/WalletConfig/WalletNuriConfigImageGroup/index.js +123 -0
  187. package/lib/composite-comp/public/config-panels/WalletConfig/WalletNuriConfigImageGroup/index.less +0 -0
  188. package/lib/composite-comp/public/config-panels/WalletConfig/index.js +61 -0
  189. package/lib/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +152 -0
  190. package/lib/constants/component-types.js +23 -13
  191. package/lib/constants/index.js +9 -1
  192. package/lib/constants/layout.js +125 -16
  193. package/lib/locale/en/en.json +15 -1
  194. package/lib/locale/es/es.json +15 -1
  195. package/lib/locale/index.js +5 -1
  196. package/lib/locale/mn/mn.json +15 -1
  197. package/lib/meta-comp/components/Text/index.less +6 -0
  198. package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +207 -0
  199. package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +81 -0
  200. package/lib/meta-comp/config-panels/ButtonConfig/index.js +7 -8
  201. package/lib/utils/businessUtil.js +33 -7
  202. package/lib/utils/commonUtil.js +21 -9
  203. package/package.json +1 -1
  204. package/es/assets/images/layout-icon/banner-slide-layout1.svg +0 -6
  205. package/es/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
  206. package/es/assets/images/layout-icon/imageTextLeft.svg +0 -6
  207. package/es/assets/images/layout-icon/imageTextRight.svg +0 -6
  208. package/es/assets/images/layout-icon/layout-imagetext-m3-1.svg +0 -18
  209. package/es/assets/images/layout-icon/layout-imagetext-m3-2.svg +0 -9
  210. package/es/common/LayoutSelector/imgs/center.png +0 -0
  211. package/es/common/LayoutSelector/imgs/left.png +0 -0
  212. package/es/common/LayoutSelector/imgs/right.png +0 -0
  213. package/es/composite-comp/bol/components/Location/defaultJSON.js +0 -60
  214. package/es/composite-comp/bol/components/Location/index.js +0 -102
  215. package/es/composite-comp/bol/components/Location/index.less +0 -15
  216. package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  217. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
  218. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
  219. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
  220. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
  221. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +0 -584
  222. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +0 -150
  223. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +0 -809
  224. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +0 -129
  225. package/es/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
  226. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
  227. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
  228. package/lib/assets/images/layout-icon/banner-slide-layout1.svg +0 -6
  229. package/lib/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
  230. package/lib/assets/images/layout-icon/imageTextLeft.svg +0 -6
  231. package/lib/assets/images/layout-icon/imageTextRight.svg +0 -6
  232. package/lib/assets/images/layout-icon/layout-imagetext-m3-1.svg +0 -18
  233. package/lib/assets/images/layout-icon/layout-imagetext-m3-2.svg +0 -9
  234. package/lib/common/LayoutSelector/imgs/center.png +0 -0
  235. package/lib/common/LayoutSelector/imgs/left.png +0 -0
  236. package/lib/common/LayoutSelector/imgs/right.png +0 -0
  237. package/lib/composite-comp/bol/components/Location/defaultJSON.js +0 -60
  238. package/lib/composite-comp/bol/components/Location/index.js +0 -102
  239. package/lib/composite-comp/bol/components/Location/index.less +0 -15
  240. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
  241. package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout2.png +0 -0
  242. package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  243. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  244. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  245. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
  246. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
  247. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
  248. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
  249. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +0 -584
  250. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +0 -150
  251. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +0 -809
  252. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +0 -129
  253. package/lib/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
  254. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
  255. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
  256. /package/es/{composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png → assets/images/common/product.png} +0 -0
  257. /package/es/{composite-comp/dito/config-panels/BargainConfig/imgs/layout1.png → assets/images/layout-icon/bargainLayout1.png} +0 -0
  258. /package/es/{composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png → assets/images/layout-icon/buttonLayout1.png} +0 -0
  259. /package/es/{composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png → assets/images/layout-icon/buttonLayout2.png} +0 -0
  260. /package/es/{composite-comp/dito/config-panels/GroupBuyConfig/imgs/layout1.png → assets/images/layout-icon/groupBuyLayout1.png} +0 -0
  261. /package/es/{composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png → assets/images/layout-icon/tagLayout1.png} +0 -0
  262. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.js +0 -0
  263. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.less +0 -0
  264. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.js +0 -0
  265. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.less +0 -0
  266. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigContent/index.js +0 -0
  267. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigContent/index.less +0 -0
  268. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigImageGroup/index.less +0 -0
  269. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.js +0 -0
  270. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.less +0 -0
  271. /package/es/composite-comp/{bol/config-panels/ButtonCompConfig → ashita/config-panels/WalletAshitaConfig}/imgs/defaultImg.png +0 -0
  272. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/index.js +0 -0
  273. /package/es/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.js +0 -0
  274. /package/es/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.less +0 -0
  275. /package/es/composite-comp/{monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png → dito/config-panels/GroupBuyConfig/imgs/groupBuyLayout1.png} +0 -0
  276. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/defaultJSON.js +0 -0
  277. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/index.js +0 -0
  278. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.js +0 -0
  279. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.less +0 -0
  280. /package/es/composite-comp/{bol/config-panels/TagCompConfig/imgs → nuri/config-panels/WalletNuriConfig/GroupList}/defaultImg.png +0 -0
  281. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/GroupList/index.js +0 -0
  282. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/GroupList/index.less +0 -0
  283. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +0 -0
  284. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  285. /package/es/composite-comp/{bol/config-panels/TextCompConfig → nuri/config-panels/WalletNuriConfig}/imgs/defaultImg.png +0 -0
  286. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/index.js +0 -0
  287. /package/es/composite-comp/{bol → nuri}/second-config-panels/WalletNuriSecondConfig/index.js +0 -0
  288. /package/es/composite-comp/{bol → public}/components/Wallet/index.js +0 -0
  289. /package/{lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigContent → es/composite-comp/public/config-panels/StoresConfig/ConfigContent}/index.less +0 -0
  290. /package/es/composite-comp/{bol/config-panels/WalletConfig/imgs → public/config-panels/WalletConfig/GroupList}/defaultImg.png +0 -0
  291. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/GroupList/index.js +0 -0
  292. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/GroupList/index.less +0 -0
  293. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/WalletNuriConfigImageGroup/index.js +0 -0
  294. /package/{lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup → es/composite-comp/public/config-panels/WalletConfig/WalletNuriConfigImageGroup}/index.less +0 -0
  295. /package/es/composite-comp/{bol/config-panels/WalletNuriConfig/GroupList → public/config-panels/WalletConfig/imgs}/defaultImg.png +0 -0
  296. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/index.js +0 -0
  297. /package/{lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig → es/composite-comp/public/second-config-panels/WalletSecondConfig}/index.js +0 -0
  298. /package/lib/{composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png → assets/images/common/product.png} +0 -0
  299. /package/lib/{composite-comp/dito/config-panels/BargainConfig/imgs/layout1.png → assets/images/layout-icon/bargainLayout1.png} +0 -0
  300. /package/{es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout2.png → lib/assets/images/layout-icon/buttonLayout1.png} +0 -0
  301. /package/lib/{composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png → assets/images/layout-icon/buttonLayout2.png} +0 -0
  302. /package/lib/{composite-comp/dito/config-panels/GroupBuyConfig/imgs/layout1.png → assets/images/layout-icon/groupBuyLayout1.png} +0 -0
  303. /package/lib/{composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png → assets/images/layout-icon/tagLayout1.png} +0 -0
  304. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.js +0 -0
  305. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.less +0 -0
  306. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.js +0 -0
  307. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.less +0 -0
  308. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigContent/index.js +0 -0
  309. /package/lib/composite-comp/{bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup → ashita/config-panels/WalletAshitaConfig/WalletConfigContent}/index.less +0 -0
  310. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.js +0 -0
  311. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.less +0 -0
  312. /package/{es/composite-comp/bol/config-panels/WalletNuriConfig → lib/composite-comp/ashita/config-panels/WalletAshitaConfig}/imgs/defaultImg.png +0 -0
  313. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/index.js +0 -0
  314. /package/lib/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.js +0 -0
  315. /package/lib/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.less +0 -0
  316. /package/lib/composite-comp/{monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png → dito/config-panels/GroupBuyConfig/imgs/groupBuyLayout1.png} +0 -0
  317. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/defaultJSON.js +0 -0
  318. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/index.js +0 -0
  319. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.js +0 -0
  320. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.less +0 -0
  321. /package/lib/composite-comp/{bol/config-panels/ButtonCompConfig/imgs → nuri/config-panels/WalletNuriConfig/GroupList}/defaultImg.png +0 -0
  322. /package/lib/composite-comp/{bol/config-panels/TagCompConfig → nuri/config-panels/WalletNuriConfig}/imgs/defaultImg.png +0 -0
  323. /package/lib/composite-comp/{bol → public}/components/Wallet/index.js +0 -0
  324. /package/lib/composite-comp/{bol/config-panels/TextCompConfig/imgs → public/config-panels/WalletConfig/GroupList}/defaultImg.png +0 -0
  325. /package/lib/composite-comp/{bol → public}/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
@@ -1,809 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _macy = _interopRequireDefault(require("macy"));
11
-
12
- require("./index.less");
13
-
14
- var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
- var _debounce = _interopRequireDefault(require("lodash/debounce"));
17
-
18
- var _lodash = _interopRequireDefault(require("lodash.throttle"));
19
-
20
- var _card = _interopRequireDefault(require("./imgs/card.png"));
21
-
22
- var _mobx = require("../../../../../mobx");
23
-
24
- var _MonpayProductItem = _interopRequireDefault(require("../../../../common/components/MonpayProductItem"));
25
-
26
- var _components = require("../../../../../meta-comp/components");
27
-
28
- var _storeUtil = require("../../../../../utils/storeUtil");
29
-
30
- var _commonUtil = require("../../../../../utils/commonUtil");
31
-
32
- var _coreUtil = require("../../../../../utils/coreUtil");
33
-
34
- var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
35
-
36
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
-
38
- var __extends = void 0 && (void 0).__extends || function () {
39
- var _extendStatics = function extendStatics(d, b) {
40
- _extendStatics = Object.setPrototypeOf || {
41
- __proto__: []
42
- } instanceof Array && function (d, b) {
43
- d.__proto__ = b;
44
- } || function (d, b) {
45
- for (var p in b) {
46
- if (b.hasOwnProperty(p)) d[p] = b[p];
47
- }
48
- };
49
-
50
- return _extendStatics(d, b);
51
- };
52
-
53
- return function (d, b) {
54
- _extendStatics(d, b);
55
-
56
- function __() {
57
- this.constructor = d;
58
- }
59
-
60
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
- };
62
- }();
63
-
64
- var __assign = void 0 && (void 0).__assign || function () {
65
- __assign = Object.assign || function (t) {
66
- for (var s, i = 1, n = arguments.length; i < n; i++) {
67
- s = arguments[i];
68
-
69
- for (var p in s) {
70
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
71
- }
72
- }
73
-
74
- return t;
75
- };
76
-
77
- return __assign.apply(this, arguments);
78
- };
79
-
80
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
81
- function adopt(value) {
82
- return value instanceof P ? value : new P(function (resolve) {
83
- resolve(value);
84
- });
85
- }
86
-
87
- return new (P || (P = Promise))(function (resolve, reject) {
88
- function fulfilled(value) {
89
- try {
90
- step(generator.next(value));
91
- } catch (e) {
92
- reject(e);
93
- }
94
- }
95
-
96
- function rejected(value) {
97
- try {
98
- step(generator["throw"](value));
99
- } catch (e) {
100
- reject(e);
101
- }
102
- }
103
-
104
- function step(result) {
105
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
106
- }
107
-
108
- step((generator = generator.apply(thisArg, _arguments || [])).next());
109
- });
110
- };
111
-
112
- var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
113
- var _ = {
114
- label: 0,
115
- sent: function sent() {
116
- if (t[0] & 1) throw t[1];
117
- return t[1];
118
- },
119
- trys: [],
120
- ops: []
121
- },
122
- f,
123
- y,
124
- t,
125
- g;
126
- return g = {
127
- next: verb(0),
128
- "throw": verb(1),
129
- "return": verb(2)
130
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
131
- return this;
132
- }), g;
133
-
134
- function verb(n) {
135
- return function (v) {
136
- return step([n, v]);
137
- };
138
- }
139
-
140
- function step(op) {
141
- if (f) throw new TypeError("Generator is already executing.");
142
-
143
- while (_) {
144
- try {
145
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
146
- if (y = 0, t) op = [op[0] & 2, t.value];
147
-
148
- switch (op[0]) {
149
- case 0:
150
- case 1:
151
- t = op;
152
- break;
153
-
154
- case 4:
155
- _.label++;
156
- return {
157
- value: op[1],
158
- done: false
159
- };
160
-
161
- case 5:
162
- _.label++;
163
- y = op[1];
164
- op = [0];
165
- continue;
166
-
167
- case 7:
168
- op = _.ops.pop();
169
-
170
- _.trys.pop();
171
-
172
- continue;
173
-
174
- default:
175
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
176
- _ = 0;
177
- continue;
178
- }
179
-
180
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
181
- _.label = op[1];
182
- break;
183
- }
184
-
185
- if (op[0] === 6 && _.label < t[1]) {
186
- _.label = t[1];
187
- t = op;
188
- break;
189
- }
190
-
191
- if (t && _.label < t[2]) {
192
- _.label = t[2];
193
-
194
- _.ops.push(op);
195
-
196
- break;
197
- }
198
-
199
- if (t[2]) _.ops.pop();
200
-
201
- _.trys.pop();
202
-
203
- continue;
204
- }
205
-
206
- op = body.call(thisArg, _);
207
- } catch (e) {
208
- op = [6, e];
209
- y = 0;
210
- } finally {
211
- f = t = 0;
212
- }
213
- }
214
-
215
- if (op[0] & 5) throw op[1];
216
- return {
217
- value: op[0] ? op[1] : void 0,
218
- done: true
219
- };
220
- }
221
- };
222
-
223
- var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
224
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
225
- s += arguments[i].length;
226
- }
227
-
228
- for (var r = Array(s), k = 0, i = 0; i < il; i++) {
229
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
230
- r[k] = a[j];
231
- }
232
- }
233
-
234
- return r;
235
- };
236
-
237
- var defaultData = [{
238
- imgUrlContent: {
239
- url: _card["default"]
240
- },
241
- offerName: 'Product Name',
242
- salesPrice: 18000000,
243
- specialPrice: 18000000,
244
- marketPrice: 19000000,
245
- salePercent: 500
246
- }, {
247
- imgUrlContent: {
248
- url: _card["default"]
249
- },
250
- offerName: 'Product Name',
251
- salesPrice: 18000000,
252
- specialPrice: 18000000,
253
- marketPrice: 19000000,
254
- salePercent: 500
255
- }, {
256
- imgUrlContent: {
257
- url: _card["default"]
258
- },
259
- offerName: 'Product Name',
260
- salesPrice: 18000000,
261
- specialPrice: 18000000,
262
- marketPrice: 19000000,
263
- salePercent: 500
264
- }, {
265
- imgUrlContent: {
266
- url: _card["default"]
267
- },
268
- offerName: 'Product Name',
269
- salesPrice: 18000000,
270
- specialPrice: 18000000,
271
- marketPrice: 19000000,
272
- salePercent: 500
273
- }];
274
-
275
- var RecommendMobile =
276
- /** @class */
277
- function (_super) {
278
- __extends(RecommendMobile, _super);
279
-
280
- function RecommendMobile() {
281
- var _this = _super !== null && _super.apply(this, arguments) || this;
282
-
283
- _this.preData = {};
284
- _this.preLayout = '';
285
- _this.preContent = '';
286
- _this.preSpacing = '';
287
- _this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
288
- return (0, _storeUtil.getMagicStore)("recommend_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
289
- }, {});
290
- _this.scrollRef = /*#__PURE__*/_react["default"].createRef();
291
- _this.state = __assign({
292
- contentWidth: 0,
293
- tabIndex: 0,
294
- tabLeft: 0,
295
- tabWidth: 0,
296
- groupSource: [],
297
- hideTabs: false,
298
- scrollToLeftDisabled: true,
299
- scrollToRightDisabled: true
300
- }, _this._cache);
301
-
302
- _this.listenWidth = function () {
303
- setTimeout(function () {
304
- var renderContainer = document.querySelector(".macyContainer_" + _this.props.panelProps.id) || document.querySelector(".scrollContainer_" + _this.props.panelProps.id);
305
- if (renderContainer) _this.setState({
306
- contentWidth: renderContainer.offsetWidth
307
- });
308
- });
309
- };
310
-
311
- _this.setScrollDisabled = function (scrollDom) {
312
- var scrollToLeftDisabled = scrollDom.scrollLeft === 0;
313
- var scrollToRightDisabled = scrollDom.clientWidth + scrollDom.scrollLeft >= scrollDom.scrollWidth;
314
-
315
- _this.setState({
316
- scrollToLeftDisabled: scrollToLeftDisabled,
317
- scrollToRightDisabled: scrollToRightDisabled
318
- });
319
- };
320
-
321
- _this.initTab = function (index, hideTabs) {
322
- var selectedTabDom = document.querySelector(".tab-select-wrap .tabTitle:nth-child(" + (index + 1) + ")");
323
- var tabLeft = 0;
324
- var tabWidth = 0;
325
-
326
- if (selectedTabDom && !hideTabs) {
327
- tabLeft = selectedTabDom.offsetLeft;
328
- tabWidth = selectedTabDom.offsetWidth;
329
- }
330
-
331
- _this.setState({
332
- tabLeft: tabLeft,
333
- tabWidth: tabWidth
334
- });
335
- };
336
-
337
- _this.getTabBarActiveColor = function (_panelProps) {
338
- var tabIndex = _this.state.tabIndex;
339
- return (0, _commonUtil.ensure)(function () {
340
- return _panelProps.groupSource[tabIndex].hover.groupName.content.color;
341
- }, '#1890ff');
342
- };
343
-
344
- _this.getProductList = function (index) {
345
- return __awaiter(_this, void 0, void 0, function () {
346
- var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
347
-
348
- var _g, _h, _j;
349
-
350
- var _this = this;
351
-
352
- return __generator(this, function (_k) {
353
- switch (_k.label) {
354
- case 0:
355
- panelProps = this.props.panelProps;
356
- groupSource = this.state.groupSource;
357
- recommendId = panelProps.id;
358
- pageId = window.magicDesign.pageId || '';
359
-
360
- if (!(0, _coreUtil.isDesignMode)()) {
361
- cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
362
-
363
- if (cache) {
364
- if ("products" + index in cache) {
365
- this.setState((_g = {}, _g["products" + index] = cache["products" + index], _g), function () {
366
- _this.resetLayout();
367
- });
368
- /** 如果数据未过期 */
369
-
370
- if (cache.endTime > Date.now()) return [2
371
- /*return*/
372
- ];
373
- }
374
- }
375
- }
376
-
377
- _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.intelligentType, intelligentType = _d === void 0 ? '' : _d, _e = _a.intelligentValue, intelligentValue = _e === void 0 ? [] : _e, _f = _a.maxProdNum, maxProdNum = _f === void 0 ? 10 : _f;
378
- newData = [];
379
- _k.label = 1;
380
-
381
- case 1:
382
- _k.trys.push([1, 9,, 10]);
383
-
384
- if (!(groupSource.length > 0)) return [3
385
- /*break*/
386
- , 7];
387
- if (!(sourceType === 'select')) return [3
388
- /*break*/
389
- , 3];
390
-
391
- if (!prodIds) {
392
- return [2
393
- /*return*/
394
- ];
395
- }
396
-
397
- return [4
398
- /*yield*/
399
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', {
400
- products: prodIds,
401
- state: 'A'
402
- }, 'GET')];
403
-
404
- case 2:
405
- res = _k.sent();
406
- newData = __spreadArrays(res.list);
407
- return [3
408
- /*break*/
409
- , 6];
410
-
411
- case 3:
412
- if (!(sourceType === 'recommend')) return [3
413
- /*break*/
414
- , 5];
415
- return [4
416
- /*yield*/
417
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', {
418
- pageIndex: 1,
419
- pageSize: maxProdNum,
420
- sortType: '1',
421
- intelligentType: intelligentType,
422
- intelligentValue: intelligentValue.join(','),
423
- aggregation: false,
424
- storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
425
- }, 'POST')];
426
-
427
- case 4:
428
- res = _k.sent();
429
- newData = __spreadArrays(res.pageInfo.list);
430
- return [3
431
- /*break*/
432
- , 6];
433
-
434
- case 5:
435
- newData = [];
436
- _k.label = 6;
437
-
438
- case 6:
439
- return [3
440
- /*break*/
441
- , 8];
442
-
443
- case 7:
444
- newData = [];
445
- _k.label = 8;
446
-
447
- case 8:
448
- return [3
449
- /*break*/
450
- , 10];
451
-
452
- case 9:
453
- e_1 = _k.sent();
454
- newData = [];
455
- return [3
456
- /*break*/
457
- , 10];
458
-
459
- case 10:
460
- if (!(0, _coreUtil.isDesignMode)()) {
461
- _cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
462
- (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
463
- }
464
-
465
- this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
466
- _this.resetLayout();
467
- });
468
- return [2
469
- /*return*/
470
- ];
471
- }
472
- });
473
- });
474
- };
475
-
476
- _this.resetLayout = function () {
477
- var customize = _this.props.panelProps.customize;
478
- if (customize.layout.pcLayout !== 'layout1') return;
479
- setTimeout(function () {
480
- if (document.querySelector(".macyContainer_" + _this.props.panelProps.id)) {
481
- _this.getMacy(".macyContainer_" + _this.props.panelProps.id, customize.pcRowNum);
482
- }
483
- }, 10);
484
- };
485
-
486
- _this.getMacy = function (container, columns) {
487
- var masonryNew = new _macy["default"]({
488
- container: container,
489
- trueOrder: false,
490
- waitForImages: false,
491
- useOwnImageLoader: false,
492
- margin: {
493
- x: 24,
494
- y: 24
495
- },
496
- columns: columns
497
- });
498
- masonryNew.runOnImageLoad(function () {
499
- masonryNew.recalculate(true);
500
- }, true);
501
- };
502
-
503
- _this.onTabClick = function (e, index) {
504
- var tabIndex = _this.state.tabIndex;
505
- if (tabIndex === index) return; // e.currentTarget.scrollIntoView(false);
506
-
507
- _this.setState({
508
- tabIndex: index
509
- }, function () {
510
- _this.resetLayout();
511
-
512
- _this.initTab(index);
513
- });
514
-
515
- _this.getProductList(index);
516
-
517
- setTimeout(function () {
518
- var scrollDom = _this.scrollRef.current;
519
-
520
- if (scrollDom) {
521
- _this.setScrollDisabled(scrollDom);
522
-
523
- scrollDom.onscroll = (0, _lodash["default"])(function () {
524
- _this.setScrollDisabled(scrollDom);
525
- }, 500);
526
- }
527
- }, 0);
528
- };
529
-
530
- _this.scrollToRight = function () {
531
- var scrollDom = _this.scrollRef.current;
532
-
533
- if (scrollDom.clientWidth + scrollDom.scrollLeft < scrollDom.scrollWidth) {
534
- scrollDom.scrollTo(scrollDom.scrollLeft + scrollDom.clientWidth, 0);
535
- }
536
- };
537
-
538
- _this.scrollToLeft = function () {
539
- var scrollDom = _this.scrollRef.current;
540
-
541
- if (scrollDom.scrollLeft > 0) {
542
- scrollDom.scrollTo(scrollDom.scrollLeft - scrollDom.clientWidth, 0);
543
- }
544
- };
545
-
546
- return _this;
547
- }
548
-
549
- RecommendMobile.prototype.componentDidMount = function () {
550
- var _this = this;
551
-
552
- var panelProps = this.props.panelProps;
553
- var source = [];
554
- panelProps.groupSource.map(function (m) {
555
- var show = m.image.open || m.groupName.open;
556
- if (show) source.push(m);
557
- });
558
- this.setState({
559
- groupSource: source
560
- }, function () {
561
- _this.initTab(0);
562
-
563
- _this.getProductList(0);
564
- });
565
- setTimeout(function () {
566
- var scrollDom = _this.scrollRef.current;
567
-
568
- if (scrollDom) {
569
- _this.setScrollDisabled(scrollDom);
570
-
571
- scrollDom.onscroll = (0, _lodash["default"])(function () {
572
- _this.setScrollDisabled(scrollDom);
573
- }, 500);
574
- }
575
- }, 0);
576
- this.listenWidth();
577
- window.addEventListener('resize', (0, _debounce["default"])(this.listenWidth));
578
- };
579
-
580
- RecommendMobile.prototype.componentWillUnmount = function () {
581
- window.removeEventListener('resize', this.listenWidth);
582
- };
583
-
584
- RecommendMobile.prototype.componentWillReceiveProps = function (nextProps) {
585
- var _this = this;
586
-
587
- var tabIndex = this.state.tabIndex;
588
- var panelProps = nextProps.panelProps;
589
- var source = [];
590
- var hideTabs = false;
591
- panelProps.groupSource.map(function (m) {
592
- var show = m.image.open || m.groupName.open;
593
- if (show) source.push(m);
594
- });
595
-
596
- if (source.length === 0) {
597
- if (panelProps.groupSource.length > 0) source.push(panelProps.groupSource[0]);
598
- hideTabs = true;
599
- }
600
-
601
- this.setState({
602
- groupSource: source
603
- }, function () {
604
- var groupSource = _this.state.groupSource;
605
-
606
- if (JSON.stringify(groupSource) === _this.preData) {
607
- return;
608
- }
609
-
610
- _this.preData = JSON.stringify(groupSource);
611
- var newTabIndex = tabIndex;
612
- if (tabIndex >= source.length) newTabIndex = 0;
613
-
614
- _this.initTab(newTabIndex, hideTabs);
615
-
616
- _this.getProductList(newTabIndex);
617
-
618
- _this.setState({
619
- tabIndex: newTabIndex,
620
- hideTabs: hideTabs
621
- });
622
- });
623
- var curLayout = JSON.stringify(panelProps.customize);
624
-
625
- if (curLayout !== this.preLayout) {
626
- this.resetLayout();
627
- setTimeout(function () {
628
- var scrollDom = _this.scrollRef.current;
629
-
630
- if (scrollDom) {
631
- _this.setScrollDisabled(scrollDom);
632
-
633
- scrollDom.onscroll = (0, _lodash["default"])(function () {
634
- _this.setScrollDisabled(scrollDom);
635
- }, 500);
636
- }
637
- }, 0);
638
- }
639
-
640
- var curContent = JSON.stringify(panelProps.content);
641
- var curSpacing = JSON.stringify(panelProps.spacing);
642
-
643
- if (curLayout !== this.preLayout || curSpacing !== this.preSpacing) {
644
- this.listenWidth();
645
- }
646
-
647
- if (curContent !== this.preContent || curSpacing !== this.preSpacing) {
648
- this.resetLayout();
649
- }
650
-
651
- this.preLayout = curLayout;
652
- this.preContent = curContent;
653
- this.preSpacing = curSpacing;
654
- };
655
-
656
- RecommendMobile.prototype.render = function () {
657
- var _this = this;
658
-
659
- var panelProps = this.props.panelProps;
660
- var _a = this.state,
661
- tabIndex = _a.tabIndex,
662
- tabLeft = _a.tabLeft,
663
- tabWidth = _a.tabWidth,
664
- groupSource = _a.groupSource,
665
- hideTabs = _a.hideTabs,
666
- scrollToLeftDisabled = _a.scrollToLeftDisabled,
667
- scrollToRightDisabled = _a.scrollToRightDisabled,
668
- contentWidth = _a.contentWidth;
669
- var products = this.state["products" + tabIndex] || [];
670
-
671
- var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
672
-
673
- var isDivide = false;
674
- var layout = panelProps.customize.layout.pcLayout;
675
-
676
- var _seeAll = (0, _commonUtil.ensure)(function () {
677
- return groupSource[tabIndex].seeAll;
678
- }, '');
679
-
680
- var imgSize = 140;
681
- var otherWidth = layout === 'layout3' ? 100 : 0;
682
- var colNumber = layout === 'layout1' ? panelProps.customize.pcRowNum : panelProps.customize.pcRowNum + 0.5;
683
- var spaceNumber = layout === 'layout1' ? panelProps.customize.pcRowNum - 1 : panelProps.customize.pcRowNum;
684
- if (contentWidth) imgSize = (contentWidth - 24 * spaceNumber - otherWidth) / colNumber;
685
- return /*#__PURE__*/_react["default"].createElement("div", {
686
- className: "m-recommend-pc"
687
- }, panelProps.title.headerImage.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
688
- className: "headerImg",
689
- data: panelProps.title.headerImage
690
- }), !hideTabs && /*#__PURE__*/_react["default"].createElement("div", {
691
- className: "tab-select-wrap"
692
- }, groupSource.map(function (tab, index) {
693
- var _image = index == tabIndex && tab.hover.open && tab.hover.image.open ? tab.hover.image : tab.image;
694
-
695
- var _groupName = index == tabIndex && tab.hover.open && tab.hover.groupName.open ? tab.hover.groupName : tab.groupName;
696
-
697
- return /*#__PURE__*/_react["default"].createElement("div", {
698
- key: tab.id,
699
- className: "tabTitle",
700
- onClick: function onClick(e) {
701
- _this.onTabClick(e, index);
702
-
703
- _mobx.store.setState({
704
- clickedGroup: tab.id,
705
- clickedFloor: _mobx.store.getFloorIdByGroupId(tab.id)
706
- });
707
- },
708
- style: {
709
- flex: ~~isDivide
710
- }
711
- }, tab.image.open && _image && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
712
- data: _image
713
- }), tab.groupName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
714
- data: _groupName,
715
- onTextInput: function onTextInput(text) {
716
- tab.hover.groupName.text = text;
717
- tab.groupName.text = text;
718
- }
719
- }));
720
- }), /*#__PURE__*/_react["default"].createElement("div", {
721
- className: "active-line",
722
- style: {
723
- width: tabWidth,
724
- transform: "translateX(" + tabLeft + "px)",
725
- background: this.getTabBarActiveColor(panelProps)
726
- }
727
- })), /*#__PURE__*/_react["default"].createElement("div", {
728
- className: "tab-content"
729
- }, layout !== 'layout1' && /*#__PURE__*/_react["default"].createElement("div", {
730
- className: "arrow-icon left",
731
- onClick: function onClick() {
732
- return _this.scrollToLeft();
733
- }
734
- }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
735
- color: scrollToLeftDisabled ? '#BDC1C8' : '#232F46',
736
- size: (0, _commonUtil.convertToRem)(20),
737
- type: "icon-outlined-left"
738
- })), layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
739
- className: "tab-list"
740
- }, /*#__PURE__*/_react["default"].createElement("div", {
741
- key: "macyContainer",
742
- ref: this.scrollRef,
743
- className: "macyContainer macyContainer_" + panelProps.id
744
- }, _products.map(function (item) {
745
- return /*#__PURE__*/_react["default"].createElement(_MonpayProductItem["default"], {
746
- key: item.productId,
747
- data: item,
748
- fixHeight: true,
749
- imgHeight: imgSize,
750
- imgWidth: "100%" // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
751
- ,
752
- onItemClick: function onItemClick() {
753
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
754
- },
755
- panelProps: panelProps.content,
756
- showProgress: false
757
- });
758
- })), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
759
- className: (0, _classnames["default"])('btnSeeAll', {
760
- line: layout === 'layout1'
761
- }),
762
- data: _seeAll
763
- })) : /*#__PURE__*/_react["default"].createElement("div", {
764
- key: "scrollContainer",
765
- ref: this.scrollRef,
766
- className: (0, _classnames["default"])("scrollContainer scrollContainer_" + panelProps.id, {
767
- pl_100: layout === 'layout3'
768
- })
769
- }, /*#__PURE__*/_react["default"].createElement("div", {
770
- className: "scrollProductList"
771
- }, _products.map(function (item) {
772
- return /*#__PURE__*/_react["default"].createElement("div", {
773
- className: "productCard"
774
- }, /*#__PURE__*/_react["default"].createElement(_MonpayProductItem["default"], {
775
- key: "scroll_" + item.productId,
776
- data: item,
777
- fixHeight: true,
778
- imgHeight: imgSize,
779
- imgWidth: imgSize // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
780
- ,
781
- onItemClick: function onItemClick() {
782
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
783
- },
784
- panelProps: panelProps.content,
785
- showProgress: false
786
- }));
787
- })), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
788
- className: "btnSeeAll",
789
- data: _seeAll
790
- })), layout !== 'layout1' && /*#__PURE__*/_react["default"].createElement("div", {
791
- className: "arrow-icon right",
792
- onClick: function onClick() {
793
- return _this.scrollToRight();
794
- }
795
- }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
796
- color: scrollToRightDisabled ? '#BDC1C8' : '#232F46',
797
- size: (0, _commonUtil.convertToRem)(20),
798
- type: "icon-outlined-right"
799
- }))));
800
- };
801
-
802
- RecommendMobile.defaultProps = {
803
- panelProps: {}
804
- };
805
- return RecommendMobile;
806
- }(_react["default"].Component);
807
-
808
- var _default = RecommendMobile;
809
- exports["default"] = _default;