@fonixtree/magic-design 2.0.97 → 2.0.99

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 (283) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +19 -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/layout-icon/banner-slide-layout1.png +0 -0
  8. package/es/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
  9. package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
  10. package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
  11. package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
  12. package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
  13. package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
  14. package/es/common/Collapse/index.js +10 -8
  15. package/es/common/FontStyles/index.less +3 -1
  16. package/es/common/MonpayCountDown/index.js +160 -0
  17. package/es/common/PopUpModal/index.less +79 -0
  18. package/es/common/PopUpModal1/style.less +56 -0
  19. package/es/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
  20. package/es/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
  21. package/es/common/ProductFilterModal/index.less +72 -0
  22. package/es/common/RatingText/index.js +105 -0
  23. package/es/common/RatingText/index.less +12 -0
  24. package/es/common/Tag/index.less +16 -0
  25. package/es/common/index.js +24 -0
  26. package/es/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
  27. package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -1
  28. package/es/composite-comp/bol/components/Banner/mobile/index.less +8 -4
  29. package/es/composite-comp/bol/components/Banner/pc/index.js +2 -1
  30. package/es/composite-comp/bol/components/Banner/pc/index.less +9 -3
  31. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
  32. package/es/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
  33. package/es/composite-comp/common/components/MonpayProductItem/index.js +283 -0
  34. package/es/composite-comp/common/components/MonpayProductItem/index.less +211 -0
  35. package/es/composite-comp/common/components/ProductItem/index.js +5 -11
  36. package/es/composite-comp/common/components/ProductItem/index.less +10 -0
  37. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
  38. package/es/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
  39. package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
  40. package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
  41. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
  42. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
  43. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
  44. package/es/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
  45. package/es/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
  46. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
  47. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
  48. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
  49. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
  50. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
  51. package/es/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
  52. package/es/composite-comp/monpay/components/Bundle/index.js +86 -0
  53. package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
  54. package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
  55. package/es/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
  56. package/es/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
  57. package/es/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
  58. package/es/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
  59. package/es/composite-comp/monpay/components/InterestProducts/index.js +86 -0
  60. package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
  61. package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
  62. package/es/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
  63. package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
  64. package/es/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
  65. package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
  66. package/es/composite-comp/monpay/components/MerchantSales/index.js +86 -0
  67. package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
  68. package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
  69. package/es/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
  70. package/es/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
  71. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
  72. package/es/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
  73. package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
  74. package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
  75. package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
  76. package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
  77. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
  78. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
  79. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
  80. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
  81. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
  82. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
  83. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
  84. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
  85. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
  86. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
  87. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
  88. package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
  89. package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +389 -0
  90. package/es/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
  91. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
  92. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
  93. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +822 -0
  94. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
  95. package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
  96. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +817 -0
  97. package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
  98. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
  99. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
  100. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
  101. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
  102. package/es/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
  103. package/es/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
  104. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
  105. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
  106. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
  107. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
  108. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
  109. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
  110. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
  111. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
  112. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
  113. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
  114. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
  115. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
  116. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
  117. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
  118. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
  119. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
  120. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
  121. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
  122. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
  123. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
  124. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
  125. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
  126. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
  127. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
  128. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
  129. package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
  130. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +435 -0
  131. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
  132. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
  133. package/es/constants/component-types.js +25 -3
  134. package/es/constants/index.js +42 -3
  135. package/es/constants/layout.js +43 -4
  136. package/es/core/Designer/ConfigPanel/index.js +1 -1
  137. package/es/core/Designer/index.js +5 -2
  138. package/es/locale/en/en.json +21 -0
  139. package/es/locale/es/es.json +21 -0
  140. package/es/locale/id/id.json +21 -0
  141. package/es/utils/dateUtil.js +13 -0
  142. package/lib/assets/fonts/.DS_Store +0 -0
  143. package/lib/assets/fonts/magic-box-iconfont.css +19 -3
  144. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  145. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  146. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  147. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  148. package/lib/assets/images/layout-icon/banner-slide-layout1.png +0 -0
  149. package/lib/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
  150. package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
  151. package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
  152. package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
  153. package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
  154. package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
  155. package/lib/common/Collapse/index.js +10 -8
  156. package/lib/common/FontStyles/index.less +3 -1
  157. package/lib/common/MonpayCountDown/index.js +160 -0
  158. package/lib/common/PopUpModal/index.less +79 -0
  159. package/lib/common/PopUpModal1/style.less +56 -0
  160. package/lib/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
  161. package/lib/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
  162. package/lib/common/ProductFilterModal/index.less +72 -0
  163. package/lib/common/RatingText/index.js +105 -0
  164. package/lib/common/RatingText/index.less +12 -0
  165. package/lib/common/Tag/index.less +16 -0
  166. package/lib/common/index.js +24 -0
  167. package/lib/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
  168. package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -1
  169. package/lib/composite-comp/bol/components/Banner/mobile/index.less +8 -4
  170. package/lib/composite-comp/bol/components/Banner/pc/index.js +2 -1
  171. package/lib/composite-comp/bol/components/Banner/pc/index.less +9 -3
  172. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
  173. package/lib/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
  174. package/lib/composite-comp/common/components/MonpayProductItem/index.js +283 -0
  175. package/lib/composite-comp/common/components/MonpayProductItem/index.less +211 -0
  176. package/lib/composite-comp/common/components/ProductItem/index.js +5 -11
  177. package/lib/composite-comp/common/components/ProductItem/index.less +10 -0
  178. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
  179. package/lib/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
  180. package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
  181. package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
  182. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
  183. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
  184. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
  185. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
  186. package/lib/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
  187. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
  188. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
  189. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
  190. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
  191. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
  192. package/lib/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
  193. package/lib/composite-comp/monpay/components/Bundle/index.js +86 -0
  194. package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
  195. package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
  196. package/lib/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
  197. package/lib/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
  198. package/lib/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
  199. package/lib/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
  200. package/lib/composite-comp/monpay/components/InterestProducts/index.js +86 -0
  201. package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
  202. package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
  203. package/lib/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
  204. package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
  205. package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
  206. package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
  207. package/lib/composite-comp/monpay/components/MerchantSales/index.js +86 -0
  208. package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
  209. package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
  210. package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
  211. package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
  212. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
  213. package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
  214. package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
  215. package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
  216. package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
  217. package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
  218. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
  219. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
  220. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
  221. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
  222. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
  223. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
  224. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
  225. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
  226. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
  227. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
  228. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
  229. package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
  230. package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +389 -0
  231. package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
  232. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
  233. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
  234. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +822 -0
  235. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
  236. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
  237. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +817 -0
  238. package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
  239. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
  240. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
  241. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
  242. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
  243. package/lib/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
  244. package/lib/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
  245. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
  246. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
  247. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
  248. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
  249. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
  250. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
  251. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
  252. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
  253. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
  254. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
  255. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
  256. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
  257. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
  258. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
  259. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
  260. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
  261. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
  262. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
  263. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
  264. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
  265. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
  266. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
  267. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
  268. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
  269. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
  270. package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
  271. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +435 -0
  272. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
  273. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
  274. package/lib/constants/component-types.js +25 -3
  275. package/lib/constants/index.js +42 -3
  276. package/lib/constants/layout.js +43 -4
  277. package/lib/core/Designer/ConfigPanel/index.js +1 -1
  278. package/lib/core/Designer/index.js +5 -2
  279. package/lib/locale/en/en.json +21 -0
  280. package/lib/locale/es/es.json +21 -0
  281. package/lib/locale/id/id.json +21 -0
  282. package/lib/utils/dateUtil.js +13 -0
  283. package/package.json +1 -1
@@ -0,0 +1,150 @@
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 _RecommendConfigGroup = _interopRequireDefault(require("./RecommendConfigGroup"));
11
+
12
+ var _RecommendConfigContent = _interopRequireDefault(require("./RecommendConfigContent"));
13
+
14
+ var _RecommendConfigTitle = _interopRequireDefault(require("./RecommendConfigTitle"));
15
+
16
+ var _coreUtil = require("../../../../utils/coreUtil");
17
+
18
+ var _layout = require("../../../../constants/layout");
19
+
20
+ var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
21
+
22
+ var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
23
+
24
+ var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
25
+
26
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
27
+
28
+ var _locale = require("../../../../locale");
29
+
30
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
+
32
+ var __extends = void 0 && (void 0).__extends || function () {
33
+ var _extendStatics = function extendStatics(d, b) {
34
+ _extendStatics = Object.setPrototypeOf || {
35
+ __proto__: []
36
+ } instanceof Array && function (d, b) {
37
+ d.__proto__ = b;
38
+ } || function (d, b) {
39
+ for (var p in b) {
40
+ if (b.hasOwnProperty(p)) d[p] = b[p];
41
+ }
42
+ };
43
+
44
+ return _extendStatics(d, b);
45
+ };
46
+
47
+ return function (d, b) {
48
+ _extendStatics(d, b);
49
+
50
+ function __() {
51
+ this.constructor = d;
52
+ }
53
+
54
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
55
+ };
56
+ }();
57
+
58
+ var RecommendConfig =
59
+ /** @class */
60
+ function (_super) {
61
+ __extends(RecommendConfig, _super);
62
+
63
+ function RecommendConfig() {
64
+ var _this = _super !== null && _super.apply(this, arguments) || this;
65
+
66
+ _this.selfRender = function () {
67
+ (0, _coreUtil.renderPreview)();
68
+
69
+ _this.setState({});
70
+ };
71
+
72
+ _this.getLayout = function (v) {
73
+ var data = _this.props.data;
74
+
75
+ if ((0, _coreUtil.isPc)()) {
76
+ data.customize.layout.pcLayout = v;
77
+ } else {
78
+ data.customize.layout.h5Layout = v;
79
+ }
80
+
81
+ _this.selfRender();
82
+ };
83
+
84
+ return _this;
85
+ }
86
+
87
+ RecommendConfig.prototype.render = function () {
88
+ var _this = this;
89
+
90
+ var data = this.props.data;
91
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
92
+ divider: "bold",
93
+ headerSize: "large",
94
+ source: [{
95
+ key: '1',
96
+ name: (0, _locale.i18n)('TITLE'),
97
+ value: /*#__PURE__*/_react["default"].createElement(_RecommendConfigTitle["default"], {
98
+ panelProps: data.title
99
+ })
100
+ }, {
101
+ key: '2',
102
+ name: (0, _locale.i18n)('GROUP'),
103
+ value: /*#__PURE__*/_react["default"].createElement(_RecommendConfigGroup["default"], {
104
+ id: data.id,
105
+ source: data.groupSource
106
+ })
107
+ }, {
108
+ key: '3',
109
+ name: (0, _locale.i18n)('CONTENT'),
110
+ value: /*#__PURE__*/_react["default"].createElement(_RecommendConfigContent["default"], {
111
+ panelProps: data.content
112
+ })
113
+ }, {
114
+ key: '4',
115
+ name: (0, _locale.i18n)('SPACING'),
116
+ value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
117
+ configCompSpace: true,
118
+ data: data.spacing
119
+ })
120
+ }, {
121
+ key: '5',
122
+ name: (0, _locale.i18n)('CUSTOMIZE'),
123
+ value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
124
+ component: "monpayRecommend",
125
+ data: data.customize,
126
+ isHideAlign: true,
127
+ layoutSource: (0, _coreUtil.isPc)() ? _layout.recommendLayoutPc : _layout.monpayRecommendLayoutMobile,
128
+ selectedLayoutFun: function selectedLayoutFun(v) {
129
+ _this.getLayout(v);
130
+ }
131
+ })
132
+ }, {
133
+ key: '6',
134
+ name: (0, _locale.i18n)('BACKGROUND'),
135
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
136
+ data: data.background
137
+ })
138
+ }],
139
+ type: "triangle"
140
+ }));
141
+ };
142
+
143
+ RecommendConfig.defaultProps = {
144
+ data: {}
145
+ };
146
+ return RecommendConfig;
147
+ }(_react["default"].Component);
148
+
149
+ var _default = RecommendConfig;
150
+ exports["default"] = _default;
@@ -0,0 +1,435 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _antd = require("antd");
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _commonUtil = require("../../../../../utils/commonUtil");
13
+
14
+ var _dataTreeUtils = _interopRequireDefault(require("../../../../../utils/dataTreeUtils"));
15
+
16
+ var _common = require("../../../../../common");
17
+
18
+ var _locale = require("../../../../../locale");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ var __extends = void 0 && (void 0).__extends || function () {
23
+ var _extendStatics = function extendStatics(d, b) {
24
+ _extendStatics = Object.setPrototypeOf || {
25
+ __proto__: []
26
+ } instanceof Array && function (d, b) {
27
+ d.__proto__ = b;
28
+ } || function (d, b) {
29
+ for (var p in b) {
30
+ if (b.hasOwnProperty(p)) d[p] = b[p];
31
+ }
32
+ };
33
+
34
+ return _extendStatics(d, b);
35
+ };
36
+
37
+ return function (d, b) {
38
+ _extendStatics(d, b);
39
+
40
+ function __() {
41
+ this.constructor = d;
42
+ }
43
+
44
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
+ };
46
+ }();
47
+
48
+ var __assign = void 0 && (void 0).__assign || function () {
49
+ __assign = Object.assign || function (t) {
50
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
51
+ s = arguments[i];
52
+
53
+ for (var p in s) {
54
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
+ }
56
+ }
57
+
58
+ return t;
59
+ };
60
+
61
+ return __assign.apply(this, arguments);
62
+ };
63
+
64
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
65
+ function adopt(value) {
66
+ return value instanceof P ? value : new P(function (resolve) {
67
+ resolve(value);
68
+ });
69
+ }
70
+
71
+ return new (P || (P = Promise))(function (resolve, reject) {
72
+ function fulfilled(value) {
73
+ try {
74
+ step(generator.next(value));
75
+ } catch (e) {
76
+ reject(e);
77
+ }
78
+ }
79
+
80
+ function rejected(value) {
81
+ try {
82
+ step(generator["throw"](value));
83
+ } catch (e) {
84
+ reject(e);
85
+ }
86
+ }
87
+
88
+ function step(result) {
89
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
90
+ }
91
+
92
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
93
+ });
94
+ };
95
+
96
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
97
+ var _ = {
98
+ label: 0,
99
+ sent: function sent() {
100
+ if (t[0] & 1) throw t[1];
101
+ return t[1];
102
+ },
103
+ trys: [],
104
+ ops: []
105
+ },
106
+ f,
107
+ y,
108
+ t,
109
+ g;
110
+ return g = {
111
+ next: verb(0),
112
+ "throw": verb(1),
113
+ "return": verb(2)
114
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
115
+ return this;
116
+ }), g;
117
+
118
+ function verb(n) {
119
+ return function (v) {
120
+ return step([n, v]);
121
+ };
122
+ }
123
+
124
+ function step(op) {
125
+ if (f) throw new TypeError("Generator is already executing.");
126
+
127
+ while (_) {
128
+ try {
129
+ 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;
130
+ if (y = 0, t) op = [op[0] & 2, t.value];
131
+
132
+ switch (op[0]) {
133
+ case 0:
134
+ case 1:
135
+ t = op;
136
+ break;
137
+
138
+ case 4:
139
+ _.label++;
140
+ return {
141
+ value: op[1],
142
+ done: false
143
+ };
144
+
145
+ case 5:
146
+ _.label++;
147
+ y = op[1];
148
+ op = [0];
149
+ continue;
150
+
151
+ case 7:
152
+ op = _.ops.pop();
153
+
154
+ _.trys.pop();
155
+
156
+ continue;
157
+
158
+ default:
159
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
160
+ _ = 0;
161
+ continue;
162
+ }
163
+
164
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
165
+ _.label = op[1];
166
+ break;
167
+ }
168
+
169
+ if (op[0] === 6 && _.label < t[1]) {
170
+ _.label = t[1];
171
+ t = op;
172
+ break;
173
+ }
174
+
175
+ if (t && _.label < t[2]) {
176
+ _.label = t[2];
177
+
178
+ _.ops.push(op);
179
+
180
+ break;
181
+ }
182
+
183
+ if (t[2]) _.ops.pop();
184
+
185
+ _.trys.pop();
186
+
187
+ continue;
188
+ }
189
+
190
+ op = body.call(thisArg, _);
191
+ } catch (e) {
192
+ op = [6, e];
193
+ y = 0;
194
+ } finally {
195
+ f = t = 0;
196
+ }
197
+ }
198
+
199
+ if (op[0] & 5) throw op[1];
200
+ return {
201
+ value: op[0] ? op[1] : void 0,
202
+ done: true
203
+ };
204
+ }
205
+ };
206
+
207
+ var Option = _antd.Select.Option;
208
+
209
+ var AIRecommendation =
210
+ /** @class */
211
+ function (_super) {
212
+ __extends(AIRecommendation, _super);
213
+
214
+ function AIRecommendation() {
215
+ var _this = _super !== null && _super.apply(this, arguments) || this;
216
+
217
+ _this.state = {
218
+ intelligentType: 'Hot',
219
+ intelligentValue: [],
220
+ categoryData: [],
221
+ brandData: [],
222
+ labelData: []
223
+ };
224
+
225
+ _this.onChangeIntelligentType = function (type) {
226
+ return __awaiter(_this, void 0, void 0, function () {
227
+ return __generator(this, function (_a) {
228
+ this.setState({
229
+ intelligentType: type,
230
+ intelligentValue: []
231
+ }); // this.getTypeData(type);
232
+
233
+ this.props.onChange({
234
+ intelligentType: type,
235
+ intelligentValue: []
236
+ });
237
+ return [2
238
+ /*return*/
239
+ ];
240
+ });
241
+ });
242
+ };
243
+
244
+ _this.getTypeData = function (type) {
245
+ return __awaiter(_this, void 0, void 0, function () {
246
+ var res, res, res;
247
+ return __generator(this, function (_a) {
248
+ switch (_a.label) {
249
+ case 0:
250
+ if (!(type === 'Category')) return [3
251
+ /*break*/
252
+ , 2];
253
+ if (this.state.categoryData.length > 0) return [2
254
+ /*return*/
255
+ ];
256
+ return [4
257
+ /*yield*/
258
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list")];
259
+
260
+ case 1:
261
+ res = _a.sent();
262
+ this.setState({
263
+ categoryData: _dataTreeUtils["default"].listToTree(res)
264
+ });
265
+ return [3
266
+ /*break*/
267
+ , 6];
268
+
269
+ case 2:
270
+ if (!(type === 'Brand')) return [3
271
+ /*break*/
272
+ , 4];
273
+ if (this.state.brandData.length > 0) return [2
274
+ /*return*/
275
+ ];
276
+ return [4
277
+ /*yield*/
278
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
279
+
280
+ case 3:
281
+ res = _a.sent();
282
+ this.setState({
283
+ brandData: res
284
+ });
285
+ return [3
286
+ /*break*/
287
+ , 6];
288
+
289
+ case 4:
290
+ if (!(type === 'Label')) return [3
291
+ /*break*/
292
+ , 6];
293
+ if (this.state.labelData.length > 0) return [2
294
+ /*return*/
295
+ ];
296
+ return [4
297
+ /*yield*/
298
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/labels/list")];
299
+
300
+ case 5:
301
+ res = _a.sent();
302
+ this.setState({
303
+ labelData: res
304
+ });
305
+ _a.label = 6;
306
+
307
+ case 6:
308
+ return [2
309
+ /*return*/
310
+ ];
311
+ }
312
+ });
313
+ });
314
+ };
315
+
316
+ return _this;
317
+ }
318
+
319
+ AIRecommendation.prototype.componentDidMount = function () {
320
+ var _a = this.props.value,
321
+ intelligentType = _a.intelligentType,
322
+ intelligentValue = _a.intelligentValue;
323
+ this.getTypeData(intelligentType);
324
+ this.setState({
325
+ intelligentType: intelligentType,
326
+ intelligentValue: intelligentValue
327
+ });
328
+ };
329
+
330
+ AIRecommendation.prototype.componentWillReceiveProps = function (nextProps) {
331
+ var _a = nextProps.value,
332
+ intelligentType = _a.intelligentType,
333
+ intelligentValue = _a.intelligentValue;
334
+ this.getTypeData(intelligentType);
335
+ this.setState({
336
+ intelligentType: intelligentType,
337
+ intelligentValue: intelligentValue
338
+ });
339
+ };
340
+
341
+ AIRecommendation.prototype.render = function () {
342
+ var _this = this;
343
+
344
+ var _a = this.state,
345
+ intelligentType = _a.intelligentType,
346
+ intelligentValue = _a.intelligentValue,
347
+ categoryData = _a.categoryData,
348
+ brandData = _a.brandData,
349
+ labelData = _a.labelData;
350
+ var _onChange = this.props.onChange;
351
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
352
+ split: "dashed",
353
+ title: (0, _locale.i18n)('RECOMMENDED_RULES')
354
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
355
+ onChange: this.onChangeIntelligentType,
356
+ showSearch: true,
357
+ value: intelligentType
358
+ }, /*#__PURE__*/_react["default"].createElement(Option, {
359
+ value: "Hot"
360
+ }, (0, _locale.i18n)('HOT')), /*#__PURE__*/_react["default"].createElement(Option, {
361
+ value: "Like"
362
+ }, (0, _locale.i18n)('GUESS_YOU_LIKE')), /*#__PURE__*/_react["default"].createElement(Option, {
363
+ value: "Category"
364
+ }, (0, _locale.i18n)('CATEGORY')), /*#__PURE__*/_react["default"].createElement(Option, {
365
+ value: "Brand"
366
+ }, (0, _locale.i18n)('BRAND')), /*#__PURE__*/_react["default"].createElement(Option, {
367
+ value: "Label"
368
+ }, (0, _locale.i18n)('LABEL')), /*#__PURE__*/_react["default"].createElement(Option, {
369
+ value: "Recently"
370
+ }, (0, _locale.i18n)('RECENTLY')), /*#__PURE__*/_react["default"].createElement(Option, {
371
+ value: "coupon"
372
+ }, (0, _locale.i18n)('COUPON')))), intelligentType === 'Category' && /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
373
+ allowClear: true,
374
+ dropdownStyle: {
375
+ maxHeight: 400,
376
+ overflow: 'auto'
377
+ },
378
+ multiple: true,
379
+ onChange: function onChange(value) {
380
+ _this.setState({
381
+ intelligentValue: value
382
+ });
383
+
384
+ _onChange(__assign(__assign({}, _this.props.value), {
385
+ intelligentValue: value
386
+ }));
387
+ },
388
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
389
+ treeData: categoryData,
390
+ treeDefaultExpandAll: true,
391
+ value: intelligentValue
392
+ })), intelligentType === 'Brand' && /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
393
+ mode: "multiple",
394
+ onChange: function onChange(value) {
395
+ _this.setState({
396
+ intelligentValue: value
397
+ });
398
+
399
+ _onChange(__assign(__assign({}, _this.props.value), {
400
+ intelligentValue: value
401
+ }));
402
+ },
403
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
404
+ value: intelligentValue
405
+ }, brandData && brandData.length > 0 && brandData.map(function (v) {
406
+ return /*#__PURE__*/_react["default"].createElement(Option, {
407
+ key: v.brandId,
408
+ value: v.brandId
409
+ }, v.brandName);
410
+ }))), intelligentType === 'Label' && /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
411
+ mode: "multiple",
412
+ onChange: function onChange(value) {
413
+ _this.setState({
414
+ intelligentValue: value
415
+ });
416
+
417
+ _onChange(__assign(__assign({}, _this.props.value), {
418
+ intelligentValue: value
419
+ }));
420
+ },
421
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
422
+ value: intelligentValue
423
+ }, labelData && labelData.length > 0 && labelData.map(function (v) {
424
+ return /*#__PURE__*/_react["default"].createElement(Option, {
425
+ key: v.labelId,
426
+ value: v.labelId
427
+ }, v.labelName);
428
+ }))));
429
+ };
430
+
431
+ return AIRecommendation;
432
+ }(_react["default"].Component);
433
+
434
+ var _default = AIRecommendation;
435
+ exports["default"] = _default;