@fonixtree/magic-design 0.0.78 → 0.0.80

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 (339) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +24 -12
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +24 -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/layout-navigation-normal.png +0 -0
  9. package/es/assets/less/common.less +2 -2
  10. package/es/assets/less/modal.less +7 -2
  11. package/es/common/Button/index.js +2 -1
  12. package/es/common/Button/index.less +5 -0
  13. package/es/common/ButtonIconLayout/index.less +4 -2
  14. package/es/common/Collapse/index.js +14 -4
  15. package/es/common/FontStyles/index.less +1 -1
  16. package/es/common/GroupList/index.js +4 -3
  17. package/es/common/ImageModal/index.js +31 -26
  18. package/es/common/ImageModal/index.less +6 -1
  19. package/es/common/ImgArea/components/Crop.js +267 -0
  20. package/es/common/ImgArea/components/Icons.js +44 -0
  21. package/es/common/ImgArea/components/MultiCrops.js +210 -0
  22. package/es/common/ImgArea/index.js +11 -0
  23. package/es/common/LinkModal/BundleCampaign/index.js +17 -17
  24. package/es/common/LinkModal/CustomTable/index.js +1 -0
  25. package/es/common/LinkModal/FilteredProductModal/index.js +3 -3
  26. package/es/common/LinkModal/FilteredProductModal/index.less +2 -3
  27. package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
  28. package/es/common/LinkModal/index.less +1 -1
  29. package/es/common/MagicLink/index.js +89 -0
  30. package/es/common/MagicLink/index.less +0 -0
  31. package/es/common/ProductModal/index.js +1 -1
  32. package/es/common/ProductModal/index.less +12 -7
  33. package/es/common/UrlPicker/index.js +6 -2
  34. package/es/common/UrlPicker/index.less +12 -1
  35. package/es/common/index.js +8 -0
  36. package/es/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
  37. package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -10
  38. package/es/composite-comp/bol/components/Banner/pc/index.js +3 -6
  39. package/es/composite-comp/bol/components/Button/defaultJSON.js +40 -70
  40. package/es/composite-comp/bol/components/Button/index.js +8 -14
  41. package/es/composite-comp/bol/components/Button/index.less +1 -0
  42. package/es/composite-comp/bol/components/Carousel/defaultJSON.js +12 -16
  43. package/es/composite-comp/bol/components/Carousel/index.js +1 -6
  44. package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -8
  45. package/es/composite-comp/bol/components/Carousel/pc/index.js +15 -7
  46. package/es/composite-comp/bol/components/Carousel/pc/index.less +13 -5
  47. package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
  48. package/es/composite-comp/bol/components/ImageText/defaultJSON.js +27 -167
  49. package/es/composite-comp/bol/components/ImageText/mobile/index.js +2 -5
  50. package/es/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
  51. package/es/composite-comp/bol/components/ImageText/pc/index.js +46 -18
  52. package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +2 -2
  53. package/es/composite-comp/bol/components/Newsletter/index.js +1 -6
  54. package/es/composite-comp/bol/components/Tag/defaultJSON.js +38 -48
  55. package/es/composite-comp/bol/components/Tag/index.js +8 -14
  56. package/es/composite-comp/bol/components/Tag/index.less +1 -0
  57. package/es/composite-comp/bol/components/Text/defaultJSON.js +4 -6
  58. package/es/composite-comp/bol/components/Text/index.js +4 -8
  59. package/es/composite-comp/bol/components/Text/index.less +3 -3
  60. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  61. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  62. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  63. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  64. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -2
  65. package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  66. package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
  67. package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +2 -1
  68. package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +6 -4
  69. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +9 -17
  70. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  71. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  72. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +7 -4
  73. package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
  74. package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  75. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  76. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  77. package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +8 -13
  78. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +10 -5
  79. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +8 -0
  80. package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  81. package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  82. package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
  83. package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
  84. package/es/composite-comp/common/components/ProductItem/index.js +1 -1
  85. package/es/composite-comp/common/components/ProductItem/index.less +9 -9
  86. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +24 -13
  87. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +25 -25
  88. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +62 -2
  89. package/es/composite-comp/dito/components/FlashDeal/index.js +5 -1
  90. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -1
  91. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
  92. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
  93. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
  94. package/es/composite-comp/dito/components/FlashDeal/pc/index.js +578 -0
  95. package/es/composite-comp/dito/components/FlashDeal/pc/index.less +121 -0
  96. package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +5 -4
  97. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
  98. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
  99. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
  100. package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  101. package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
  102. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +478 -0
  103. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
  104. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +30 -12
  105. package/es/composite-comp/dito/components/Recommend/index.js +5 -6
  106. package/es/composite-comp/dito/components/Recommend/mobile/index.js +45 -37
  107. package/es/composite-comp/dito/components/Recommend/mobile/index.less +10 -2
  108. package/es/composite-comp/dito/components/Recommend/pc/index.js +134 -22
  109. package/es/composite-comp/dito/components/Recommend/pc/index.less +54 -12
  110. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +45 -19
  111. package/es/composite-comp/dito/components/SearchBar/index.js +7 -2
  112. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +29 -26
  113. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
  114. package/es/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
  115. package/es/composite-comp/dito/components/SearchBar/pc/index.less +59 -0
  116. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +16 -6
  117. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +20 -0
  118. package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +12 -2
  119. package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -1
  120. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +129 -0
  121. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +128 -0
  122. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  123. package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +194 -0
  124. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +16 -3
  125. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
  126. package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +15 -51
  127. package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  128. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
  129. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +80 -49
  130. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +13 -1
  131. package/es/constants/component-types.js +13 -3
  132. package/es/constants/index.js +20 -2
  133. package/es/constants/layout.js +34 -8
  134. package/es/core/Designer/CompListPanel/index.js +8 -33
  135. package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
  136. package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
  137. package/es/core/Designer/ConfigPanel/index.js +72 -23
  138. package/es/core/Designer/ConfigPanel/index.less +4 -0
  139. package/es/core/Designer/History/index.js +34 -28
  140. package/es/core/Designer/PageCompList/index.js +13 -3
  141. package/es/core/Designer/PageCompList/index.less +10 -10
  142. package/es/core/Designer/QuickMenuBar/index.js +1 -1
  143. package/es/core/Designer/ViewArea/index.js +20 -6
  144. package/es/core/Designer/index.js +43 -37
  145. package/es/core/Renderer/index.js +21 -5
  146. package/es/decorator/compositeDecorator.js +45 -12
  147. package/es/decorator/index.js +8 -0
  148. package/es/decorator/metaDecorator.js +4 -3
  149. package/es/decorator/updateConfigDecorator.js +76 -0
  150. package/es/locale/en/en.json +14 -1
  151. package/es/locale/es/es.json +14 -1
  152. package/es/locale/id/id.json +14 -1
  153. package/es/meta-comp/components/Button/editable.js +114 -0
  154. package/es/meta-comp/components/Button/editable.less +6 -0
  155. package/es/meta-comp/components/Button/index.js +14 -33
  156. package/es/meta-comp/components/Button/index.less +3 -2
  157. package/es/meta-comp/components/Image/index.js +39 -8
  158. package/es/meta-comp/components/Image/index.less +7 -4
  159. package/es/meta-comp/components/Text/index.js +28 -11
  160. package/es/meta-comp/config-panels/BaseConfig.js +8 -10
  161. package/es/meta-comp/config-panels/ButtonConfig/index.js +2 -3
  162. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +164 -0
  163. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +26 -0
  164. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +133 -0
  165. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +17 -0
  166. package/es/meta-comp/config-panels/ImageConfig/index.js +17 -4
  167. package/es/meta-comp/config-panels/TextConfig/index.js +15 -6
  168. package/es/mobx/Store.js +6 -10
  169. package/es/utils/coreUtil.js +15 -2
  170. package/lib/assets/fonts/magic-box-iconfont.css +24 -12
  171. package/lib/assets/fonts/magic-box-iconfont.css.bak +24 -12
  172. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  173. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  174. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  175. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  176. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  177. package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  178. package/lib/assets/less/common.less +2 -2
  179. package/lib/assets/less/modal.less +7 -2
  180. package/lib/common/Button/index.js +2 -1
  181. package/lib/common/Button/index.less +5 -0
  182. package/lib/common/ButtonIconLayout/index.less +4 -2
  183. package/lib/common/Collapse/index.js +14 -4
  184. package/lib/common/FontStyles/index.less +1 -1
  185. package/lib/common/GroupList/index.js +4 -3
  186. package/lib/common/ImageModal/index.js +31 -26
  187. package/lib/common/ImageModal/index.less +6 -1
  188. package/lib/common/ImgArea/components/Crop.js +267 -0
  189. package/lib/common/ImgArea/components/Icons.js +44 -0
  190. package/lib/common/ImgArea/components/MultiCrops.js +210 -0
  191. package/lib/common/ImgArea/index.js +11 -0
  192. package/lib/common/LinkModal/BundleCampaign/index.js +17 -17
  193. package/lib/common/LinkModal/CustomTable/index.js +1 -0
  194. package/lib/common/LinkModal/FilteredProductModal/index.js +3 -3
  195. package/lib/common/LinkModal/FilteredProductModal/index.less +2 -3
  196. package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
  197. package/lib/common/LinkModal/index.less +1 -1
  198. package/lib/common/MagicLink/index.js +89 -0
  199. package/lib/common/MagicLink/index.less +0 -0
  200. package/lib/common/ProductModal/index.js +1 -1
  201. package/lib/common/ProductModal/index.less +12 -7
  202. package/lib/common/UrlPicker/index.js +6 -2
  203. package/lib/common/UrlPicker/index.less +12 -1
  204. package/lib/common/index.js +8 -0
  205. package/lib/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
  206. package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -10
  207. package/lib/composite-comp/bol/components/Banner/pc/index.js +3 -6
  208. package/lib/composite-comp/bol/components/Button/defaultJSON.js +40 -70
  209. package/lib/composite-comp/bol/components/Button/index.js +8 -14
  210. package/lib/composite-comp/bol/components/Button/index.less +1 -0
  211. package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +12 -16
  212. package/lib/composite-comp/bol/components/Carousel/index.js +1 -6
  213. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -8
  214. package/lib/composite-comp/bol/components/Carousel/pc/index.js +15 -7
  215. package/lib/composite-comp/bol/components/Carousel/pc/index.less +13 -5
  216. package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
  217. package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +27 -167
  218. package/lib/composite-comp/bol/components/ImageText/mobile/index.js +2 -5
  219. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
  220. package/lib/composite-comp/bol/components/ImageText/pc/index.js +46 -18
  221. package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +2 -2
  222. package/lib/composite-comp/bol/components/Newsletter/index.js +1 -6
  223. package/lib/composite-comp/bol/components/Tag/defaultJSON.js +38 -48
  224. package/lib/composite-comp/bol/components/Tag/index.js +8 -14
  225. package/lib/composite-comp/bol/components/Tag/index.less +1 -0
  226. package/lib/composite-comp/bol/components/Text/defaultJSON.js +4 -6
  227. package/lib/composite-comp/bol/components/Text/index.js +4 -8
  228. package/lib/composite-comp/bol/components/Text/index.less +3 -3
  229. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
  230. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
  231. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
  232. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  233. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -2
  234. package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
  235. package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
  236. package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +2 -1
  237. package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +6 -4
  238. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +9 -17
  239. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
  240. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
  241. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +7 -4
  242. package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
  243. package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  244. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
  245. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
  246. package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +8 -13
  247. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +10 -5
  248. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +8 -0
  249. package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
  250. package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
  251. package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
  252. package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
  253. package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
  254. package/lib/composite-comp/common/components/ProductItem/index.less +9 -9
  255. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +24 -13
  256. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +25 -25
  257. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +62 -2
  258. package/lib/composite-comp/dito/components/FlashDeal/index.js +5 -1
  259. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -1
  260. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
  261. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
  262. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
  263. package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +578 -0
  264. package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +121 -0
  265. package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +5 -4
  266. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
  267. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
  268. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
  269. package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
  270. package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
  271. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +478 -0
  272. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
  273. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +30 -12
  274. package/lib/composite-comp/dito/components/Recommend/index.js +5 -6
  275. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +45 -37
  276. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +10 -2
  277. package/lib/composite-comp/dito/components/Recommend/pc/index.js +134 -22
  278. package/lib/composite-comp/dito/components/Recommend/pc/index.less +54 -12
  279. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +45 -19
  280. package/lib/composite-comp/dito/components/SearchBar/index.js +7 -2
  281. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +29 -26
  282. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
  283. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
  284. package/lib/composite-comp/dito/components/SearchBar/pc/index.less +59 -0
  285. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +16 -6
  286. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +20 -0
  287. package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +12 -2
  288. package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -1
  289. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +129 -0
  290. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +128 -0
  291. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
  292. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +194 -0
  293. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +16 -3
  294. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
  295. package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +15 -51
  296. package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
  297. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
  298. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +80 -49
  299. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +13 -1
  300. package/lib/constants/component-types.js +13 -3
  301. package/lib/constants/index.js +20 -2
  302. package/lib/constants/layout.js +34 -8
  303. package/lib/core/Designer/CompListPanel/index.js +8 -33
  304. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
  305. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
  306. package/lib/core/Designer/ConfigPanel/index.js +72 -23
  307. package/lib/core/Designer/ConfigPanel/index.less +4 -0
  308. package/lib/core/Designer/History/index.js +34 -28
  309. package/lib/core/Designer/PageCompList/index.js +13 -3
  310. package/lib/core/Designer/PageCompList/index.less +10 -10
  311. package/lib/core/Designer/QuickMenuBar/index.js +1 -1
  312. package/lib/core/Designer/ViewArea/index.js +20 -6
  313. package/lib/core/Designer/index.js +43 -37
  314. package/lib/core/Renderer/index.js +21 -5
  315. package/lib/decorator/compositeDecorator.js +45 -12
  316. package/lib/decorator/index.js +8 -0
  317. package/lib/decorator/metaDecorator.js +4 -3
  318. package/lib/decorator/updateConfigDecorator.js +76 -0
  319. package/lib/locale/en/en.json +14 -1
  320. package/lib/locale/es/es.json +14 -1
  321. package/lib/locale/id/id.json +14 -1
  322. package/lib/meta-comp/components/Button/editable.js +114 -0
  323. package/lib/meta-comp/components/Button/editable.less +6 -0
  324. package/lib/meta-comp/components/Button/index.js +14 -33
  325. package/lib/meta-comp/components/Button/index.less +3 -2
  326. package/lib/meta-comp/components/Image/index.js +39 -8
  327. package/lib/meta-comp/components/Image/index.less +7 -4
  328. package/lib/meta-comp/components/Text/index.js +28 -11
  329. package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
  330. package/lib/meta-comp/config-panels/ButtonConfig/index.js +2 -3
  331. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +164 -0
  332. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +26 -0
  333. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +133 -0
  334. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +17 -0
  335. package/lib/meta-comp/config-panels/ImageConfig/index.js +17 -4
  336. package/lib/meta-comp/config-panels/TextConfig/index.js +15 -6
  337. package/lib/mobx/Store.js +6 -10
  338. package/lib/utils/coreUtil.js +15 -2
  339. package/package.json +5 -3
@@ -15,8 +15,6 @@ var _AlignSelector = require("../../../../../common/AlignSelector");
15
15
 
16
16
  var _components = require("../../../../../meta-comp/components");
17
17
 
18
- var _businessUtil = require("../../../../../utils/businessUtil");
19
-
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
19
 
22
20
  var __extends = void 0 && (void 0).__extends || function () {
@@ -104,10 +102,9 @@ function (_super) {
104
102
  ImageTextMobile.prototype.render = function () {
105
103
  var _this = this;
106
104
 
107
- var data = this.props.data; // const { ready } = this.state;
108
- // console.log('----imagetext mobile', data);
105
+ var data = this.props.data; // console.log('----imagetext mobile', data);
109
106
 
110
- var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
107
+ var wrapStyle = {};
111
108
  wrapStyle.textAlign = data.customize.align; // if (data.background.bgType === 'color') {
112
109
  // wrapStyle.backgroundColor = data.background.color;
113
110
  // wrapStyle.opacity = data.background.opacity ? data.background.opacity : 1;
@@ -59,8 +59,8 @@
59
59
  }
60
60
  .card-btn-wrap {
61
61
  display: flex;
62
- .card-first-btn {
63
- margin-right: 12px;
62
+ .card-second-btn {
63
+ margin-left: 12px;
64
64
  }
65
65
  }
66
66
  }
@@ -94,8 +94,8 @@
94
94
  }
95
95
  .card-btn-wrap {
96
96
  display: flex;
97
- .card-first-btn {
98
- margin-right: 12px;
97
+ .card-second-btn {
98
+ margin-left: 12px;
99
99
  }
100
100
  }
101
101
  }
@@ -135,8 +135,8 @@
135
135
  flex-direction: column;
136
136
  }
137
137
 
138
- .card-second-btn {
139
- margin-top: 8px;
138
+ .card-first-btn, .card-second-btn {
139
+ margin-bottom: 8px;
140
140
  }
141
141
  }
142
142
  .card-margin-bottom {
@@ -170,8 +170,8 @@
170
170
  }
171
171
  .card-btn-wrap {
172
172
  display: flex;
173
- .card-first-btn {
174
- margin-right: 12px;
173
+ .card-second-btn {
174
+ margin-left: 12px;
175
175
  }
176
176
  }
177
177
  }
@@ -11,6 +11,8 @@ require("./index.less");
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _lodash = require("lodash");
15
+
14
16
  var _AlignSelector = require("../../../../../common/AlignSelector");
15
17
 
16
18
  var _components = require("../../../../../meta-comp/components");
@@ -63,7 +65,7 @@ var __assign = void 0 && (void 0).__assign || function () {
63
65
 
64
66
  var maxWidthAndHeight = {
65
67
  normal: 410,
66
- outside: 100,
68
+ outside: 86,
67
69
  center: 410
68
70
  };
69
71
 
@@ -76,17 +78,26 @@ function (_super) {
76
78
  var _this = _super !== null && _super.apply(this, arguments) || this;
77
79
 
78
80
  _this.state = {
79
- hoverIndex: -1
80
- }; // componentDidMount() {
81
- // this.distroy = autorun(() => {
82
- // this.setState({
83
- // clickedGroup: store.clickedGroup,
84
- // });
85
- // });
86
- // }
87
- // componentWillUnmount() {
88
- // this.distroy();
89
- // }
81
+ hoverIndex: -1,
82
+ currentMaxWidth: 410
83
+ };
84
+
85
+ _this.listenCardWidth = function () {
86
+ var _a;
87
+
88
+ var data = _this.props.data;
89
+
90
+ try {
91
+ var cardWidth = ((_a = document.querySelector('.group-wrap .one-card')) === null || _a === void 0 ? void 0 : _a.offsetWidth) - 48;
92
+ var maxLayoutWidth = maxWidthAndHeight[data.customize.layout.pcLayout];
93
+
94
+ _this.setState({
95
+ currentMaxWidth: Math.min(cardWidth, maxLayoutWidth)
96
+ });
97
+ } catch (error) {
98
+ console.log(error);
99
+ }
100
+ };
90
101
 
91
102
  _this.calcWidth = function (num) {
92
103
  return (100 - (num - 1) * 2) / num + "%";
@@ -114,15 +125,32 @@ function (_super) {
114
125
  return _this;
115
126
  }
116
127
 
128
+ ImageTextPc.prototype.componentDidMount = function () {
129
+ var data = this.props.data;
130
+ this.layout = data.customize.layout.pcLayout;
131
+ this.listenCardWidth();
132
+ window.addEventListener('resize', (0, _lodash.debounce)(this.listenCardWidth));
133
+ };
134
+
135
+ ImageTextPc.prototype.componentWillUnmount = function () {
136
+ window.removeEventListener('resize', this.listenCardWidth);
137
+ };
138
+
139
+ ImageTextPc.prototype.componentWillReceiveProps = function (nextProps) {
140
+ if (nextProps.data.customize.layout.pcLayout !== this.layout) {
141
+ this.layout = nextProps.data.customize.layout.pcLayout;
142
+ this.listenCardWidth();
143
+ }
144
+ };
145
+
117
146
  ImageTextPc.prototype.render = function () {
118
147
  var _this = this;
119
148
 
120
149
  var data = this.props.data;
121
- var hoverIndex = this.state.hoverIndex; // console.log('====================================');
122
- // console.log(data);
123
- // console.log('====================================');
124
-
125
- var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
150
+ var _a = this.state,
151
+ hoverIndex = _a.hoverIndex,
152
+ currentMaxWidth = _a.currentMaxWidth;
153
+ var wrapStyle = {};
126
154
  wrapStyle.alignItems = _AlignSelector.alignItemMap[data.customize.align];
127
155
  return /*#__PURE__*/_react["default"].createElement("div", {
128
156
  className: (0, _classnames["default"])('image-text-pc', data.customize.layout.pcLayout),
@@ -156,7 +184,7 @@ function (_super) {
156
184
  data: hoverIndex == i ? source.hover.image : source.image,
157
185
  limitWidthHeight: true,
158
186
  maxHeight: maxWidthAndHeight[data.customize.layout.pcLayout],
159
- maxWidth: maxWidthAndHeight[data.customize.layout.pcLayout],
187
+ maxWidth: currentMaxWidth,
160
188
  scale: 0.5
161
189
  })), (source.title.open && data.customize.layout.pcLayout !== 'center' && hoverIndex != i || hoverIndex == i && source.hover.title.open && data.customize.layout.pcLayout !== 'center') && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
162
190
  className: "card-title",
@@ -111,12 +111,12 @@ var getDefaultJSON = function getDefaultJSON() {
111
111
  pc: {
112
112
  paddingTop: 10,
113
113
  paddingBottom: 10,
114
- marginBottom: 0
114
+ marginBottom: window.magicDesign.compSpacing * 1.5
115
115
  },
116
116
  mobile: {
117
117
  paddingTop: 10,
118
118
  paddingBottom: 10,
119
- marginBottom: 0
119
+ marginBottom: window.magicDesign.compSpacing
120
120
  }
121
121
  },
122
122
  customize: {
@@ -19,8 +19,6 @@ var _Text = require("../../../../meta-comp/components/Text");
19
19
 
20
20
  require("./index.less");
21
21
 
22
- var _businessUtil = require("../../../../utils/businessUtil");
23
-
24
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
23
 
26
24
  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); }
@@ -90,15 +88,12 @@ function (_super) {
90
88
  // wrapStyle.backgroundPosition = 'center';
91
89
  // }
92
90
 
93
- var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
94
-
95
91
  var style = __assign({}, (0, _Text.contentStyle)(nodeData.content.inputField.content));
96
92
 
97
93
  Reflect.deleteProperty(style, 'width');
98
94
  return /*#__PURE__*/_react["default"].createElement("div", {
99
95
  className: (0, _classnames["default"])('newsletter-wrap', (_a = {}, _a[nodeData.customize.layout] = true, _a[nodeData.customize.align] = true, _a[window.magicDesign.device] = true, _a)),
100
- onClick: this.onComponentClick,
101
- style: wrapStyle
96
+ onClick: this.onComponentClick
102
97
  }, /*#__PURE__*/_react["default"].createElement("div", {
103
98
  className: "top-wrap"
104
99
  }, nodeData.content.inputField.open && /*#__PURE__*/_react["default"].createElement("div", {
@@ -3,60 +3,51 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getDefaultJSON = void 0;
6
+ exports.tagGroupSourceJSON = exports.getDefaultJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
- var __assign = void 0 && (void 0).__assign || function () {
11
- __assign = Object.assign || function (t) {
12
- for (var s, i = 1, n = arguments.length; i < n; i++) {
13
- s = arguments[i];
14
-
15
- for (var p in s) {
16
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
17
- }
18
- }
19
-
20
- return t;
21
- };
22
-
23
- return __assign.apply(this, arguments);
24
- };
25
-
26
10
  /**
27
11
  * 获取 text 元组件json
28
12
  */
29
- var getDefaultMetaButtonJson = function getDefaultMetaButtonJson() {
13
+ var tagGroupSourceJSON = function tagGroupSourceJSON() {
14
+ var groupId = (0, _uuid.v4)();
30
15
  return {
31
- id: (0, _uuid.v4)(),
32
- open: true,
33
- content: {
34
- url: '',
35
- backgroundColor: '#e6eaf0'
36
- },
37
- buttonText: {
38
- sizeType: 'Customize font styles',
39
- fontFamily: 'Open Sans',
40
- fontWeight: 600,
41
- fontSize: 12,
42
- fontStyle: 'normal',
43
- color: '#8493AF',
44
- padding: '2px 8px'
45
- },
46
- buttonBorder: {
16
+ id: groupId,
17
+ button: {
18
+ parentId: groupId,
19
+ id: (0, _uuid.v4)(),
47
20
  open: true,
48
- borderColor: '',
49
- borderRadius: 4
50
- },
51
- buttonIcon: {
52
- iconUrl: '',
53
- layout: 'right'
54
- },
55
- text: 'Button Tag',
56
- hover: null
21
+ content: {
22
+ url: '',
23
+ backgroundColor: '#e6eaf0'
24
+ },
25
+ buttonText: {
26
+ sizeType: 'Customize font styles',
27
+ fontFamily: 'Open Sans',
28
+ fontWeight: 600,
29
+ fontSize: 12,
30
+ fontStyle: 'normal',
31
+ color: '#8493AF',
32
+ padding: '2px 8px'
33
+ },
34
+ buttonBorder: {
35
+ open: true,
36
+ borderColor: '',
37
+ borderRadius: 4
38
+ },
39
+ buttonIcon: {
40
+ iconUrl: '',
41
+ layout: 'right'
42
+ },
43
+ text: 'Button Tag',
44
+ hover: null
45
+ }
57
46
  };
58
47
  };
59
48
 
49
+ exports.tagGroupSourceJSON = tagGroupSourceJSON;
50
+
60
51
  var getDefaultJSON = function getDefaultJSON() {
61
52
  return {
62
53
  id: (0, _uuid.v4)(),
@@ -80,20 +71,19 @@ var getDefaultJSON = function getDefaultJSON() {
80
71
  pcImgHoverUrl: '',
81
72
  h5ImgHoverUrl: ''
82
73
  }
83
- },
84
- button: __assign({}, getDefaultMetaButtonJson()),
85
- secondaryButton: __assign({}, getDefaultMetaButtonJson())
74
+ }
86
75
  },
76
+ groupSource: [tagGroupSourceJSON()],
87
77
  spacing: {
88
78
  pc: {
89
79
  paddingTop: 10,
90
80
  paddingBottom: 10,
91
- marginBottom: 0
81
+ marginBottom: window.magicDesign.compSpacing * 1.5
92
82
  },
93
83
  mobile: {
94
84
  paddingTop: 10,
95
85
  paddingBottom: 10,
96
- marginBottom: 0
86
+ marginBottom: window.magicDesign.compSpacing
97
87
  }
98
88
  },
99
89
  customize: {
@@ -15,8 +15,6 @@ var _components = require("../../../../meta-comp/components");
15
15
 
16
16
  var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
17
17
 
18
- var _businessUtil = require("../../../../utils/businessUtil");
19
-
20
18
  require("./index.less");
21
19
 
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -76,24 +74,20 @@ function (_super) {
76
74
  var _a;
77
75
 
78
76
  var nodeData = this.props.nodeData;
79
- var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
80
77
  return /*#__PURE__*/_react["default"].createElement("div", {
81
78
  className: (0, _classnames["default"])('tag-comp-wrap', (_a = {}, _a[nodeData.customize.layout] = true, _a[nodeData.customize.align] = true, _a)),
82
- onClick: this.onComponentClick,
83
- style: wrapStyle
79
+ onClick: this.onComponentClick
84
80
  }, nodeData.content.image.open && /*#__PURE__*/_react["default"].createElement("div", {
85
81
  className: "tag-image"
86
82
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
87
83
  data: nodeData.content.image
88
- })), nodeData.content.button.open && /*#__PURE__*/_react["default"].createElement("div", {
89
- className: "first-button"
90
- }, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
91
- data: nodeData.content.button
92
- })), nodeData.content.secondaryButton.open && /*#__PURE__*/_react["default"].createElement("div", {
93
- className: "secondary-button"
94
- }, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
95
- data: nodeData.content.secondaryButton
96
- })));
84
+ })), nodeData.groupSource && nodeData.groupSource.map(function (m) {
85
+ return /*#__PURE__*/_react["default"].createElement("div", {
86
+ className: "first-button"
87
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
88
+ data: m.button
89
+ }));
90
+ }));
97
91
  };
98
92
 
99
93
  Tag.defaultProps = {};
@@ -1,6 +1,7 @@
1
1
  .tag-comp-wrap {
2
2
  display: flex;
3
3
  align-items: center;
4
+ flex-wrap: wrap;
4
5
 
5
6
  .tag-image {
6
7
  width: 26px;
@@ -69,7 +69,6 @@ var textGroupSourceJSON = function textGroupSourceJSON(parentId) {
69
69
  fontWeight: 600,
70
70
  fontSize: 22,
71
71
  pcFontSize: 22,
72
- width: '100%',
73
72
  color: '#232F46'
74
73
  }
75
74
  }),
@@ -84,7 +83,6 @@ var textGroupSourceJSON = function textGroupSourceJSON(parentId) {
84
83
  fontWeight: 400,
85
84
  fontSize: 18,
86
85
  pcFontSize: 18,
87
- width: '100%',
88
86
  color: '#232F46'
89
87
  }
90
88
  })
@@ -103,7 +101,7 @@ var getDefaultJSON = function getDefaultJSON() {
103
101
  headline: __assign(__assign({}, getDefaultMetaTextJson()), {
104
102
  text: 'Title use, click modify text.',
105
103
  content: {
106
- sizeType: 'Headline 1',
104
+ sizeType: 'Customize font styles',
107
105
  fontFamily: 'Montserrat',
108
106
  fontWeight: 600,
109
107
  fontSize: 28,
@@ -130,18 +128,18 @@ var getDefaultJSON = function getDefaultJSON() {
130
128
  pc: {
131
129
  paddingTop: 10,
132
130
  paddingBottom: 10,
133
- marginBottom: 0
131
+ marginBottom: window.magicDesign.compSpacing * 1.5
134
132
  },
135
133
  mobile: {
136
134
  paddingTop: 10,
137
135
  paddingBottom: 10,
138
- marginBottom: 0
136
+ marginBottom: window.magicDesign.compSpacing
139
137
  }
140
138
  },
141
139
  customize: {
142
140
  layout: 'left',
143
141
  align: 'left',
144
- rowNum: 3
142
+ pcRowNum: 3
145
143
  },
146
144
  background: {
147
145
  opacity: 100,
@@ -15,8 +15,6 @@ var _components = require("../../../../meta-comp/components");
15
15
 
16
16
  var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
17
17
 
18
- var _businessUtil = require("../../../../utils/businessUtil");
19
-
20
18
  require("./index.less");
21
19
 
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -76,11 +74,9 @@ function (_super) {
76
74
  var _a;
77
75
 
78
76
  var nodeData = this.props.nodeData;
79
- var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
80
77
  return /*#__PURE__*/_react["default"].createElement("div", {
81
78
  className: "m-text",
82
- onClick: this.onComponentClick,
83
- style: wrapStyle
79
+ onClick: this.onComponentClick
84
80
  }, nodeData.title.headline.open && /*#__PURE__*/_react["default"].createElement("div", {
85
81
  className: "title-wrap"
86
82
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -90,7 +86,7 @@ function (_super) {
90
86
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
91
87
  data: nodeData.title.subtitle
92
88
  })), /*#__PURE__*/_react["default"].createElement("div", {
93
- className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.rowNum, (_a = {}, _a[window.magicDesign.device] = true, _a))
89
+ className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.pcRowNum, (_a = {}, _a[window.magicDesign.device] = true, _a))
94
90
  }, nodeData.groupSource.map(function (group) {
95
91
  return /*#__PURE__*/_react["default"].createElement("div", {
96
92
  className: "group-wrap-container"
@@ -100,11 +96,11 @@ function (_super) {
100
96
  style: {
101
97
  textAlign: nodeData.customize.align
102
98
  }
103
- }, /*#__PURE__*/_react["default"].createElement("div", {
99
+ }, group.content.title.open && /*#__PURE__*/_react["default"].createElement("div", {
104
100
  className: "group-title"
105
101
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
106
102
  data: group.content.title
107
- })), /*#__PURE__*/_react["default"].createElement("div", {
103
+ })), group.content.text.open && /*#__PURE__*/_react["default"].createElement("div", {
108
104
  className: "group-content"
109
105
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
110
106
  data: group.content.text
@@ -1,7 +1,7 @@
1
1
  .m-text {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
2
+ // display: flex;
3
+ // flex-direction: column;
4
+ // align-items: center;
5
5
 
6
6
  .title-wrap {
7
7
  font-weight: 500;
@@ -21,6 +21,8 @@ require("./index.less");
21
21
 
22
22
  var _locale = require("../../../../../locale");
23
23
 
24
+ var _decorator = require("../../../../../decorator");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
27
 
26
28
  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); }
@@ -120,7 +122,7 @@ function (_super) {
120
122
  AComponent.defaultProps = {
121
123
  source: []
122
124
  };
123
- AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
125
+ AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
124
126
  return AComponent;
125
127
  }(_react["default"].Component);
126
128
 
@@ -0,0 +1,141 @@
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 _mobxReact = require("mobx-react");
11
+
12
+ var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
13
+
14
+ var _defaultJSON = require("../../../components/Button/defaultJSON");
15
+
16
+ var _coreUtil = require("../../../../../utils/coreUtil");
17
+
18
+ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
19
+
20
+ require("./index.less");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ 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); }
27
+
28
+ var __extends = void 0 && (void 0).__extends || function () {
29
+ var _extendStatics = function extendStatics(d, b) {
30
+ _extendStatics = Object.setPrototypeOf || {
31
+ __proto__: []
32
+ } instanceof Array && function (d, b) {
33
+ d.__proto__ = b;
34
+ } || function (d, b) {
35
+ for (var p in b) {
36
+ if (b.hasOwnProperty(p)) d[p] = b[p];
37
+ }
38
+ };
39
+
40
+ return _extendStatics(d, b);
41
+ };
42
+
43
+ return function (d, b) {
44
+ _extendStatics(d, b);
45
+
46
+ function __() {
47
+ this.constructor = d;
48
+ }
49
+
50
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51
+ };
52
+ }();
53
+
54
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
55
+ var c = arguments.length,
56
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
57
+ d;
58
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
59
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
60
+ }
61
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
62
+ };
63
+
64
+ var notice = '';
65
+
66
+ var AComponent =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(AComponent, _super);
70
+
71
+ function AComponent() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+
74
+ _this.state = {};
75
+
76
+ _this.onClickItem = function (node) {
77
+ _this.props.store.setState({
78
+ clickedGroup: node.id
79
+ });
80
+ };
81
+
82
+ _this.onAddClick = function () {
83
+ var json = (0, _defaultJSON.buttonGroupSourceJSON)();
84
+
85
+ _this.props.source.push(json);
86
+
87
+ _this.setState({});
88
+
89
+ (0, _coreUtil.renderPreview)();
90
+ };
91
+
92
+ _this.reRender = function () {
93
+ _this.setState({});
94
+ };
95
+
96
+ _this.renderCard = function (src) {
97
+ return /*#__PURE__*/_react["default"].createElement("div", {
98
+ className: "card_wrap"
99
+ }, /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: "name"
101
+ }, "Button Name"));
102
+ };
103
+
104
+ return _this;
105
+ }
106
+
107
+ AComponent.prototype.render = function () {
108
+ var _this = this;
109
+
110
+ var source = this.props.source;
111
+ return /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: "button_group"
113
+ }, /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: "node_list"
115
+ }, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
116
+ className: "notice"
117
+ }, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
118
+ onClickItem: this.onClickItem,
119
+ renderCard: function renderCard(v) {
120
+ return _this.renderCard(v);
121
+ },
122
+ reRender: this.reRender,
123
+ source: source
124
+ })), /*#__PURE__*/_react["default"].createElement("div", {
125
+ className: "btn_wrap"
126
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
127
+ icon: "icon-add",
128
+ onClick: this.onAddClick,
129
+ type: "primary"
130
+ }, (0, _locale.i18n)('ADD_BUTTON'))));
131
+ };
132
+
133
+ AComponent.defaultProps = {
134
+ source: []
135
+ };
136
+ AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
137
+ return AComponent;
138
+ }(_react["default"].Component);
139
+
140
+ var _default = AComponent;
141
+ exports["default"] = _default;
@@ -0,0 +1,16 @@
1
+ .button_group {
2
+ margin-bottom: 20px;
3
+
4
+ .node_list {
5
+ margin-bottom: 12px;
6
+
7
+ .notice {
8
+ font-family: 'Open Sans';
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ font-size: 16px;
12
+ line-height: 24px;
13
+ color: #232F46;
14
+ }
15
+ }
16
+ }