@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
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ require("./editable.less");
13
+
14
+ var _coreUtil = require("../../../utils/coreUtil");
15
+
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+
20
+ var __extends = void 0 && (void 0).__extends || function () {
21
+ var _extendStatics = function extendStatics(d, b) {
22
+ _extendStatics = Object.setPrototypeOf || {
23
+ __proto__: []
24
+ } instanceof Array && function (d, b) {
25
+ d.__proto__ = b;
26
+ } || function (d, b) {
27
+ for (var p in b) {
28
+ if (b.hasOwnProperty(p)) d[p] = b[p];
29
+ }
30
+ };
31
+
32
+ return _extendStatics(d, b);
33
+ };
34
+
35
+ return function (d, b) {
36
+ _extendStatics(d, b);
37
+
38
+ function __() {
39
+ this.constructor = d;
40
+ }
41
+
42
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
+ };
44
+ }();
45
+
46
+ var __assign = void 0 && (void 0).__assign || function () {
47
+ __assign = Object.assign || function (t) {
48
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
49
+ s = arguments[i];
50
+
51
+ for (var p in s) {
52
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
53
+ }
54
+ }
55
+
56
+ return t;
57
+ };
58
+
59
+ return __assign.apply(this, arguments);
60
+ };
61
+ /**
62
+ * 编辑button名称,被动触发元组件的hover事件时会刷新组件,导致contenteditable的光标位置初始化
63
+ */
64
+
65
+
66
+ var editable =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(editable, _super);
70
+
71
+ function editable() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+
74
+ _this.preData = '';
75
+ _this.preDevice = '';
76
+ return _this;
77
+ }
78
+
79
+ editable.prototype.shouldComponentUpdate = function (nextProps) {
80
+ var should1 = JSON.stringify(nextProps.data) != this.preData;
81
+ var should2 = window.magicDesign.device != this.preDevice;
82
+ var result = should1 || should2;
83
+ return result;
84
+ };
85
+
86
+ editable.prototype.render = function () {
87
+ var _this = this;
88
+
89
+ var _a = this.props,
90
+ data = _a.data,
91
+ readonly = _a.readonly;
92
+ this.preData = JSON.stringify(data);
93
+ this.preDevice = window.magicDesign.device;
94
+ return /*#__PURE__*/_react["default"].createElement("span", {
95
+ className: "item",
96
+ contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
97
+ onInput: function onInput(e) {
98
+ var text = e.target.textContent;
99
+ data.text = text;
100
+ /** 主动更新历史数据避免render */
101
+
102
+ _this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
103
+ text: text
104
+ }));
105
+ },
106
+ suppressContentEditableWarning: true
107
+ }, data.text);
108
+ };
109
+
110
+ return editable;
111
+ }(_react.Component);
112
+
113
+ var _default = editable;
114
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ .item {
2
+ width: 100%;
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
@@ -11,7 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  require("./index.less");
13
13
 
14
- var _businessUtil = require("../../../utils/businessUtil");
14
+ var _editable = _interopRequireDefault(require("./editable"));
15
15
 
16
16
  var _coreUtil = require("../../../utils/coreUtil");
17
17
 
@@ -88,19 +88,9 @@ function (_super) {
88
88
  _this.state = {
89
89
  hover: false
90
90
  };
91
- /** 备份历史数据 比对不一致时渲染 */
92
-
93
- _this.preData = '';
94
91
  return _this;
95
92
  }
96
93
 
97
- Button.prototype.shouldComponentUpdate = function (nextProps) {
98
- var should1 = JSON.stringify(nextProps.data) != this.preData;
99
- var should2 = window.magicDesign.device != this.preDevice;
100
- var result = should1 || should2;
101
- return result;
102
- };
103
-
104
94
  Button.prototype.render = function () {
105
95
  var _this = this;
106
96
 
@@ -108,8 +98,7 @@ function (_super) {
108
98
 
109
99
  var _b = this.props,
110
100
  data = _b.data,
111
- className = _b.className,
112
- readonly = _b.readonly;
101
+ className = _b.className;
113
102
  var hover = this.state.hover;
114
103
  this.preData = JSON.stringify(data);
115
104
  this.preDevice = window.magicDesign.device;
@@ -122,6 +111,14 @@ function (_super) {
122
111
  fontSize: window.magicDesign.device == 'pc' ? data.buttonText.pcFontSize : data.buttonText.fontSize
123
112
  });
124
113
 
114
+ if (data.spacing) {
115
+ if (window.magicDesign.device == 'pc') {
116
+ style = __assign(__assign({}, style), data.spacing.pc);
117
+ } else {
118
+ style = __assign(__assign({}, style), data.spacing.mobile);
119
+ }
120
+ }
121
+
125
122
  var iconUrl = data.buttonIcon.iconUrl;
126
123
  var iconLayout = data.buttonIcon.layout;
127
124
 
@@ -137,22 +134,6 @@ function (_super) {
137
134
  iconLayout = data.hover.buttonIcon.layout;
138
135
  }
139
136
 
140
- var btnText = /*#__PURE__*/_react["default"].createElement("span", {
141
- className: "item",
142
- contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
143
- onInput: function onInput(e) {
144
- var text = e.target.textContent;
145
- data.text = text;
146
- /** 主动更新历史数据避免render */
147
-
148
- _this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
149
- text: text
150
- }));
151
- },
152
- suppressContentEditableWarning: true
153
- }, data.text);
154
-
155
- var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
156
137
  return /*#__PURE__*/_react["default"].createElement("div", {
157
138
  className: (0, _classnames["default"])('m-meta-button', className),
158
139
  onClick: function onClick() {
@@ -168,16 +149,16 @@ function (_super) {
168
149
  hover: false
169
150
  });
170
151
  },
171
- style: __assign(__assign({}, style), wrapStyle)
152
+ style: __assign({}, style)
172
153
  }, /*#__PURE__*/_react["default"].createElement("div", {
173
154
  className: (0, _classnames["default"])('btnContent', {
174
155
  horizontal: iconLayout === 'left' || iconLayout === 'right'
175
156
  })
176
- }, (iconLayout === 'right' || iconLayout === 'bottom') && btnText, iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
157
+ }, (iconLayout === 'right' || iconLayout === 'bottom') && /*#__PURE__*/_react["default"].createElement(_editable["default"], this.props), iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
177
158
  alt: "",
178
- className: "item",
159
+ className: "icon",
179
160
  src: iconUrl
180
- }), (iconLayout === 'left' || iconLayout === 'top') && btnText));
161
+ }), (iconLayout === 'left' || iconLayout === 'top') && /*#__PURE__*/_react["default"].createElement(_editable["default"], this.props)));
181
162
  };
182
163
 
183
164
  Button.defaultProps = {
@@ -2,8 +2,9 @@
2
2
  transition: all 0.25s;
3
3
 
4
4
  .btnContent {
5
+ width: 100%;
5
6
  cursor: pointer;
6
- display: inline-flex;
7
+ display: flex;
7
8
  align-items: center;
8
9
  justify-content: center;
9
10
  flex-direction: column;
@@ -14,7 +15,7 @@
14
15
 
15
16
  img {
16
17
  height: 20px;
17
- margin-right: 5px;
18
+ margin: 0 5px;
18
19
  }
19
20
  }
20
21
  }
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  require("./index.less");
13
13
 
14
+ var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
15
+
14
16
  var _coreUtil = require("../../../utils/coreUtil");
15
17
 
16
18
  var _decorator = require("../../../decorator");
@@ -63,9 +65,11 @@ function (_super) {
63
65
  function Image() {
64
66
  var _this = _super !== null && _super.apply(this, arguments) || this;
65
67
 
68
+ _this.imgRef = /*#__PURE__*/_react["default"].createRef();
66
69
  _this.state = {
67
70
  // 当仅作为一个图片时,鼠标移上去,hover状态
68
- hoverImgSrc: false
71
+ hoverImgSrc: false,
72
+ scale: 1
69
73
  };
70
74
 
71
75
  _this.getStyle = function () {
@@ -82,14 +86,14 @@ function (_super) {
82
86
 
83
87
  if (data.hover.open && data.hover.backgroundType === 'enlarge' && (hoverState || hoverImgSrc)) {
84
88
  // return { transform: `scale(${data.hover.magnification})` };
85
- obj.transform = "scale(" + data.hover.magnification / 2 + ")";
89
+ obj.transform = "scale(" + data.hover.magnification + ")";
86
90
  }
87
91
 
88
92
  if (maxHeight) {
89
93
  obj.maxHeight = maxHeight;
90
94
  }
91
95
 
92
- if (maxWidth) {
96
+ if (maxWidth || maxWidth === 0) {
93
97
  obj.maxWidth = maxWidth;
94
98
  }
95
99
 
@@ -144,6 +148,8 @@ function (_super) {
144
148
  }
145
149
 
146
150
  Image.prototype.render = function () {
151
+ var _this = this;
152
+
147
153
  var _a, _b;
148
154
 
149
155
  var _c = this.props,
@@ -161,10 +167,11 @@ function (_super) {
161
167
 
162
168
  if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
163
169
  srcImg = srcImg.replace('ecommerce/static', 'static');
164
- } // if (!srcImg) {
165
- // srcImg = defaultImg;
166
- // }
170
+ }
167
171
 
172
+ if (!srcImg) {
173
+ srcImg = _defaultImg["default"];
174
+ }
168
175
 
169
176
  return /*#__PURE__*/_react["default"].createElement("div", {
170
177
  className: (0, _classnames["default"])('m-meta-image', {
@@ -173,12 +180,36 @@ function (_super) {
173
180
  onClick: function onClick() {
174
181
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
175
182
  }
176
- }, srcImg && /*#__PURE__*/_react["default"].createElement("img", {
183
+ }, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
184
+ ref: this.imgRef,
185
+ onLoad: function onLoad() {
186
+ var scale = _this.imgRef.current.clientWidth / 600;
187
+
188
+ _this.setState({
189
+ scale: scale
190
+ });
191
+ },
177
192
  onMouseEnter: this.mouseEnterImg,
178
193
  onMouseLeave: this.mouseLeaveImg,
179
194
  src: srcImg,
180
195
  style: this.getStyle()
181
- }));
196
+ }), data.content.areas && data.content.areas.length > 0 && data.content.areas.map(function (v, i) {
197
+ var aStyle = {
198
+ position: 'absolute',
199
+ top: parseInt(v.y * _this.state.scale),
200
+ left: parseInt(v.x * _this.state.scale),
201
+ width: parseInt(v.width * _this.state.scale),
202
+ height: parseInt(v.height * _this.state.scale)
203
+ };
204
+ return /*#__PURE__*/_react["default"].createElement("a", {
205
+ key: i,
206
+ onClick: function onClick(e) {
207
+ e.stopPropagation();
208
+ (0, _coreUtil.clickUrl)(v.inputVal);
209
+ },
210
+ style: aStyle
211
+ });
212
+ })));
182
213
  };
183
214
 
184
215
  Image.defaultProps = {
@@ -1,21 +1,24 @@
1
1
  .m-meta-image {
2
+ position: relative;
2
3
  width: 100%;
3
4
  height: 100%;
4
5
  display: flex;
5
- align-items: center;
6
6
  justify-content: center;
7
-
7
+ overflow: hidden;
8
8
  &>img {
9
9
  width: 100%;
10
10
  height: 100%;
11
- object-fit: contain;
11
+ // object-fit: contain;
12
12
  transition: all .2s linear;
13
13
  vertical-align: initial;
14
+ max-width: 100%;
14
15
  }
15
16
 
16
17
  &.backgroundImg {
17
18
  &>img {
18
- object-fit: cover;
19
+ // object-fit: cover;
20
+ width: auto;
21
+ max-width: none;
19
22
  }
20
23
  }
21
24
  }
@@ -17,8 +17,6 @@ var _Iconfont = require("../../../common/Iconfont");
17
17
 
18
18
  var _decorator = require("../../../decorator");
19
19
 
20
- var _businessUtil = require("../../../utils/businessUtil");
21
-
22
20
  var _coreUtil = require("../../../utils/coreUtil");
23
21
 
24
22
  var _mobx = require("../../../mobx");
@@ -96,6 +94,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
96
94
  };
97
95
 
98
96
  var contentStyle = function contentStyle(content) {
97
+ var baseWidth = (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 100;
99
98
  return {
100
99
  fontSize: window.magicDesign.device == 'pc' ? content.pcFontSize : content.fontSize,
101
100
  fontFamily: content.fontFamily,
@@ -104,7 +103,8 @@ var contentStyle = function contentStyle(content) {
104
103
  color: content.color,
105
104
  backgroundColor: content.backgroundColor,
106
105
  textAlign: content.textAlign,
107
- width: window.magicDesign.device == 'mobile' ? '100%' : content.width || 'fit-content'
106
+ // width: (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 'fit-content',
107
+ width: Math.min(baseWidth, 100) + "%"
108
108
  };
109
109
  };
110
110
  /** 从父级数组中 分离出 片段数组 */
@@ -258,7 +258,8 @@ var initSelectionEvent = function initSelectionEvent() {
258
258
  }
259
259
 
260
260
  findSelectionTarget.refresh();
261
- }
261
+ } // todo 不知道干什么用的
262
+
262
263
 
263
264
  triggerTextConfigRender();
264
265
  }, 500);
@@ -431,14 +432,30 @@ function (_super) {
431
432
  className = _a.className,
432
433
  readonly = _a.readonly,
433
434
  onTextInput = _a.onTextInput;
435
+ var style = contentStyle(data.content);
436
+
437
+ if (data.underline) {
438
+ style = __assign(__assign({}, style), {
439
+ textDecorationLine: data.underline.open ? 'underline' : 'none',
440
+ textDecorationColor: data.underline.textDecorationColor,
441
+ textDecorationStyle: data.underline.textDecorationStyle
442
+ });
443
+ }
444
+
445
+ if (data === null || data === void 0 ? void 0 : data.spacing) {
446
+ if ((0, _coreUtil.isPc)()) {
447
+ style = __assign(__assign({}, style), data.spacing.pc);
448
+ } else {
449
+ style = __assign(__assign({}, style), data.spacing.mobile);
450
+ }
451
+ } // const style: React.CSSProperties = {
452
+ // ...contentStyle(data.content),
453
+ // textDecorationLine: data?.underline.open ? 'underline' : 'none',
454
+ // textDecorationColor: data?.underline.textDecorationColor,
455
+ // textDecorationStyle: data?.underline.textDecorationStyle,
456
+ // };
434
457
 
435
- var style = __assign(__assign({}, contentStyle(data.content)), {
436
- textDecorationLine: data.underline.open ? 'underline' : 'none',
437
- textDecorationColor: data.underline.textDecorationColor,
438
- textDecorationStyle: data.underline.textDecorationStyle
439
- });
440
458
 
441
- var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
442
459
  return /*#__PURE__*/_react["default"].createElement("div", {
443
460
  ref: this.textRef,
444
461
  className: (0, _classnames["default"])('m-meta-text', className),
@@ -461,7 +478,7 @@ function (_super) {
461
478
  onKeyDown: function onKeyDown(e) {
462
479
  e.stopPropagation();
463
480
  },
464
- style: __assign(__assign({}, style), wrapStyle),
481
+ style: __assign({}, style),
465
482
  suppressContentEditableWarning: true
466
483
  });
467
484
  };
@@ -48,14 +48,6 @@ function (_super) {
48
48
 
49
49
  function BaseConfig() {
50
50
  var _this = _super !== null && _super.apply(this, arguments) || this;
51
- /**
52
- *重新渲染展示区域
53
- */
54
-
55
-
56
- _this.reRenderViewArea = function () {
57
- (0, _coreUtil.renderPreview)();
58
- };
59
51
  /**
60
52
  * 重新渲染一级配置面板
61
53
  */
@@ -67,10 +59,16 @@ function (_super) {
67
59
  */
68
60
 
69
61
 
70
- _this.selfRender = function () {
62
+ _this.selfRender = function (data) {
63
+ var changeHistory = true;
64
+
65
+ if (data && data.type === 'text-render') {
66
+ changeHistory = false;
67
+ }
68
+
71
69
  _this.setState({});
72
70
 
73
- _this.reRenderViewArea();
71
+ (0, _coreUtil.renderPreview)(changeHistory);
74
72
  };
75
73
 
76
74
  return _this;
@@ -157,7 +157,7 @@ function (_super) {
157
157
  return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
158
158
  value: sizeType.key
159
159
  }, sizeType.key);
160
- }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
160
+ }))), data.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
161
161
  title: (0, _locale.i18n)('FONT_FAMILY')
162
162
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
163
163
  onChange: function onChange(v) {
@@ -191,7 +191,7 @@ function (_super) {
191
191
  value: {
192
192
  count: data[fontSizeKey]
193
193
  }
194
- })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
194
+ }))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
195
195
  title: ""
196
196
  }, /*#__PURE__*/_react["default"].createElement(_common.FontStyles, {
197
197
  onChange: function onChange(value) {
@@ -301,7 +301,6 @@ function (_super) {
301
301
  name: (0, _locale.i18n)('SPACING'),
302
302
  value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
303
303
  configCompSpace: false,
304
- configPaddingLR: true,
305
304
  data: data.spacing
306
305
  })
307
306
  }];
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _antd = require("antd");
13
+
14
+ var _common = require("../../../../common");
15
+
16
+ require("./index.less");
17
+
18
+ var _locale = require("../../../../locale");
19
+
20
+ 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); }
21
+
22
+ 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; }
23
+
24
+ var __extends = void 0 && (void 0).__extends || function () {
25
+ var _extendStatics = function extendStatics(d, b) {
26
+ _extendStatics = Object.setPrototypeOf || {
27
+ __proto__: []
28
+ } instanceof Array && function (d, b) {
29
+ d.__proto__ = b;
30
+ } || function (d, b) {
31
+ for (var p in b) {
32
+ if (b.hasOwnProperty(p)) d[p] = b[p];
33
+ }
34
+ };
35
+
36
+ return _extendStatics(d, b);
37
+ };
38
+
39
+ return function (d, b) {
40
+ _extendStatics(d, b);
41
+
42
+ function __() {
43
+ this.constructor = d;
44
+ }
45
+
46
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47
+ };
48
+ }();
49
+
50
+ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
51
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
52
+ s += arguments[i].length;
53
+ }
54
+
55
+ for (var r = Array(s), k = 0, i = 0; i < il; i++) {
56
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
57
+ r[k] = a[j];
58
+ }
59
+ }
60
+
61
+ return r;
62
+ };
63
+
64
+ var AreaConfigModal =
65
+ /** @class */
66
+ function (_super) {
67
+ __extends(AreaConfigModal, _super);
68
+
69
+ function AreaConfigModal() {
70
+ var _this = _super !== null && _super.apply(this, arguments) || this;
71
+
72
+ _this.state = {
73
+ drawCoordinates: _this.props.value || []
74
+ };
75
+
76
+ _this.setCoordinate = function (coordinate, index, coordinates) {
77
+ _this.setState({
78
+ drawCoordinates: coordinates
79
+ });
80
+ };
81
+
82
+ _this.addArea = function () {
83
+ var drawCoordinates = _this.state.drawCoordinates;
84
+
85
+ var newCoordinates = __spreadArrays(drawCoordinates, [{
86
+ height: 50,
87
+ id: "Hyp_dBIiD" + drawCoordinates.length,
88
+ inputVal: '',
89
+ width: 100,
90
+ x: 54 + drawCoordinates.length * 10,
91
+ y: 38 + drawCoordinates.length * 10
92
+ }]);
93
+
94
+ _this.setState({
95
+ drawCoordinates: newCoordinates
96
+ });
97
+ };
98
+
99
+ _this.onOkClick = function () {
100
+ var onOk = _this.props.onOk;
101
+ var drawCoordinates = _this.state.drawCoordinates;
102
+ onOk(drawCoordinates);
103
+ };
104
+
105
+ return _this;
106
+ }
107
+
108
+ AreaConfigModal.prototype.render = function () {
109
+ var _this = this;
110
+
111
+ var _a = this.props,
112
+ visible = _a.visible,
113
+ onCancel = _a.onCancel;
114
+ var drawCoordinates = this.state.drawCoordinates;
115
+ return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
116
+ centered: true,
117
+ draggable: false,
118
+ onCancel: onCancel,
119
+ onOk: this.onOkClick,
120
+ title: "clickable Area",
121
+ visible: visible,
122
+ width: "auto"
123
+ }, /*#__PURE__*/_react["default"].createElement("div", {
124
+ className: "body_wrap"
125
+ }, /*#__PURE__*/_react["default"].createElement(_common.ImgArea, {
126
+ coordinates: drawCoordinates,
127
+ onChange: this.setCoordinate,
128
+ onDelete: this.setCoordinate,
129
+ onSave: this.setCoordinate,
130
+ src: this.props.imgUrl,
131
+ width: "100%"
132
+ }), /*#__PURE__*/_react["default"].createElement("div", {
133
+ className: "area_config_wrap"
134
+ }, /*#__PURE__*/_react["default"].createElement("span", {
135
+ className: "btn_wrap",
136
+ onClick: this.addArea
137
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
138
+ size: 20,
139
+ type: "icon-add"
140
+ }), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('ADD_CLICKABLE_AREA'))), /*#__PURE__*/_react["default"].createElement("div", {
141
+ className: "list_wrap"
142
+ }, drawCoordinates.map(function (v, i) {
143
+ return /*#__PURE__*/_react["default"].createElement("div", {
144
+ className: "add_item"
145
+ }, /*#__PURE__*/_react["default"].createElement("div", {
146
+ className: "title"
147
+ }, "Clickable Area ", i + 1), /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
148
+ onChange: function onChange(data) {
149
+ v.inputVal = data;
150
+
151
+ _this.setState({
152
+ drawCoordinates: __spreadArrays(drawCoordinates)
153
+ });
154
+ },
155
+ value: v.inputVal
156
+ }));
157
+ })))));
158
+ };
159
+
160
+ return AreaConfigModal;
161
+ }(_react.Component);
162
+
163
+ var _default = AreaConfigModal;
164
+ exports["default"] = _default;