@fonixtree/magic-design 2.0.189 → 3.0.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 (293) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +3 -3
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +3 -3
  3. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  4. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  6. package/es/assets/images/base64/index.js +2 -8
  7. package/es/assets/images/layout-icon/banner-slide-layout1.png +0 -0
  8. package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
  9. package/es/assets/images/layout-icon/bundleLayout1.png +0 -0
  10. package/es/assets/images/layout-icon/center.png +0 -0
  11. package/es/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
  12. package/es/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
  13. package/es/assets/images/layout-icon/imageTextLeft.svg +6 -0
  14. package/es/assets/images/layout-icon/imageTextRight.svg +6 -0
  15. package/es/assets/images/layout-icon/interestLayout1.png +0 -0
  16. package/es/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
  17. package/es/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
  18. package/es/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
  19. package/es/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
  20. package/es/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
  21. package/es/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
  22. package/es/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
  23. package/es/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
  24. package/es/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
  25. package/es/assets/images/layout-icon/layout-recommend-2.png +0 -0
  26. package/es/assets/images/layout-icon/layout-recommend-3.png +0 -0
  27. package/es/assets/images/layout-icon/layout-recommend-4.png +0 -0
  28. package/es/assets/images/layout-icon/layout-recommend-5.png +0 -0
  29. package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
  30. package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
  31. package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
  32. package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
  33. package/es/assets/images/layout-icon/layout-search.png +0 -0
  34. package/es/assets/images/layout-icon/left.png +0 -0
  35. package/es/assets/images/layout-icon/locationLayout.png +0 -0
  36. package/es/assets/images/layout-icon/merchantSalesLayout1.png +0 -0
  37. package/es/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
  38. package/es/assets/images/layout-icon/right.png +0 -0
  39. package/es/assets/images/layout-icon/textLayout1.png +0 -0
  40. package/es/assets/less/common.less +3 -40
  41. package/es/common/Field/index.js +2 -5
  42. package/es/common/Field/index.less +0 -5
  43. package/es/common/LinkModal/index.js +0 -7
  44. package/es/common/MyModal/index.less +4 -12
  45. package/es/composite-comp/bol/components/Location/defaultJSON.js +60 -0
  46. package/{lib/composite-comp/public → es/composite-comp/bol}/components/Location/index.js +20 -4
  47. package/es/composite-comp/bol/components/Location/index.less +15 -0
  48. package/{lib/composite-comp/ashita/components/WalletAshita → es/composite-comp/bol/components/Wallet}/defaultJSON.js +1 -1
  49. package/{lib/composite-comp/public → es/composite-comp/bol}/config-panels/LocationConfig/index.js +52 -10
  50. package/{lib/composite-comp/ashita/config-panels/WalletAshitaConfig → es/composite-comp/bol/config-panels/WalletConfig}/WalletConfigImageGroup/index.js +1 -1
  51. package/es/composite-comp/common/components/MonpayProductItem/index.js +3 -3
  52. package/es/composite-comp/common/components/MonpayProductItem/index.less +12 -8
  53. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
  54. package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +5 -1
  55. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +30 -5
  56. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
  57. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
  58. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
  59. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
  60. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +584 -0
  61. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
  62. package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +8 -8
  63. package/es/composite-comp/monpay/components/MonpayRecommend/index.js +5 -1
  64. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +14 -15
  65. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +0 -11
  66. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +809 -0
  67. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
  68. package/es/constants/component-types.js +13 -23
  69. package/es/constants/index.js +2 -12
  70. package/es/constants/layout.js +16 -29
  71. package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +1 -1
  72. package/es/core/Designer/QuickMenuBar/index.js +1 -1
  73. package/es/decorator/compositeDecorator.js +0 -29
  74. package/es/locale/en/en.json +1 -16
  75. package/es/locale/es/es.json +1 -16
  76. package/es/locale/index.js +1 -5
  77. package/es/locale/mn/mn.json +2 -17
  78. package/es/meta-comp/components/Text/index.less +0 -6
  79. package/es/meta-comp/config-panels/ButtonConfig/index.js +8 -7
  80. package/es/utils/androidUtil.js +1 -2
  81. package/es/utils/businessUtil.js +2 -27
  82. package/es/utils/commonUtil.js +10 -26
  83. package/es/utils/coreUtil.js +1 -3
  84. package/es/utils/dateUtil.js +14 -0
  85. package/lib/assets/fonts/magic-box-iconfont.css +3 -3
  86. package/lib/assets/fonts/magic-box-iconfont.css.bak +3 -3
  87. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  88. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  89. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  90. package/lib/assets/images/base64/index.js +2 -8
  91. package/lib/assets/images/layout-icon/banner-slide-layout1.png +0 -0
  92. package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
  93. package/lib/assets/images/layout-icon/bundleLayout1.png +0 -0
  94. package/lib/assets/images/layout-icon/center.png +0 -0
  95. package/lib/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
  96. package/lib/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
  97. package/lib/assets/images/layout-icon/imageTextLeft.svg +6 -0
  98. package/lib/assets/images/layout-icon/imageTextRight.svg +6 -0
  99. package/lib/assets/images/layout-icon/interestLayout1.png +0 -0
  100. package/lib/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
  101. package/lib/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
  102. package/lib/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
  103. package/lib/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
  104. package/lib/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
  105. package/lib/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
  106. package/lib/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
  107. package/lib/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
  108. package/lib/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
  109. package/lib/assets/images/layout-icon/layout-recommend-2.png +0 -0
  110. package/lib/assets/images/layout-icon/layout-recommend-3.png +0 -0
  111. package/lib/assets/images/layout-icon/layout-recommend-4.png +0 -0
  112. package/lib/assets/images/layout-icon/layout-recommend-5.png +0 -0
  113. package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
  114. package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
  115. package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
  116. package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
  117. package/lib/assets/images/layout-icon/layout-search.png +0 -0
  118. package/lib/assets/images/layout-icon/left.png +0 -0
  119. package/lib/assets/images/layout-icon/locationLayout.png +0 -0
  120. package/lib/assets/images/layout-icon/merchantSalesLayout1.png +0 -0
  121. package/lib/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
  122. package/lib/assets/images/layout-icon/right.png +0 -0
  123. package/lib/assets/images/layout-icon/textLayout1.png +0 -0
  124. package/lib/assets/less/common.less +3 -40
  125. package/lib/common/Field/index.js +2 -5
  126. package/lib/common/Field/index.less +0 -5
  127. package/lib/common/LinkModal/index.js +0 -7
  128. package/lib/common/MyModal/index.less +4 -12
  129. package/lib/composite-comp/bol/components/Location/defaultJSON.js +60 -0
  130. package/{es/composite-comp/public → lib/composite-comp/bol}/components/Location/index.js +20 -4
  131. package/lib/composite-comp/bol/components/Location/index.less +15 -0
  132. package/{es/composite-comp/ashita/components/WalletAshita → lib/composite-comp/bol/components/Wallet}/defaultJSON.js +1 -1
  133. package/{es/composite-comp/public → lib/composite-comp/bol}/config-panels/LocationConfig/index.js +52 -10
  134. package/{es/composite-comp/ashita/config-panels/WalletAshitaConfig → lib/composite-comp/bol/config-panels/WalletConfig}/WalletConfigImageGroup/index.js +1 -1
  135. package/lib/composite-comp/common/components/MonpayProductItem/index.js +3 -3
  136. package/lib/composite-comp/common/components/MonpayProductItem/index.less +12 -8
  137. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
  138. package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +5 -1
  139. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +30 -5
  140. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
  141. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
  142. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
  143. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
  144. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +584 -0
  145. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
  146. package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +8 -8
  147. package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +5 -1
  148. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +14 -15
  149. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +0 -11
  150. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +809 -0
  151. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
  152. package/lib/constants/component-types.js +13 -23
  153. package/lib/constants/index.js +2 -12
  154. package/lib/constants/layout.js +16 -29
  155. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +1 -1
  156. package/lib/core/Designer/QuickMenuBar/index.js +1 -1
  157. package/lib/decorator/compositeDecorator.js +0 -29
  158. package/lib/locale/en/en.json +1 -16
  159. package/lib/locale/es/es.json +1 -16
  160. package/lib/locale/index.js +1 -5
  161. package/lib/locale/mn/mn.json +2 -17
  162. package/lib/meta-comp/components/Text/index.less +0 -6
  163. package/lib/meta-comp/config-panels/ButtonConfig/index.js +8 -7
  164. package/lib/utils/androidUtil.js +1 -2
  165. package/lib/utils/businessUtil.js +2 -27
  166. package/lib/utils/commonUtil.js +10 -26
  167. package/lib/utils/coreUtil.js +1 -3
  168. package/lib/utils/dateUtil.js +14 -0
  169. package/package.json +2 -2
  170. package/es/assets/images/layout-icon/layout-imagetext-p5.png +0 -0
  171. package/es/assets/images/layout-icon/storesLayout1.png +0 -0
  172. package/es/assets/images/layout-icon/storesLayout2.png +0 -0
  173. package/es/common/LinkModal/BizType/index.js +0 -274
  174. package/es/composite-comp/ashita/components/WalletAshita/index.js +0 -84
  175. package/es/composite-comp/public/components/Location/defaultJSON.js +0 -104
  176. package/es/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
  177. package/es/composite-comp/public/components/Location/mobile/index.js +0 -133
  178. package/es/composite-comp/public/components/Location/mobile/index.less +0 -21
  179. package/es/composite-comp/public/components/Stores/defaultJSON.js +0 -348
  180. package/es/composite-comp/public/components/Stores/index.js +0 -86
  181. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +0 -250
  182. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +0 -81
  183. package/es/composite-comp/public/components/Stores/mobile/index.js +0 -335
  184. package/es/composite-comp/public/components/Stores/mobile/index.less +0 -33
  185. package/es/composite-comp/public/components/Wallet/defaultJSON.js +0 -149
  186. package/es/composite-comp/public/components/Wallet/mobile/index.js +0 -350
  187. package/es/composite-comp/public/components/Wallet/mobile/index.less +0 -22
  188. package/es/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +0 -153
  189. package/es/composite-comp/public/config-panels/LocationConfig/index.less +0 -17
  190. package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +0 -176
  191. package/es/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +0 -103
  192. package/es/composite-comp/public/config-panels/StoresConfig/index.js +0 -134
  193. package/es/composite-comp/public/config-panels/WalletConfig/index.js +0 -61
  194. package/es/locale/ar/ar.json +0 -362
  195. package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +0 -207
  196. package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +0 -81
  197. package/lib/assets/images/layout-icon/layout-imagetext-p5.png +0 -0
  198. package/lib/assets/images/layout-icon/storesLayout1.png +0 -0
  199. package/lib/assets/images/layout-icon/storesLayout2.png +0 -0
  200. package/lib/common/LinkModal/BizType/index.js +0 -274
  201. package/lib/composite-comp/ashita/components/WalletAshita/index.js +0 -84
  202. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
  203. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  204. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.js +0 -100
  205. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.less +0 -72
  206. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +0 -123
  207. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  208. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  209. package/lib/composite-comp/nuri/second-config-panels/WalletNuriSecondConfig/index.js +0 -152
  210. package/lib/composite-comp/public/components/Location/defaultJSON.js +0 -104
  211. package/lib/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
  212. package/lib/composite-comp/public/components/Location/mobile/index.js +0 -133
  213. package/lib/composite-comp/public/components/Location/mobile/index.less +0 -21
  214. package/lib/composite-comp/public/components/Stores/defaultJSON.js +0 -348
  215. package/lib/composite-comp/public/components/Stores/index.js +0 -86
  216. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +0 -250
  217. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +0 -81
  218. package/lib/composite-comp/public/components/Stores/mobile/index.js +0 -335
  219. package/lib/composite-comp/public/components/Stores/mobile/index.less +0 -33
  220. package/lib/composite-comp/public/components/Wallet/defaultJSON.js +0 -149
  221. package/lib/composite-comp/public/components/Wallet/mobile/index.js +0 -350
  222. package/lib/composite-comp/public/components/Wallet/mobile/index.less +0 -22
  223. package/lib/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +0 -153
  224. package/lib/composite-comp/public/config-panels/LocationConfig/index.less +0 -17
  225. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +0 -176
  226. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +0 -0
  227. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +0 -103
  228. package/lib/composite-comp/public/config-panels/StoresConfig/index.js +0 -134
  229. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
  230. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +0 -100
  231. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +0 -72
  232. package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.js +0 -123
  233. package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
  234. package/lib/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
  235. package/lib/composite-comp/public/config-panels/WalletConfig/index.js +0 -61
  236. package/lib/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +0 -152
  237. package/lib/locale/ar/ar.json +0 -362
  238. package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +0 -207
  239. package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +0 -81
  240. /package/es/composite-comp/{public → bol}/components/Wallet/index.js +0 -0
  241. /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.js +0 -0
  242. /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.less +0 -0
  243. /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.js +0 -0
  244. /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.less +0 -0
  245. /package/es/composite-comp/{nuri → bol}/components/WalletNuri/defaultJSON.js +0 -0
  246. /package/es/composite-comp/{nuri → bol}/components/WalletNuri/index.js +0 -0
  247. /package/es/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.js +0 -0
  248. /package/es/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.less +0 -0
  249. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigContent/index.js +0 -0
  250. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigContent/index.less +0 -0
  251. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigImageGroup/index.less +0 -0
  252. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.js +0 -0
  253. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.less +0 -0
  254. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/imgs/defaultImg.png +0 -0
  255. /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/index.js +0 -0
  256. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  257. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/GroupList/index.js +0 -0
  258. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/GroupList/index.less +0 -0
  259. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +0 -0
  260. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  261. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  262. /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/index.js +0 -0
  263. /package/es/composite-comp/{nuri → bol}/second-config-panels/WalletNuriSecondConfig/index.js +0 -0
  264. /package/es/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.js +0 -0
  265. /package/es/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.less +0 -0
  266. /package/es/{assets/images/common/product.png → composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png} +0 -0
  267. /package/lib/composite-comp/{public → bol}/components/Wallet/index.js +0 -0
  268. /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.js +0 -0
  269. /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.less +0 -0
  270. /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.js +0 -0
  271. /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.less +0 -0
  272. /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/defaultJSON.js +0 -0
  273. /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/index.js +0 -0
  274. /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.js +0 -0
  275. /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.less +0 -0
  276. /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigContent/index.js +0 -0
  277. /package/{es/composite-comp/public/config-panels/StoresConfig/ConfigContent → lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigContent}/index.less +0 -0
  278. /package/{es/composite-comp/public → lib/composite-comp/bol}/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
  279. /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.js +0 -0
  280. /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.less +0 -0
  281. /package/{es/composite-comp/public/config-panels/WalletConfig/GroupList → lib/composite-comp/bol/config-panels/WalletConfig/imgs}/defaultImg.png +0 -0
  282. /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/index.js +0 -0
  283. /package/{es/composite-comp/public/config-panels/WalletConfig/imgs → lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList}/defaultImg.png +0 -0
  284. /package/{es/composite-comp/public/config-panels/WalletConfig → lib/composite-comp/bol/config-panels/WalletNuriConfig}/GroupList/index.js +0 -0
  285. /package/{es/composite-comp/public/config-panels/WalletConfig → lib/composite-comp/bol/config-panels/WalletNuriConfig}/GroupList/index.less +0 -0
  286. /package/{es/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup → lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup}/index.js +0 -0
  287. /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig/WalletConfigContent → bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup}/index.less +0 -0
  288. /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletNuriConfig}/imgs/defaultImg.png +0 -0
  289. /package/lib/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/index.js +0 -0
  290. /package/{es/composite-comp/public/second-config-panels/WalletSecondConfig → lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig}/index.js +0 -0
  291. /package/lib/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.js +0 -0
  292. /package/lib/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.less +0 -0
  293. /package/lib/{assets/images/common/product.png → composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png} +0 -0
@@ -0,0 +1,809 @@
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;