@fonixtree/magic-design 0.0.102 → 0.0.104

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 (435) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +28 -12
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +28 -12
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/assets/images/layout-icon/imageGalleryLayout1.png +0 -0
  9. package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  10. package/es/assets/less/button.less +23 -0
  11. package/es/assets/less/common.less +2 -2
  12. package/es/assets/less/datepicker.less +11 -0
  13. package/es/assets/less/index.less +2 -1
  14. package/es/assets/less/modal.less +7 -2
  15. package/es/common/Button/index.js +2 -1
  16. package/es/common/Button/index.less +5 -0
  17. package/es/common/ButtonIconLayout/index.less +4 -2
  18. package/es/common/Collapse/index.js +14 -4
  19. package/es/common/FontStyles/index.less +1 -1
  20. package/es/common/GroupList/index.js +4 -3
  21. package/es/common/ImageModal/index.js +31 -26
  22. package/es/common/ImageModal/index.less +6 -1
  23. package/es/common/ImgArea/components/Crop.js +267 -0
  24. package/es/common/ImgArea/components/Icons.js +44 -0
  25. package/es/common/ImgArea/components/MultiCrops.js +210 -0
  26. package/es/common/ImgArea/index.js +11 -0
  27. package/es/common/LinkModal/BundleCampaign/index.js +17 -17
  28. package/es/common/LinkModal/CustomTable/index.js +3 -2
  29. package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
  30. package/es/common/LinkModal/FilteredProductModal/index.less +2 -3
  31. package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
  32. package/es/common/LinkModal/index.less +1 -1
  33. package/es/common/MagicLink/index.js +89 -0
  34. package/es/common/MagicLink/index.less +0 -0
  35. package/es/common/ProductModal/index.js +1 -1
  36. package/es/common/ProductModal/index.less +12 -7
  37. package/es/common/SystemNotification/Confirm/index.js +263 -0
  38. package/es/common/SystemNotification/Confirm/index.less +33 -0
  39. package/es/common/SystemNotification/index.js +115 -0
  40. package/es/common/UrlPicker/index.js +6 -2
  41. package/es/common/UrlPicker/index.less +12 -1
  42. package/es/common/index.js +16 -0
  43. package/es/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
  44. package/es/composite-comp/bol/components/Banner/mobile/index.js +48 -11
  45. package/es/composite-comp/bol/components/Banner/pc/index.js +50 -20
  46. package/es/composite-comp/bol/components/Button/defaultJSON.js +40 -70
  47. package/es/composite-comp/bol/components/Button/index.js +8 -14
  48. package/es/composite-comp/bol/components/Button/index.less +9 -9
  49. package/es/composite-comp/bol/components/Carousel/defaultJSON.js +16 -20
  50. package/es/composite-comp/bol/components/Carousel/imgs/pcDefImg1.png +0 -0
  51. package/es/composite-comp/bol/components/Carousel/index.js +1 -6
  52. package/es/composite-comp/bol/components/Carousel/mobile/index.js +58 -38
  53. package/es/composite-comp/bol/components/Carousel/mobile/index.less +22 -9
  54. package/es/composite-comp/bol/components/Carousel/pc/index.js +67 -34
  55. package/es/composite-comp/bol/components/Carousel/pc/index.less +29 -16
  56. package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +19 -10
  57. package/es/composite-comp/bol/components/ImageGallery/imgs/defImg1.png +0 -0
  58. package/es/composite-comp/bol/components/ImageGallery/imgs/defImg2.png +0 -0
  59. package/es/composite-comp/bol/components/ImageGallery/imgs/defImg3.png +0 -0
  60. package/es/composite-comp/bol/components/ImageGallery/imgs/defImg4.png +0 -0
  61. package/es/composite-comp/bol/components/ImageGallery/imgs/defImg5.png +0 -0
  62. package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg1.png +0 -0
  63. package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg2.png +0 -0
  64. package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg3.png +0 -0
  65. package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg4.png +0 -0
  66. package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg5.png +0 -0
  67. package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg6.png +0 -0
  68. package/es/composite-comp/bol/components/ImageGallery/index.js +5 -1
  69. package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +77 -15
  70. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -66
  71. package/es/composite-comp/bol/components/ImageGallery/pc/index.js +166 -0
  72. package/es/composite-comp/bol/components/ImageGallery/pc/index.less +23 -0
  73. package/es/composite-comp/bol/components/ImageText/defaultJSON.js +57 -179
  74. package/es/composite-comp/bol/components/ImageText/mobile/index.js +3 -5
  75. package/es/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
  76. package/es/composite-comp/bol/components/ImageText/pc/index.js +46 -18
  77. package/es/composite-comp/bol/components/ImageText/pc/index.less +2 -0
  78. package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +3 -3
  79. package/es/composite-comp/bol/components/Newsletter/index.js +16 -8
  80. package/es/composite-comp/bol/components/Newsletter/index.less +1 -1
  81. package/es/composite-comp/bol/components/Tag/defaultJSON.js +38 -48
  82. package/es/composite-comp/bol/components/Tag/index.js +8 -14
  83. package/es/composite-comp/bol/components/Tag/index.less +1 -0
  84. package/es/composite-comp/bol/components/Text/defaultJSON.js +5 -7
  85. package/es/composite-comp/bol/components/Text/index.js +4 -8
  86. package/es/composite-comp/bol/components/Text/index.less +3 -3
  87. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  88. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +143 -0
  89. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  90. package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
  91. package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
  92. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  93. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -2
  94. package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -1
  95. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
  96. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +20 -4
  97. package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
  98. package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +2 -1
  99. package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +6 -4
  100. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +9 -17
  101. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +143 -0
  102. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  103. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +7 -4
  104. package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
  105. package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  106. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  107. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  108. package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +8 -13
  109. package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
  110. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +10 -5
  111. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +8 -0
  112. package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  113. package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  114. package/es/composite-comp/common/components/ImageLabel/index.less +1 -1
  115. package/es/composite-comp/common/components/ProductItem/index.js +26 -6
  116. package/es/composite-comp/common/components/ProductItem/index.less +11 -10
  117. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +52 -25
  118. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +40 -29
  119. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +67 -8
  120. package/es/composite-comp/dito/components/FlashDeal/index.js +5 -1
  121. package/es/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg.png +0 -0
  122. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +24 -38
  123. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -1
  124. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg.png +0 -0
  125. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
  126. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
  127. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
  128. package/es/composite-comp/dito/components/FlashDeal/pc/index.js +567 -0
  129. package/es/composite-comp/dito/components/FlashDeal/pc/index.less +122 -0
  130. package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +5 -4
  131. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
  132. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
  133. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +136 -0
  134. package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  135. package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
  136. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +482 -0
  137. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +107 -0
  138. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +33 -15
  139. package/es/composite-comp/dito/components/Recommend/index.js +5 -6
  140. package/es/composite-comp/dito/components/Recommend/mobile/index.js +93 -72
  141. package/es/composite-comp/dito/components/Recommend/mobile/index.less +11 -2
  142. package/es/composite-comp/dito/components/Recommend/pc/index.js +184 -53
  143. package/es/composite-comp/dito/components/Recommend/pc/index.less +56 -12
  144. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +49 -20
  145. package/es/composite-comp/dito/components/SearchBar/imgs/xt-logo.png +0 -0
  146. package/es/composite-comp/dito/components/SearchBar/index.js +7 -2
  147. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +31 -26
  148. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +15 -3
  149. package/es/composite-comp/dito/components/SearchBar/pc/index.js +149 -0
  150. package/es/composite-comp/dito/components/SearchBar/pc/index.less +60 -0
  151. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +16 -6
  152. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +20 -0
  153. package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -2
  154. package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -1
  155. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +129 -0
  156. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +128 -0
  157. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  158. package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +194 -0
  159. package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +1 -1
  160. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +18 -3
  161. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
  162. package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +16 -51
  163. package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  164. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
  165. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +80 -49
  166. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +13 -1
  167. package/es/constants/component-types.js +15 -3
  168. package/es/constants/index.js +21 -2
  169. package/es/constants/layout.js +35 -14
  170. package/es/core/Designer/AppointmentModal/index.js +87 -0
  171. package/es/core/Designer/AppointmentModal/index.less +23 -0
  172. package/es/core/Designer/CompListPanel/CompCard/index.js +3 -1
  173. package/es/core/Designer/CompListPanel/index.js +11 -36
  174. package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
  175. package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
  176. package/es/core/Designer/ConfigPanel/index.js +73 -23
  177. package/es/core/Designer/ConfigPanel/index.less +4 -0
  178. package/es/core/Designer/History/index.js +34 -28
  179. package/es/core/Designer/PageCompList/index.js +42 -4
  180. package/es/core/Designer/PageCompList/index.less +10 -10
  181. package/es/core/Designer/QuickMenuBar/index.js +38 -4
  182. package/es/core/Designer/QuickMenuBar/index.less +34 -0
  183. package/es/core/Designer/ViewArea/index.js +48 -8
  184. package/es/core/Designer/ViewArea/index.less +40 -4
  185. package/es/core/Designer/index.js +93 -41
  186. package/es/core/Renderer/index.js +23 -5
  187. package/es/decorator/compositeDecorator.js +147 -17
  188. package/es/decorator/index.js +8 -0
  189. package/es/decorator/metaDecorator.js +41 -8
  190. package/es/decorator/updateConfigDecorator.js +76 -0
  191. package/es/locale/en/en.json +21 -3
  192. package/es/locale/es/es.json +19 -1
  193. package/es/locale/id/id.json +21 -3
  194. package/es/meta-comp/components/Button/editable.js +114 -0
  195. package/es/meta-comp/components/Button/editable.less +6 -0
  196. package/es/meta-comp/components/Button/index.js +14 -33
  197. package/es/meta-comp/components/Button/index.less +3 -2
  198. package/es/meta-comp/components/Image/image/h5DefImg.png +0 -0
  199. package/es/meta-comp/components/Image/image/h5Img.png +0 -0
  200. package/es/meta-comp/components/Image/image/pcDefImg.png +0 -0
  201. package/es/meta-comp/components/Image/image/pcImg.png +0 -0
  202. package/es/meta-comp/components/Image/index.js +47 -8
  203. package/es/meta-comp/components/Image/index.less +7 -3
  204. package/es/meta-comp/components/Text/index.js +38 -11
  205. package/es/meta-comp/config-panels/BaseConfig.js +8 -10
  206. package/es/meta-comp/config-panels/ButtonConfig/index.js +2 -3
  207. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +164 -0
  208. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +26 -0
  209. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +133 -0
  210. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +17 -0
  211. package/es/meta-comp/config-panels/ImageConfig/index.js +17 -4
  212. package/es/meta-comp/config-panels/TextConfig/index.js +16 -7
  213. package/es/mobx/Frame.js +64 -0
  214. package/es/mobx/Store.js +9 -10
  215. package/es/mobx/index.js +9 -3
  216. package/es/utils/businessUtil.js +3 -3
  217. package/es/utils/coreUtil.js +15 -2
  218. package/lib/assets/fonts/magic-box-iconfont.css +28 -12
  219. package/lib/assets/fonts/magic-box-iconfont.css.bak +28 -12
  220. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  221. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  222. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  223. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  224. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  225. package/lib/assets/images/layout-icon/imageGalleryLayout1.png +0 -0
  226. package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  227. package/lib/assets/less/button.less +23 -0
  228. package/lib/assets/less/common.less +2 -2
  229. package/lib/assets/less/datepicker.less +11 -0
  230. package/lib/assets/less/index.less +2 -1
  231. package/lib/assets/less/modal.less +7 -2
  232. package/lib/common/Button/index.js +2 -1
  233. package/lib/common/Button/index.less +5 -0
  234. package/lib/common/ButtonIconLayout/index.less +4 -2
  235. package/lib/common/Collapse/index.js +14 -4
  236. package/lib/common/FontStyles/index.less +1 -1
  237. package/lib/common/GroupList/index.js +4 -3
  238. package/lib/common/ImageModal/index.js +31 -26
  239. package/lib/common/ImageModal/index.less +6 -1
  240. package/lib/common/ImgArea/components/Crop.js +267 -0
  241. package/lib/common/ImgArea/components/Icons.js +44 -0
  242. package/lib/common/ImgArea/components/MultiCrops.js +210 -0
  243. package/lib/common/ImgArea/index.js +11 -0
  244. package/lib/common/LinkModal/BundleCampaign/index.js +17 -17
  245. package/lib/common/LinkModal/CustomTable/index.js +3 -2
  246. package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
  247. package/lib/common/LinkModal/FilteredProductModal/index.less +2 -3
  248. package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
  249. package/lib/common/LinkModal/index.less +1 -1
  250. package/lib/common/MagicLink/index.js +89 -0
  251. package/lib/common/MagicLink/index.less +0 -0
  252. package/lib/common/ProductModal/index.js +1 -1
  253. package/lib/common/ProductModal/index.less +12 -7
  254. package/lib/common/SystemNotification/Confirm/index.js +263 -0
  255. package/lib/common/SystemNotification/Confirm/index.less +33 -0
  256. package/lib/common/SystemNotification/index.js +115 -0
  257. package/lib/common/UrlPicker/index.js +6 -2
  258. package/lib/common/UrlPicker/index.less +12 -1
  259. package/lib/common/index.js +16 -0
  260. package/lib/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
  261. package/lib/composite-comp/bol/components/Banner/mobile/index.js +48 -11
  262. package/lib/composite-comp/bol/components/Banner/pc/index.js +50 -20
  263. package/lib/composite-comp/bol/components/Button/defaultJSON.js +40 -70
  264. package/lib/composite-comp/bol/components/Button/index.js +8 -14
  265. package/lib/composite-comp/bol/components/Button/index.less +9 -9
  266. package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +16 -20
  267. package/lib/composite-comp/bol/components/Carousel/imgs/pcDefImg1.png +0 -0
  268. package/lib/composite-comp/bol/components/Carousel/index.js +1 -6
  269. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +58 -38
  270. package/lib/composite-comp/bol/components/Carousel/mobile/index.less +22 -9
  271. package/lib/composite-comp/bol/components/Carousel/pc/index.js +67 -34
  272. package/lib/composite-comp/bol/components/Carousel/pc/index.less +29 -16
  273. package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +19 -10
  274. package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg1.png +0 -0
  275. package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg2.png +0 -0
  276. package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg3.png +0 -0
  277. package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg4.png +0 -0
  278. package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg5.png +0 -0
  279. package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg1.png +0 -0
  280. package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg2.png +0 -0
  281. package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg3.png +0 -0
  282. package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg4.png +0 -0
  283. package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg5.png +0 -0
  284. package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg6.png +0 -0
  285. package/lib/composite-comp/bol/components/ImageGallery/index.js +5 -1
  286. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +77 -15
  287. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -66
  288. package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +166 -0
  289. package/lib/composite-comp/bol/components/ImageGallery/pc/index.less +23 -0
  290. package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +57 -179
  291. package/lib/composite-comp/bol/components/ImageText/mobile/index.js +3 -5
  292. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
  293. package/lib/composite-comp/bol/components/ImageText/pc/index.js +46 -18
  294. package/lib/composite-comp/bol/components/ImageText/pc/index.less +2 -0
  295. package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +3 -3
  296. package/lib/composite-comp/bol/components/Newsletter/index.js +16 -8
  297. package/lib/composite-comp/bol/components/Newsletter/index.less +1 -1
  298. package/lib/composite-comp/bol/components/Tag/defaultJSON.js +38 -48
  299. package/lib/composite-comp/bol/components/Tag/index.js +8 -14
  300. package/lib/composite-comp/bol/components/Tag/index.less +1 -0
  301. package/lib/composite-comp/bol/components/Text/defaultJSON.js +5 -7
  302. package/lib/composite-comp/bol/components/Text/index.js +4 -8
  303. package/lib/composite-comp/bol/components/Text/index.less +3 -3
  304. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  305. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +143 -0
  306. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  307. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
  308. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
  309. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  310. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -2
  311. package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -1
  312. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
  313. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +20 -4
  314. package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
  315. package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +2 -1
  316. package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +6 -4
  317. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +9 -17
  318. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +143 -0
  319. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  320. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +7 -4
  321. package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
  322. package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  323. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  324. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  325. package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +8 -13
  326. package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
  327. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +10 -5
  328. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +8 -0
  329. package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  330. package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  331. package/lib/composite-comp/common/components/ImageLabel/index.less +1 -1
  332. package/lib/composite-comp/common/components/ProductItem/index.js +26 -6
  333. package/lib/composite-comp/common/components/ProductItem/index.less +11 -10
  334. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +52 -25
  335. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +40 -29
  336. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +67 -8
  337. package/lib/composite-comp/dito/components/FlashDeal/index.js +5 -1
  338. package/lib/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg.png +0 -0
  339. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +24 -38
  340. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -1
  341. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg.png +0 -0
  342. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
  343. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
  344. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
  345. package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +567 -0
  346. package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +122 -0
  347. package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +5 -4
  348. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
  349. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
  350. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +136 -0
  351. package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  352. package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
  353. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +482 -0
  354. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +107 -0
  355. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +33 -15
  356. package/lib/composite-comp/dito/components/Recommend/index.js +5 -6
  357. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +93 -72
  358. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +11 -2
  359. package/lib/composite-comp/dito/components/Recommend/pc/index.js +184 -53
  360. package/lib/composite-comp/dito/components/Recommend/pc/index.less +56 -12
  361. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +49 -20
  362. package/lib/composite-comp/dito/components/SearchBar/imgs/xt-logo.png +0 -0
  363. package/lib/composite-comp/dito/components/SearchBar/index.js +7 -2
  364. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +31 -26
  365. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +15 -3
  366. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +149 -0
  367. package/lib/composite-comp/dito/components/SearchBar/pc/index.less +60 -0
  368. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +16 -6
  369. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +20 -0
  370. package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -2
  371. package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -1
  372. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +129 -0
  373. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +128 -0
  374. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  375. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +194 -0
  376. package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +1 -1
  377. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +18 -3
  378. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
  379. package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +16 -51
  380. package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  381. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
  382. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +80 -49
  383. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +13 -1
  384. package/lib/constants/component-types.js +15 -3
  385. package/lib/constants/index.js +21 -2
  386. package/lib/constants/layout.js +35 -14
  387. package/lib/core/Designer/AppointmentModal/index.js +87 -0
  388. package/lib/core/Designer/AppointmentModal/index.less +23 -0
  389. package/lib/core/Designer/CompListPanel/CompCard/index.js +3 -1
  390. package/lib/core/Designer/CompListPanel/index.js +11 -36
  391. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
  392. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
  393. package/lib/core/Designer/ConfigPanel/index.js +73 -23
  394. package/lib/core/Designer/ConfigPanel/index.less +4 -0
  395. package/lib/core/Designer/History/index.js +34 -28
  396. package/lib/core/Designer/PageCompList/index.js +42 -4
  397. package/lib/core/Designer/PageCompList/index.less +10 -10
  398. package/lib/core/Designer/QuickMenuBar/index.js +38 -4
  399. package/lib/core/Designer/QuickMenuBar/index.less +34 -0
  400. package/lib/core/Designer/ViewArea/index.js +48 -8
  401. package/lib/core/Designer/ViewArea/index.less +40 -4
  402. package/lib/core/Designer/index.js +93 -41
  403. package/lib/core/Renderer/index.js +23 -5
  404. package/lib/decorator/compositeDecorator.js +147 -17
  405. package/lib/decorator/index.js +8 -0
  406. package/lib/decorator/metaDecorator.js +41 -8
  407. package/lib/decorator/updateConfigDecorator.js +76 -0
  408. package/lib/locale/en/en.json +21 -3
  409. package/lib/locale/es/es.json +19 -1
  410. package/lib/locale/id/id.json +21 -3
  411. package/lib/meta-comp/components/Button/editable.js +114 -0
  412. package/lib/meta-comp/components/Button/editable.less +6 -0
  413. package/lib/meta-comp/components/Button/index.js +14 -33
  414. package/lib/meta-comp/components/Button/index.less +3 -2
  415. package/lib/meta-comp/components/Image/image/h5DefImg.png +0 -0
  416. package/lib/meta-comp/components/Image/image/h5Img.png +0 -0
  417. package/lib/meta-comp/components/Image/image/pcDefImg.png +0 -0
  418. package/lib/meta-comp/components/Image/image/pcImg.png +0 -0
  419. package/lib/meta-comp/components/Image/index.js +47 -8
  420. package/lib/meta-comp/components/Image/index.less +7 -3
  421. package/lib/meta-comp/components/Text/index.js +38 -11
  422. package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
  423. package/lib/meta-comp/config-panels/ButtonConfig/index.js +2 -3
  424. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +164 -0
  425. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +26 -0
  426. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +133 -0
  427. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +17 -0
  428. package/lib/meta-comp/config-panels/ImageConfig/index.js +17 -4
  429. package/lib/meta-comp/config-panels/TextConfig/index.js +16 -7
  430. package/lib/mobx/Frame.js +64 -0
  431. package/lib/mobx/Store.js +9 -10
  432. package/lib/mobx/index.js +9 -3
  433. package/lib/utils/businessUtil.js +3 -3
  434. package/lib/utils/coreUtil.js +15 -2
  435. package/package.json +5 -3
@@ -41,6 +41,22 @@ var __extends = void 0 && (void 0).__extends || function () {
41
41
  };
42
42
  }();
43
43
 
44
+ var __assign = void 0 && (void 0).__assign || function () {
45
+ __assign = Object.assign || function (t) {
46
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
47
+ s = arguments[i];
48
+
49
+ for (var p in s) {
50
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
51
+ }
52
+ }
53
+
54
+ return t;
55
+ };
56
+
57
+ return __assign.apply(this, arguments);
58
+ };
59
+
44
60
  var __rest = void 0 && (void 0).__rest || function (s, e) {
45
61
  var t = {};
46
62
 
@@ -69,7 +85,7 @@ function metaDecorator(WrappedComponent) {
69
85
  }; // 元组件点击事件
70
86
 
71
87
  _this.onMetaClick = function (event) {
72
- var _a, _b, _c;
88
+ var _a, _b;
73
89
 
74
90
  if (window.magicDesign.mode === 'renderer') {
75
91
  return;
@@ -90,7 +106,7 @@ function metaDecorator(WrappedComponent) {
90
106
  }
91
107
 
92
108
  _mobx.store.setState({
93
- clickedMeta: (_c = _this.props.data) === null || _c === void 0 ? void 0 : _c.id,
109
+ clickedMeta: metaId,
94
110
  clickedGroup: parentId,
95
111
  clickedFloor: floorId
96
112
  });
@@ -133,7 +149,7 @@ function metaDecorator(WrappedComponent) {
133
149
  return false;
134
150
  };
135
151
 
136
- _this.getStyle = function () {
152
+ _this.getInteractStyle = function () {
137
153
  var _a = _this.state,
138
154
  hoveredMeta = _a.hoveredMeta,
139
155
  clickedMeta = _a.clickedMeta;
@@ -142,7 +158,8 @@ function metaDecorator(WrappedComponent) {
142
158
  var isClick = (data === null || data === void 0 ? void 0 : data.id) === clickedMeta;
143
159
  var style = {
144
160
  boxSizing: 'border-box',
145
- height: '100%'
161
+ height: '100%',
162
+ border: 'none'
146
163
  };
147
164
 
148
165
  if (window.magicDesign.mode === 'renderer') {
@@ -153,6 +170,22 @@ function metaDecorator(WrappedComponent) {
153
170
  }
154
171
 
155
172
  return style;
173
+ }; // text元组件在选中或悬浮时 需要实时展示其宽度
174
+
175
+
176
+ _this.getStyle = function () {
177
+ var _a = _this.props,
178
+ style = _a.style,
179
+ rest = __rest(_a, ["style"]);
180
+
181
+ var newStyle = __assign({}, style);
182
+
183
+ if (rest.data.type === 'TEXT') {
184
+ var width = window.magicDesign.device === 'pc' ? rest.data.content.pcWidth : rest.data.content.width;
185
+ newStyle.width = (Math.min(width, 100) || 100) + "%";
186
+ }
187
+
188
+ return newStyle;
156
189
  };
157
190
 
158
191
  return _this;
@@ -176,13 +209,13 @@ function metaDecorator(WrappedComponent) {
176
209
  Wrapper.prototype.render = function () {
177
210
  var _a = this.props,
178
211
  className = _a.className,
179
- style = _a.style,
180
- rest = __rest(_a, ["className", "style"]);
212
+ rest = __rest(_a, ["className"]);
213
+
214
+ var hoverStyle = this.getInteractStyle(); // console.log(rest);
181
215
 
182
- var hoverStyle = this.getStyle();
183
216
  return /*#__PURE__*/_react["default"].createElement("div", {
184
217
  className: className,
185
- style: style
218
+ style: this.getStyle()
186
219
  }, /*#__PURE__*/_react["default"].createElement("div", {
187
220
  className: "meta_wrap",
188
221
  onClick: this.onMetaClick,
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = updateConfigDecorator;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _constants = require("../constants");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ var __extends = void 0 && (void 0).__extends || function () {
15
+ var _extendStatics = function extendStatics(d, b) {
16
+ _extendStatics = Object.setPrototypeOf || {
17
+ __proto__: []
18
+ } instanceof Array && function (d, b) {
19
+ d.__proto__ = b;
20
+ } || function (d, b) {
21
+ for (var p in b) {
22
+ if (b.hasOwnProperty(p)) d[p] = b[p];
23
+ }
24
+ };
25
+
26
+ return _extendStatics(d, b);
27
+ };
28
+
29
+ return function (d, b) {
30
+ _extendStatics(d, b);
31
+
32
+ function __() {
33
+ this.constructor = d;
34
+ }
35
+
36
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
37
+ };
38
+ }();
39
+ /**
40
+ * 更新组件一级配置面板的装修器
41
+ */
42
+
43
+
44
+ function updateConfigDecorator(WrappedComponent) {
45
+ var Wrapper =
46
+ /** @class */
47
+ function (_super) {
48
+ __extends(Wrapper, _super);
49
+
50
+ function Wrapper() {
51
+ var _this = _super !== null && _super.apply(this, arguments) || this;
52
+
53
+ _this.update = function () {
54
+ _this.setState({});
55
+ };
56
+
57
+ return _this;
58
+ }
59
+
60
+ Wrapper.prototype.componentDidMount = function () {
61
+ window.document.addEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
62
+ };
63
+
64
+ Wrapper.prototype.componentWillUnmount = function () {
65
+ window.document.removeEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
66
+ };
67
+
68
+ Wrapper.prototype.render = function () {
69
+ return /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props);
70
+ };
71
+
72
+ return Wrapper;
73
+ }(_react["default"].Component);
74
+
75
+ return Wrapper;
76
+ }
@@ -1,4 +1,23 @@
1
1
  {
2
+ "IMAGES": "Images",
3
+ "PUBLISH_TIME": "Publish Time",
4
+ "CONFIRM": "Confirm",
5
+ "PUBLISH_LATER": "Publish Later",
6
+ "PUBLISH_NOW": "Publish Now",
7
+ "SEARCH_BOX": "Search Box",
8
+ "PLEASE_INPUT_KEYWORDS": "Please input keywords",
9
+ "SHOPPING_CART": "Shopping Cart",
10
+ "ADD_BUTTON": "Add Button",
11
+ "BUTTON_TAG": "Button Tag",
12
+ "ADD_TAG": "Add Tag",
13
+ "LAST_CATEGORY": "Last Category",
14
+ "SECONDARY_CATEGORY": "Secondary Category",
15
+ "FIRST_CATEGORY": "First Category",
16
+ "ALL_CATEGORY": "All Category",
17
+ "HOME": "Home",
18
+ "ADD_CLICKABLE_AREA": "Add Clickable Area",
19
+ "ADD_AREA": "Add Area",
20
+ "CLICKABLE_AREA": "Clickable Area",
2
21
  "VOUCHER_SUCCESS": "Voucher received successfully!",
3
22
  "NAVIGATION_NAME": "Navigation Name",
4
23
  "ADD_NAVIGATION": "Add Navigation",
@@ -18,8 +37,8 @@
18
37
  "BACKGROUND": "Background",
19
38
  "PLACEHOLDER": "Placeholder",
20
39
  "FONT_STYLE": "Font Style",
21
- "FONT_FAMILY": "font Family",
22
- "FONT_WEIGHT": "font Weight",
40
+ "FONT_FAMILY": "Font Family",
41
+ "FONT_WEIGHT": "Font Weight",
23
42
  "FONT_SIZE": "Font Size",
24
43
  "LINE_SPACING": "Line Spacing",
25
44
  "LINE_COLOR": "Line Color",
@@ -85,7 +104,6 @@
85
104
  "INPUT_FIELD": "Input Field",
86
105
  "CONFIRMATION": "Confirmation",
87
106
  "IMAGE_TAG": "Image Tag",
88
- "BUTTON_TAG": "Button Tag",
89
107
  "SECONDARY_BUTTON_TAG": "Secondary Button Tag",
90
108
  "TITLE": "Title",
91
109
  "HOVER": "Hover",
@@ -1,4 +1,23 @@
1
1
  {
2
+ "IMAGES": "Images",
3
+ "PUBLISH_TIME": "Publish Time",
4
+ "CONFIRM": "Confirm",
5
+ "PUBLISH_LATER": "Publish Later",
6
+ "PUBLISH_NOW": "Publish Now",
7
+ "SEARCH_BOX": "Search Box",
8
+ "PLEASE_INPUT_KEYWORDS": "Please input keywords",
9
+ "SHOPPING_CART": "Shopping Cart",
10
+ "ADD_BUTTON": "Add Button",
11
+ "BUTTON_TAG": "Etiqueta de botón",
12
+ "ADD_TAG": "Add Tag",
13
+ "LAST_CATEGORY": "Last Category",
14
+ "SECONDARY_CATEGORY": "Secondary Category",
15
+ "FIRST_CATEGORY": "First Category",
16
+ "ALL_CATEGORY": "All Category",
17
+ "HOME": "Home",
18
+ "ADD_CLICKABLE_AREA": "Add Clickable Area",
19
+ "ADD_AREA": "Add Area",
20
+ "CLICKABLE_AREA": "Clickable Area",
2
21
  "VOUCHER_SUCCESS": "Voucher received successfully!",
3
22
  "NAVIGATION_NAME": "Navigation Name",
4
23
  "ADD_NAVIGATION": "Add Navigation",
@@ -85,7 +104,6 @@
85
104
  "INPUT_FIELD": "Campo de entrada",
86
105
  "CONFIRMATION": "Confirmación",
87
106
  "IMAGE_TAG": "Etiqueta de imagen",
88
- "BUTTON_TAG": "Etiqueta de botón",
89
107
  "SECONDARY_BUTTON_TAG": "Etiqueta de botón secundario",
90
108
  "TITLE": "Título",
91
109
  "HOVER": "Hover",
@@ -1,4 +1,23 @@
1
1
  {
2
+ "IMAGES": "Images",
3
+ "PUBLISH_TIME": "Publish Time",
4
+ "CONFIRM": "Confirm",
5
+ "PUBLISH_LATER": "Publish Later",
6
+ "PUBLISH_NOW": "Publish Now",
7
+ "SEARCH_BOX": "Search Box",
8
+ "PLEASE_INPUT_KEYWORDS": "Please input keywords",
9
+ "SHOPPING_CART": "Shopping Cart",
10
+ "ADD_BUTTON": "Add Button",
11
+ "BUTTON_TAG": "Button Tag",
12
+ "ADD_TAG": "Add Tag",
13
+ "LAST_CATEGORY": "Last Category",
14
+ "SECONDARY_CATEGORY": "Secondary Category",
15
+ "FIRST_CATEGORY": "First Category",
16
+ "ALL_CATEGORY": "All Category",
17
+ "HOME": "Home",
18
+ "ADD_CLICKABLE_AREA": "Add Clickable Area",
19
+ "ADD_AREA": "Add Area",
20
+ "CLICKABLE_AREA": "Clickable Area",
2
21
  "VOUCHER_SUCCESS": "Voucher received successfully!",
3
22
  "NAVIGATION_NAME": "Navigation Name",
4
23
  "ADD_NAVIGATION": "Add Navigation",
@@ -18,8 +37,8 @@
18
37
  "BACKGROUND": "Background",
19
38
  "PLACEHOLDER": "Placeholder",
20
39
  "FONT_STYLE": "Font Style",
21
- "FONT_FAMILY": "font Family",
22
- "FONT_WEIGHT": "font Weight",
40
+ "FONT_FAMILY": "Font Family",
41
+ "FONT_WEIGHT": "Font Weight",
23
42
  "FONT_SIZE": "Font Size",
24
43
  "LINE_SPACING": "Line Spacing",
25
44
  "LINE_COLOR": "Line Color",
@@ -85,7 +104,6 @@
85
104
  "INPUT_FIELD": "Input Field",
86
105
  "CONFIRMATION": "Confirmation",
87
106
  "IMAGE_TAG": "Image Tag",
88
- "BUTTON_TAG": "Button Tag",
89
107
  "SECONDARY_BUTTON_TAG": "Secondary Button Tag",
90
108
  "TITLE": "Title",
91
109
  "HOVER": "Hover",
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ require("./editable.less");
13
+
14
+ var _coreUtil = require("../../../utils/coreUtil");
15
+
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+
20
+ var __extends = void 0 && (void 0).__extends || function () {
21
+ var _extendStatics = function extendStatics(d, b) {
22
+ _extendStatics = Object.setPrototypeOf || {
23
+ __proto__: []
24
+ } instanceof Array && function (d, b) {
25
+ d.__proto__ = b;
26
+ } || function (d, b) {
27
+ for (var p in b) {
28
+ if (b.hasOwnProperty(p)) d[p] = b[p];
29
+ }
30
+ };
31
+
32
+ return _extendStatics(d, b);
33
+ };
34
+
35
+ return function (d, b) {
36
+ _extendStatics(d, b);
37
+
38
+ function __() {
39
+ this.constructor = d;
40
+ }
41
+
42
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
+ };
44
+ }();
45
+
46
+ var __assign = void 0 && (void 0).__assign || function () {
47
+ __assign = Object.assign || function (t) {
48
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
49
+ s = arguments[i];
50
+
51
+ for (var p in s) {
52
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
53
+ }
54
+ }
55
+
56
+ return t;
57
+ };
58
+
59
+ return __assign.apply(this, arguments);
60
+ };
61
+ /**
62
+ * 编辑button名称,被动触发元组件的hover事件时会刷新组件,导致contenteditable的光标位置初始化
63
+ */
64
+
65
+
66
+ var editable =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(editable, _super);
70
+
71
+ function editable() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+
74
+ _this.preData = '';
75
+ _this.preDevice = '';
76
+ return _this;
77
+ }
78
+
79
+ editable.prototype.shouldComponentUpdate = function (nextProps) {
80
+ var should1 = JSON.stringify(nextProps.data) != this.preData;
81
+ var should2 = window.magicDesign.device != this.preDevice;
82
+ var result = should1 || should2;
83
+ return result;
84
+ };
85
+
86
+ editable.prototype.render = function () {
87
+ var _this = this;
88
+
89
+ var _a = this.props,
90
+ data = _a.data,
91
+ readonly = _a.readonly;
92
+ this.preData = JSON.stringify(data);
93
+ this.preDevice = window.magicDesign.device;
94
+ return /*#__PURE__*/_react["default"].createElement("span", {
95
+ className: "item",
96
+ contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
97
+ onInput: function onInput(e) {
98
+ var text = e.target.textContent;
99
+ data.text = text;
100
+ /** 主动更新历史数据避免render */
101
+
102
+ _this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
103
+ text: text
104
+ }));
105
+ },
106
+ suppressContentEditableWarning: true
107
+ }, data.text);
108
+ };
109
+
110
+ return editable;
111
+ }(_react.Component);
112
+
113
+ var _default = editable;
114
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ .item {
2
+ width: 100%;
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
@@ -11,7 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  require("./index.less");
13
13
 
14
- var _businessUtil = require("../../../utils/businessUtil");
14
+ var _editable = _interopRequireDefault(require("./editable"));
15
15
 
16
16
  var _coreUtil = require("../../../utils/coreUtil");
17
17
 
@@ -88,19 +88,9 @@ function (_super) {
88
88
  _this.state = {
89
89
  hover: false
90
90
  };
91
- /** 备份历史数据 比对不一致时渲染 */
92
-
93
- _this.preData = '';
94
91
  return _this;
95
92
  }
96
93
 
97
- Button.prototype.shouldComponentUpdate = function (nextProps) {
98
- var should1 = JSON.stringify(nextProps.data) != this.preData;
99
- var should2 = window.magicDesign.device != this.preDevice;
100
- var result = should1 || should2;
101
- return result;
102
- };
103
-
104
94
  Button.prototype.render = function () {
105
95
  var _this = this;
106
96
 
@@ -108,8 +98,7 @@ function (_super) {
108
98
 
109
99
  var _b = this.props,
110
100
  data = _b.data,
111
- className = _b.className,
112
- readonly = _b.readonly;
101
+ className = _b.className;
113
102
  var hover = this.state.hover;
114
103
  this.preData = JSON.stringify(data);
115
104
  this.preDevice = window.magicDesign.device;
@@ -122,6 +111,14 @@ function (_super) {
122
111
  fontSize: window.magicDesign.device == 'pc' ? data.buttonText.pcFontSize : data.buttonText.fontSize
123
112
  });
124
113
 
114
+ if (data.spacing) {
115
+ if (window.magicDesign.device == 'pc') {
116
+ style = __assign(__assign({}, style), data.spacing.pc);
117
+ } else {
118
+ style = __assign(__assign({}, style), data.spacing.mobile);
119
+ }
120
+ }
121
+
125
122
  var iconUrl = data.buttonIcon.iconUrl;
126
123
  var iconLayout = data.buttonIcon.layout;
127
124
 
@@ -137,22 +134,6 @@ function (_super) {
137
134
  iconLayout = data.hover.buttonIcon.layout;
138
135
  }
139
136
 
140
- var btnText = /*#__PURE__*/_react["default"].createElement("span", {
141
- className: "item",
142
- contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
143
- onInput: function onInput(e) {
144
- var text = e.target.textContent;
145
- data.text = text;
146
- /** 主动更新历史数据避免render */
147
-
148
- _this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
149
- text: text
150
- }));
151
- },
152
- suppressContentEditableWarning: true
153
- }, data.text);
154
-
155
- var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
156
137
  return /*#__PURE__*/_react["default"].createElement("div", {
157
138
  className: (0, _classnames["default"])('m-meta-button', className),
158
139
  onClick: function onClick() {
@@ -168,16 +149,16 @@ function (_super) {
168
149
  hover: false
169
150
  });
170
151
  },
171
- style: __assign(__assign({}, style), wrapStyle)
152
+ style: __assign({}, style)
172
153
  }, /*#__PURE__*/_react["default"].createElement("div", {
173
154
  className: (0, _classnames["default"])('btnContent', {
174
155
  horizontal: iconLayout === 'left' || iconLayout === 'right'
175
156
  })
176
- }, (iconLayout === 'right' || iconLayout === 'bottom') && btnText, iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
157
+ }, (iconLayout === 'right' || iconLayout === 'bottom') && /*#__PURE__*/_react["default"].createElement(_editable["default"], this.props), iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
177
158
  alt: "",
178
- className: "item",
159
+ className: "icon",
179
160
  src: iconUrl
180
- }), (iconLayout === 'left' || iconLayout === 'top') && btnText));
161
+ }), (iconLayout === 'left' || iconLayout === 'top') && /*#__PURE__*/_react["default"].createElement(_editable["default"], this.props)));
181
162
  };
182
163
 
183
164
  Button.defaultProps = {
@@ -2,8 +2,9 @@
2
2
  transition: all 0.25s;
3
3
 
4
4
  .btnContent {
5
+ width: 100%;
5
6
  cursor: pointer;
6
- display: inline-flex;
7
+ display: flex;
7
8
  align-items: center;
8
9
  justify-content: center;
9
10
  flex-direction: column;
@@ -14,7 +15,7 @@
14
15
 
15
16
  img {
16
17
  height: 20px;
17
- margin-right: 5px;
18
+ margin: 0 5px;
18
19
  }
19
20
  }
20
21
  }
@@ -11,6 +11,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  require("./index.less");
13
13
 
14
+ var _h5DefImg = _interopRequireDefault(require("./image/h5DefImg.png"));
15
+
16
+ var _pcDefImg = _interopRequireDefault(require("./image/pcDefImg.png"));
17
+
14
18
  var _coreUtil = require("../../../utils/coreUtil");
15
19
 
16
20
  var _decorator = require("../../../decorator");
@@ -63,9 +67,11 @@ function (_super) {
63
67
  function Image() {
64
68
  var _this = _super !== null && _super.apply(this, arguments) || this;
65
69
 
70
+ _this.imgRef = /*#__PURE__*/_react["default"].createRef();
66
71
  _this.state = {
67
72
  // 当仅作为一个图片时,鼠标移上去,hover状态
68
- hoverImgSrc: false
73
+ hoverImgSrc: false,
74
+ scale: 1
69
75
  };
70
76
 
71
77
  _this.getStyle = function () {
@@ -74,6 +80,7 @@ function (_super) {
74
80
  hoverState = _a.hoverState,
75
81
  maxHeight = _a.maxHeight,
76
82
  maxWidth = _a.maxWidth,
83
+ minHeight = _a.minHeight,
77
84
  minWidth = _a.minWidth,
78
85
  limitWidthHeight = _a.limitWidthHeight,
79
86
  scale = _a.scale;
@@ -82,17 +89,21 @@ function (_super) {
82
89
 
83
90
  if (data.hover.open && data.hover.backgroundType === 'enlarge' && (hoverState || hoverImgSrc)) {
84
91
  // return { transform: `scale(${data.hover.magnification})` };
85
- obj.transform = "scale(" + data.hover.magnification / 2 + ")";
92
+ obj.transform = "scale(" + data.hover.magnification + ")";
86
93
  }
87
94
 
88
95
  if (maxHeight) {
89
96
  obj.maxHeight = maxHeight;
90
97
  }
91
98
 
92
- if (maxWidth) {
99
+ if (maxWidth || maxWidth === 0) {
93
100
  obj.maxWidth = maxWidth;
94
101
  }
95
102
 
103
+ if (minHeight) {
104
+ obj.minHeight = minHeight;
105
+ }
106
+
96
107
  if (minWidth) {
97
108
  obj.minWidth = minWidth;
98
109
  }
@@ -144,6 +155,8 @@ function (_super) {
144
155
  }
145
156
 
146
157
  Image.prototype.render = function () {
158
+ var _this = this;
159
+
147
160
  var _a, _b;
148
161
 
149
162
  var _c = this.props,
@@ -161,11 +174,13 @@ function (_super) {
161
174
 
162
175
  if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
163
176
  srcImg = srcImg.replace('ecommerce/static', 'static');
164
- } // if (!srcImg) {
165
- // srcImg = defaultImg;
166
- // }
177
+ }
167
178
 
179
+ if (!srcImg) {
180
+ srcImg = (0, _coreUtil.isPc)() ? _pcDefImg["default"] : _h5DefImg["default"];
181
+ }
168
182
 
183
+ var areas = data.content.openHotArea && ((0, _coreUtil.isPc)() ? data.content.pcAreas : data.content.h5Areas);
169
184
  return /*#__PURE__*/_react["default"].createElement("div", {
170
185
  className: (0, _classnames["default"])('m-meta-image', {
171
186
  backgroundImg: isBackground
@@ -173,12 +188,36 @@ function (_super) {
173
188
  onClick: function onClick() {
174
189
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
175
190
  }
176
- }, srcImg && /*#__PURE__*/_react["default"].createElement("img", {
191
+ }, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
192
+ ref: this.imgRef,
193
+ onLoad: function onLoad() {
194
+ var scale = _this.imgRef.current.clientWidth / 600;
195
+
196
+ _this.setState({
197
+ scale: scale
198
+ });
199
+ },
177
200
  onMouseEnter: this.mouseEnterImg,
178
201
  onMouseLeave: this.mouseLeaveImg,
179
202
  src: srcImg,
180
203
  style: this.getStyle()
181
- }));
204
+ }), areas && areas.length > 0 && areas.map(function (v, i) {
205
+ var aStyle = {
206
+ position: 'absolute',
207
+ top: parseInt(v.y * _this.state.scale),
208
+ left: parseInt(v.x * _this.state.scale),
209
+ width: parseInt(v.width * _this.state.scale),
210
+ height: parseInt(v.height * _this.state.scale)
211
+ };
212
+ return /*#__PURE__*/_react["default"].createElement("a", {
213
+ key: i,
214
+ onClick: function onClick(e) {
215
+ e.stopPropagation();
216
+ (0, _coreUtil.clickUrl)(v.inputVal);
217
+ },
218
+ style: aStyle
219
+ });
220
+ })));
182
221
  };
183
222
 
184
223
  Image.defaultProps = {