@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
@@ -121,9 +121,11 @@ function PageCompList(_a) {
121
121
  }
122
122
  };
123
123
 
124
- var onMenuClick = function onMenuClick(index, operType) {
124
+ var onMenuClick = function onMenuClick(activeComp, operType) {
125
125
  var newComponents = __spreadArrays(components);
126
126
 
127
+ var index = newComponents.indexOf(activeComp);
128
+
127
129
  if (operType === operTypeMap.MOVE_UP) {
128
130
  var temp = newComponents[index - 1];
129
131
  newComponents[index - 1] = newComponents[index];
@@ -178,7 +180,7 @@ function PageCompList(_a) {
178
180
  var menu = /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
179
181
  onClick: function onClick(_a) {
180
182
  var item = _a.item;
181
- return onMenuClick(index, item.props.value);
183
+ return onMenuClick(comp, item.props.value);
182
184
  }
183
185
  }, index !== 0 && /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
184
186
  className: "menu_item",
@@ -245,6 +247,14 @@ function PageCompList(_a) {
245
247
  })));
246
248
  };
247
249
 
250
+ var getActiveComponents = function getActiveComponents() {
251
+ var filter = components.filter(function (comp) {
252
+ return (0, _coreUtil.isActiveFloor)(comp.activeTerminal);
253
+ });
254
+ return filter;
255
+ };
256
+
257
+ var activeComponents = getActiveComponents();
248
258
  return /*#__PURE__*/_react["default"].createElement("div", {
249
259
  className: "page-comp-wrap"
250
260
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -262,7 +272,7 @@ function PageCompList(_a) {
262
272
  className: "list mt16"
263
273
  }, /*#__PURE__*/_react["default"].createElement("div", {
264
274
  className: "inner-list"
265
- }, /*#__PURE__*/_react["default"].createElement("div", null, components.length > 0 && components.map(function (comp, i) {
275
+ }, /*#__PURE__*/_react["default"].createElement("div", null, activeComponents.length > 0 && activeComponents.map(function (comp, i) {
266
276
  return renderCard(comp, i);
267
277
  }))))));
268
278
  }
@@ -121,19 +121,19 @@
121
121
  display: block;
122
122
  }
123
123
  }
124
- }
125
124
 
126
- .active {
127
- background: #E9F0FF;
128
- color: #2F54EB;
125
+ &.active {
126
+ background: #E9F0FF;
127
+ color: #2F54EB;
129
128
 
130
- .left {
131
- .card-title {
132
- font-weight: 600;
129
+ .left {
130
+ .card-title {
131
+ font-weight: 600;
132
+ }
133
133
  }
134
- }
135
134
 
136
- .more-btn {
137
- display: block;
135
+ .more-btn {
136
+ display: block;
137
+ }
138
138
  }
139
139
  }
@@ -82,7 +82,7 @@ function (_super) {
82
82
  var _this = _super !== null && _super.apply(this, arguments) || this;
83
83
 
84
84
  _this.onBtnClick = function (event) {
85
- var code = event.currentTarget.dataset.code;
85
+ var code = event.currentTarget.dataset.code; // 保存和发布时需要清空组件和元组件的选中状态,否则截图中会看到选中状态
86
86
 
87
87
  if (code === _constants.quickMenuCode.SAVE || code === _constants.quickMenuCode.PUBLISH) {
88
88
  _mobx.store.setState({
@@ -17,10 +17,12 @@ var _constants = require("../../../constants");
17
17
 
18
18
  var _componentTypes = require("../../../constants/component-types");
19
19
 
20
- require("./index.less");
21
-
22
20
  var _mobx = require("../../../mobx");
23
21
 
22
+ var _coreUtil = require("../../../utils/coreUtil");
23
+
24
+ require("./index.less");
25
+
24
26
  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); }
25
27
 
26
28
  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; }
@@ -86,10 +88,22 @@ function (_super) {
86
88
  _this.isPhoneEdit = function () {
87
89
  var device = _this.props.device;
88
90
  return device === _constants.deviceTypeMap.PHONE && !(0, _isEmpty["default"])(_this.state.clickedFloor);
89
- };
91
+ }; // renderView = () => {
92
+ // this.setState({});
93
+ // }
94
+ // 根据楼层展示设备进行过滤
95
+
96
+
97
+ _this.filterCompFloor = function (dataSource) {
98
+ var source = [];
99
+
100
+ if (dataSource && dataSource.length) {
101
+ source = dataSource.filter(function (node) {
102
+ return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
103
+ });
104
+ }
90
105
 
91
- _this.renderView = function () {
92
- _this.setState({});
106
+ return source;
93
107
  };
94
108
 
95
109
  return _this;
@@ -125,7 +139,7 @@ function (_super) {
125
139
  style: {
126
140
  background: window.magicDesign.pageBackground
127
141
  }
128
- }, pageData && pageData.map(function (nodeData) {
142
+ }, this.filterCompFloor(pageData).map(function (nodeData) {
129
143
  var Clazz = _componentTypes.componentMap[nodeData.type];
130
144
 
131
145
  if (!Clazz) {
@@ -97,11 +97,14 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
97
97
  return r;
98
98
  };
99
99
 
100
+ window.magicDesign = {
101
+ mode: 'designer',
102
+ device: _constants.deviceTypeMap.PHONE
103
+ };
104
+
100
105
  var setDesignConfig = function setDesignConfig(data) {
101
- window.magicDesign = __assign(__assign({
102
- mode: 'designer',
103
- device: _constants.deviceTypeMap.PHONE
104
- }, data), {
106
+ window.magicDesign = __assign(__assign(__assign({}, window.magicDesign), data), {
107
+ compSpacing: Number(data.compSpacing),
105
108
  MBaseUrl: data.MBaseUrl || ''
106
109
  });
107
110
  };
@@ -169,14 +172,16 @@ function (_super) {
169
172
  _this.configRef.current.closeMobileConfig();
170
173
  };
171
174
 
172
- _this.reRenderViewArea = function () {
173
- if (!_this.viewAreaRef || !_this.viewAreaRef.current) {
174
- return;
175
+ _this.reRenderViewArea = function (e) {
176
+ if (e.changeHistory) {
177
+ _this.history.push(_this.state.MPageData);
175
178
  }
176
179
 
177
- _this.history.push(_this.state.MPageData);
180
+ _mobx.store.setState({
181
+ MPageData: _this.state.MPageData
182
+ });
178
183
 
179
- _this.viewAreaRef.current.renderView();
184
+ _this.setState({});
180
185
  };
181
186
 
182
187
  _this.componentClick = function (event) {
@@ -186,12 +191,12 @@ function (_super) {
186
191
  };
187
192
  /**
188
193
  * 楼层 的 新增、删除、拷贝、顺序调整、属性修改时调用
189
- * @param {*} pageData 模版信息
194
+ * @param {*} newPageData 模版信息
190
195
  */
191
196
 
192
197
 
193
- _this.setPageData = function (pageData) {
194
- var MPageData = _this.history.push(pageData);
198
+ _this.setPageData = function (newPageData) {
199
+ var MPageData = _this.history.push(newPageData);
195
200
 
196
201
  _this.setState({
197
202
  MPageData: MPageData
@@ -247,7 +252,8 @@ function (_super) {
247
252
  };
248
253
 
249
254
  _this.addComponent = function (_a) {
250
- var type = _a.type;
255
+ var type = _a.type,
256
+ terminalType = _a.terminalType;
251
257
  var MPageData = _this.state.MPageData;
252
258
  var compType = _componentTypes.componentMap[type];
253
259
 
@@ -258,7 +264,10 @@ function (_super) {
258
264
 
259
265
  var compInst = compType.getDefaultJSON();
260
266
 
261
- var newData = __spreadArrays(MPageData, [compInst]);
267
+ var newData = __spreadArrays(MPageData, [__assign(__assign({}, compInst), {
268
+ terminalType: terminalType,
269
+ activeTerminal: terminalType
270
+ })]);
262
271
 
263
272
  _this.history.push(newData);
264
273
 
@@ -298,18 +307,24 @@ function (_super) {
298
307
  device: device
299
308
  };
300
309
 
310
+ var callback = function callback(newPageData) {
311
+ _mobx.store.setState({
312
+ MPageData: newPageData
313
+ });
314
+
315
+ _this.setState({
316
+ MPageData: newPageData
317
+ });
318
+ };
319
+
301
320
  switch (code) {
302
321
  case _constants.quickMenuCode.UNDO:
303
- _this.setState({
304
- MPageData: _this.history.undo()
305
- });
322
+ _this.history.undo(callback);
306
323
 
307
324
  break;
308
325
 
309
326
  case _constants.quickMenuCode.REDO:
310
- _this.setState({
311
- MPageData: _this.history.redo()
312
- });
327
+ _this.history.redo(callback);
313
328
 
314
329
  break;
315
330
 
@@ -335,8 +350,6 @@ function (_super) {
335
350
 
336
351
  break;
337
352
  }
338
-
339
- console.log(JSON.stringify(handleParams.pageData));
340
353
  };
341
354
 
342
355
  _this.renderHeader = function () {
@@ -353,27 +366,20 @@ function (_super) {
353
366
  config = props.config,
354
367
  locale = props.locale;
355
368
  var MPageData = pageData.childNodes || [];
369
+ _this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
356
370
 
357
- _mobx.store.setState({
358
- MPageData: MPageData
359
- });
360
- /** 使用默认国际化 */
361
- // if (!store.locale) {
362
-
371
+ _this.compListRef = /*#__PURE__*/_react["default"].createRef();
372
+ _this.history = new _History["default"](MPageData);
363
373
 
364
374
  _mobx.store.setState({
375
+ MPageData: MPageData,
365
376
  locale: locale
366
- }); // }
367
-
377
+ });
368
378
 
369
- _this.configRef = /*#__PURE__*/_react["default"].createRef();
370
- _this.viewAreaRef = /*#__PURE__*/_react["default"].createRef();
371
- _this.compListRef = /*#__PURE__*/_react["default"].createRef();
372
379
  _this.state = {
373
380
  MPageData: MPageData,
374
381
  device: _constants.deviceTypeMap.PHONE
375
382
  };
376
- _this.history = new _History["default"](MPageData);
377
383
  setDesignConfig(config);
378
384
  return _this;
379
385
  }
@@ -398,6 +404,7 @@ function (_super) {
398
404
  var pageData = nextProps.pageData,
399
405
  config = nextProps.config;
400
406
  var MPageData = pageData.childNodes || [];
407
+ this.history = new _History["default"](MPageData);
401
408
  this.setState({
402
409
  MPageData: MPageData
403
410
  });
@@ -406,7 +413,6 @@ function (_super) {
406
413
  MPageData: MPageData
407
414
  });
408
415
 
409
- this.history = new _History["default"](MPageData);
410
416
  setDesignConfig(config);
411
417
  };
412
418
 
@@ -467,8 +473,8 @@ function (_super) {
467
473
  device: device,
468
474
  onClose: this.onPropsPanelClose,
469
475
  pageData: MPageData
470
- }), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"], {
471
- ref: this.viewAreaRef,
476
+ }), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"] // ref={this.viewAreaRef}
477
+ , {
472
478
  device: device,
473
479
  pageData: MPageData,
474
480
  renderHeader: this.renderHeader
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _componentTypes = require("../../constants/component-types");
11
11
 
12
+ var _coreUtil = require("../../utils/coreUtil");
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
15
 
14
16
  var __assign = void 0 && (void 0).__assign || function () {
@@ -33,13 +35,14 @@ var setDesignConfig = function setDesignConfig(props) {
33
35
  var config = props.config,
34
36
  device = props.device,
35
37
  isShop = props.isShop;
36
- window.magicDesign = __assign({
38
+ window.magicDesign = __assign(__assign({
37
39
  pageBackground: '#f2f2f2',
38
- compSpacing: '16',
39
40
  mode: 'renderer',
40
41
  device: device,
41
42
  isShop: isShop
42
- }, config);
43
+ }, config), {
44
+ compSpacing: Number(config.compSpacing)
45
+ });
43
46
  };
44
47
  /**
45
48
  * @class Renderer 页面预览器,外部工程使用此类来渲染出页面。
@@ -48,14 +51,27 @@ var setDesignConfig = function setDesignConfig(props) {
48
51
 
49
52
  var Renderer = function Renderer(props) {
50
53
  var pageData = props.pageData;
51
- setDesignConfig(props);
54
+ setDesignConfig(props); // 根据楼层展示设备进行过滤
55
+
56
+ var filterCompFloor = function filterCompFloor() {
57
+ var source = [];
58
+
59
+ if (pageData && pageData.childNodes && pageData.childNodes.length) {
60
+ source = pageData.childNodes.filter(function (node) {
61
+ return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
62
+ });
63
+ }
64
+
65
+ return source;
66
+ };
67
+
52
68
  return /*#__PURE__*/_react["default"].createElement("div", {
53
69
  className: "render_wrap",
54
70
  magic_design: "",
55
71
  style: {
56
72
  background: window.magicDesign.pageBackground
57
73
  }
58
- }, pageData && pageData.childNodes && pageData.childNodes.map(function (nodeData) {
74
+ }, filterCompFloor().map(function (nodeData) {
59
75
  var Clazz = _componentTypes.componentMap[nodeData.type];
60
76
 
61
77
  if (!Clazz) {
@@ -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
  function compositeDecorator(WrappedComponent) {
45
61
  var Wrapper =
46
62
  /** @class */
@@ -74,26 +90,43 @@ function compositeDecorator(WrappedComponent) {
74
90
  };
75
91
 
76
92
  _this.getStyle = function () {
77
- var style = {
93
+ var wrapStyle = {
78
94
  border: 'none'
79
- }; // 处理复合组件的选中状态
80
-
81
- if (window.magicDesign.mode === 'designer') {
95
+ };
96
+ var _a = window.magicDesign,
97
+ device = _a.device,
98
+ mode = _a.mode;
99
+ var nodeData = _this.props.nodeData;
100
+ var spacing = nodeData.spacing,
101
+ background = nodeData.background; // 处理复合组件的选中状态
102
+
103
+ if (mode === 'designer') {
82
104
  // style.border = '1px solid transparent';
83
- style.border = 'none';
105
+ wrapStyle.border = 'none';
84
106
 
85
- if (_this.props.nodeData.id === _this.state.clickedFloor) {
86
- style.border = '1px dashed red';
107
+ if (nodeData.id === _this.state.clickedFloor) {
108
+ wrapStyle.border = '1px dashed red';
87
109
  }
88
- } // 处理复合组件的下边距
110
+ } // 边距
111
+
89
112
 
113
+ if (spacing && spacing[device]) {
114
+ wrapStyle = __assign(__assign({}, wrapStyle), spacing[device]);
115
+ } // 背景
90
116
 
91
- if (Wrapper.type !== 'DIVIDER') {
92
- var rate = window.magicDesign.device === 'pc' ? 1.5 : 1;
93
- style.marginBottom = Number(window.magicDesign.compSpacing) * rate + "px";
117
+
118
+ if (background) {
119
+ if (background.bgType === 'color') {
120
+ wrapStyle.backgroundColor = background.color;
121
+ wrapStyle.opacity = background.opacity ? background.opacity : 1;
122
+ } else {
123
+ wrapStyle.backgroundImage = "url(" + background.image + ")";
124
+ wrapStyle.backgroundPosition = 'center';
125
+ wrapStyle.backgroundSize = 'cover';
126
+ }
94
127
  }
95
128
 
96
- return style;
129
+ return wrapStyle;
97
130
  };
98
131
 
99
132
  return _this;
@@ -15,9 +15,17 @@ Object.defineProperty(exports, "metaDecorator", {
15
15
  return _metaDecorator["default"];
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "updateConfigDecorator", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _updateConfigDecorator["default"];
22
+ }
23
+ });
18
24
 
19
25
  var _compositeDecorator = _interopRequireDefault(require("./compositeDecorator"));
20
26
 
21
27
  var _metaDecorator = _interopRequireDefault(require("./metaDecorator"));
22
28
 
29
+ var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecorator"));
30
+
23
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -69,7 +69,7 @@ function metaDecorator(WrappedComponent) {
69
69
  }; // 元组件点击事件
70
70
 
71
71
  _this.onMetaClick = function (event) {
72
- var _a, _b, _c;
72
+ var _a, _b;
73
73
 
74
74
  if (window.magicDesign.mode === 'renderer') {
75
75
  return;
@@ -90,7 +90,7 @@ function metaDecorator(WrappedComponent) {
90
90
  }
91
91
 
92
92
  _mobx.store.setState({
93
- clickedMeta: (_c = _this.props.data) === null || _c === void 0 ? void 0 : _c.id,
93
+ clickedMeta: metaId,
94
94
  clickedGroup: parentId,
95
95
  clickedFloor: floorId
96
96
  });
@@ -142,7 +142,8 @@ function metaDecorator(WrappedComponent) {
142
142
  var isClick = (data === null || data === void 0 ? void 0 : data.id) === clickedMeta;
143
143
  var style = {
144
144
  boxSizing: 'border-box',
145
- height: '100%'
145
+ height: '100%',
146
+ border: '1px solid transparent'
146
147
  };
147
148
 
148
149
  if (window.magicDesign.mode === 'renderer') {
@@ -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,18 @@
1
1
  {
2
+ "SEARCH_BOX": "Search Box",
3
+ "PLEASE_INPUT_KEYWORDS": "Please input keywords",
4
+ "SHOPPING_CART": "Shopping Cart",
5
+ "ADD_BUTTON": "Add Button",
6
+ "BUTTON_TAG": "Button Tag",
7
+ "ADD_TAG": "Add Tag",
8
+ "LAST_CATEGORY": "Last Category",
9
+ "SECONDARY_CATEGORY": "Secondary Category",
10
+ "FIRST_CATEGORY": "First Category",
11
+ "ALL_CATEGORY": "All Category",
12
+ "HOME": "Home",
13
+ "ADD_CLICKABLE_AREA": "Add Clickable Area",
14
+ "ADD_AREA": "Add Area",
15
+ "CLICKABLE_AREA": "Clickable Area",
2
16
  "VOUCHER_SUCCESS": "Voucher received successfully!",
3
17
  "NAVIGATION_NAME": "Navigation Name",
4
18
  "ADD_NAVIGATION": "Add Navigation",
@@ -85,7 +99,6 @@
85
99
  "INPUT_FIELD": "Input Field",
86
100
  "CONFIRMATION": "Confirmation",
87
101
  "IMAGE_TAG": "Image Tag",
88
- "BUTTON_TAG": "Button Tag",
89
102
  "SECONDARY_BUTTON_TAG": "Secondary Button Tag",
90
103
  "TITLE": "Title",
91
104
  "HOVER": "Hover",
@@ -1,4 +1,18 @@
1
1
  {
2
+ "SEARCH_BOX": "Search Box",
3
+ "PLEASE_INPUT_KEYWORDS": "Please input keywords",
4
+ "SHOPPING_CART": "Shopping Cart",
5
+ "ADD_BUTTON": "Add Button",
6
+ "BUTTON_TAG": "Etiqueta de botón",
7
+ "ADD_TAG": "Add Tag",
8
+ "LAST_CATEGORY": "Last Category",
9
+ "SECONDARY_CATEGORY": "Secondary Category",
10
+ "FIRST_CATEGORY": "First Category",
11
+ "ALL_CATEGORY": "All Category",
12
+ "HOME": "Home",
13
+ "ADD_CLICKABLE_AREA": "Add Clickable Area",
14
+ "ADD_AREA": "Add Area",
15
+ "CLICKABLE_AREA": "Clickable Area",
2
16
  "VOUCHER_SUCCESS": "Voucher received successfully!",
3
17
  "NAVIGATION_NAME": "Navigation Name",
4
18
  "ADD_NAVIGATION": "Add Navigation",
@@ -85,7 +99,6 @@
85
99
  "INPUT_FIELD": "Campo de entrada",
86
100
  "CONFIRMATION": "Confirmación",
87
101
  "IMAGE_TAG": "Etiqueta de imagen",
88
- "BUTTON_TAG": "Etiqueta de botón",
89
102
  "SECONDARY_BUTTON_TAG": "Etiqueta de botón secundario",
90
103
  "TITLE": "Título",
91
104
  "HOVER": "Hover",
@@ -1,4 +1,18 @@
1
1
  {
2
+ "SEARCH_BOX": "Search Box",
3
+ "PLEASE_INPUT_KEYWORDS": "Please input keywords",
4
+ "SHOPPING_CART": "Shopping Cart",
5
+ "ADD_BUTTON": "Add Button",
6
+ "BUTTON_TAG": "Button Tag",
7
+ "ADD_TAG": "Add Tag",
8
+ "LAST_CATEGORY": "Last Category",
9
+ "SECONDARY_CATEGORY": "Secondary Category",
10
+ "FIRST_CATEGORY": "First Category",
11
+ "ALL_CATEGORY": "All Category",
12
+ "HOME": "Home",
13
+ "ADD_CLICKABLE_AREA": "Add Clickable Area",
14
+ "ADD_AREA": "Add Area",
15
+ "CLICKABLE_AREA": "Clickable Area",
2
16
  "VOUCHER_SUCCESS": "Voucher received successfully!",
3
17
  "NAVIGATION_NAME": "Navigation Name",
4
18
  "ADD_NAVIGATION": "Add Navigation",
@@ -85,7 +99,6 @@
85
99
  "INPUT_FIELD": "Input Field",
86
100
  "CONFIRMATION": "Confirmation",
87
101
  "IMAGE_TAG": "Image Tag",
88
- "BUTTON_TAG": "Button Tag",
89
102
  "SECONDARY_BUTTON_TAG": "Secondary Button Tag",
90
103
  "TITLE": "Title",
91
104
  "HOVER": "Hover",