@fonixtree/magic-design 0.0.71 → 0.0.72

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 (323) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +12 -24
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +12 -24
  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/less/modal.less +2 -7
  9. package/es/common/Button/index.js +1 -2
  10. package/es/common/Button/index.less +0 -5
  11. package/es/common/ButtonIconLayout/index.less +2 -4
  12. package/es/common/Collapse/index.js +4 -14
  13. package/es/common/GroupList/index.js +3 -2
  14. package/es/common/ImageModal/index.js +26 -31
  15. package/es/common/ImageModal/index.less +1 -6
  16. package/es/common/LinkModal/BundleCampaign/index.js +17 -17
  17. package/es/common/LinkModal/CustomTable/index.js +1 -2
  18. package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
  19. package/es/common/LinkModal/FilteredProductModal/index.less +2 -6
  20. package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
  21. package/es/common/LinkModal/index.less +1 -1
  22. package/es/common/ProductModal/index.js +1 -1
  23. package/es/common/ProductModal/index.less +7 -12
  24. package/es/common/UrlPicker/index.js +2 -6
  25. package/es/common/UrlPicker/index.less +1 -12
  26. package/es/common/index.js +0 -8
  27. package/es/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
  28. package/es/composite-comp/bol/components/Banner/mobile/index.js +10 -4
  29. package/es/composite-comp/bol/components/Banner/pc/index.js +6 -3
  30. package/es/composite-comp/bol/components/Button/defaultJSON.js +70 -40
  31. package/es/composite-comp/bol/components/Button/index.js +14 -8
  32. package/es/composite-comp/bol/components/Button/index.less +0 -1
  33. package/es/composite-comp/bol/components/Carousel/defaultJSON.js +16 -12
  34. package/es/composite-comp/bol/components/Carousel/index.js +6 -1
  35. package/es/composite-comp/bol/components/Carousel/mobile/index.js +7 -4
  36. package/es/composite-comp/bol/components/Carousel/pc/index.js +7 -12
  37. package/es/composite-comp/bol/components/Carousel/pc/index.less +5 -13
  38. package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
  39. package/es/composite-comp/bol/components/ImageText/defaultJSON.js +166 -26
  40. package/es/composite-comp/bol/components/ImageText/mobile/index.js +5 -2
  41. package/es/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
  42. package/es/composite-comp/bol/components/ImageText/pc/index.js +18 -46
  43. package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +2 -2
  44. package/es/composite-comp/bol/components/Newsletter/index.js +6 -1
  45. package/es/composite-comp/bol/components/Tag/defaultJSON.js +48 -38
  46. package/es/composite-comp/bol/components/Tag/index.js +14 -8
  47. package/es/composite-comp/bol/components/Tag/index.less +0 -1
  48. package/es/composite-comp/bol/components/Text/defaultJSON.js +4 -4
  49. package/es/composite-comp/bol/components/Text/index.js +8 -4
  50. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +1 -3
  51. package/{lib/composite-comp/bol/second-config-panels/TagSecondConfig → es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent}/index.js +38 -40
  52. package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  53. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +2 -4
  54. package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -1
  55. package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +1 -3
  56. package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +1 -2
  57. package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +4 -6
  58. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +17 -9
  59. package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +4 -7
  60. package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +1 -3
  61. package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  62. package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +13 -8
  63. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +5 -10
  64. package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
  65. package/es/composite-comp/common/components/ImageLabel/index.less +2 -6
  66. package/es/composite-comp/common/components/ProductItem/index.less +10 -9
  67. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -24
  68. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  69. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +2 -62
  70. package/es/composite-comp/dito/components/FlashDeal/index.js +1 -5
  71. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
  72. package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +4 -5
  73. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +3 -13
  74. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +2 -3
  75. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +12 -30
  76. package/es/composite-comp/dito/components/Recommend/index.js +6 -5
  77. package/es/composite-comp/dito/components/Recommend/mobile/index.js +35 -40
  78. package/es/composite-comp/dito/components/Recommend/mobile/index.less +3 -10
  79. package/es/composite-comp/dito/components/Recommend/pc/index.js +19 -123
  80. package/es/composite-comp/dito/components/Recommend/pc/index.less +12 -53
  81. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -26
  82. package/es/composite-comp/dito/components/SearchBar/index.js +2 -7
  83. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +23 -26
  84. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +3 -13
  85. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +6 -16
  86. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +0 -20
  87. package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +3 -21
  88. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +3 -17
  89. package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +5 -42
  90. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +29 -39
  91. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +49 -80
  92. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +1 -13
  93. package/es/constants/component-types.js +3 -13
  94. package/es/constants/index.js +2 -20
  95. package/es/constants/layout.js +8 -34
  96. package/es/core/Designer/CompListPanel/index.js +33 -8
  97. package/es/core/Designer/ConfigPanel/index.js +23 -72
  98. package/es/core/Designer/ConfigPanel/index.less +0 -4
  99. package/es/core/Designer/History/index.js +28 -34
  100. package/es/core/Designer/PageCompList/index.js +3 -13
  101. package/es/core/Designer/PageCompList/index.less +10 -10
  102. package/es/core/Designer/QuickMenuBar/index.js +1 -1
  103. package/es/core/Designer/ViewArea/index.js +6 -20
  104. package/es/core/Designer/index.js +37 -42
  105. package/es/core/Renderer/index.js +2 -17
  106. package/es/decorator/compositeDecorator.js +12 -45
  107. package/es/decorator/index.js +0 -8
  108. package/es/decorator/metaDecorator.js +2 -2
  109. package/es/locale/en/en.json +1 -14
  110. package/es/locale/es/es.json +1 -14
  111. package/es/locale/id/id.json +1 -14
  112. package/es/meta-comp/components/Button/index.js +13 -32
  113. package/es/meta-comp/components/Button/index.less +2 -10
  114. package/es/meta-comp/components/Image/index.js +7 -38
  115. package/es/meta-comp/components/Image/index.less +0 -2
  116. package/es/meta-comp/components/Text/index.js +11 -27
  117. package/es/meta-comp/config-panels/BaseConfig.js +10 -8
  118. package/es/meta-comp/config-panels/ButtonConfig/index.js +2 -2
  119. package/es/meta-comp/config-panels/ImageConfig/index.js +4 -17
  120. package/es/meta-comp/config-panels/TextConfig/index.js +3 -10
  121. package/es/mobx/Store.js +10 -6
  122. package/es/utils/coreUtil.js +3 -17
  123. package/lib/assets/fonts/magic-box-iconfont.css +12 -24
  124. package/lib/assets/fonts/magic-box-iconfont.css.bak +12 -24
  125. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  126. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  127. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  128. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  129. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  130. package/lib/assets/less/modal.less +2 -7
  131. package/lib/common/Button/index.js +1 -2
  132. package/lib/common/Button/index.less +0 -5
  133. package/lib/common/ButtonIconLayout/index.less +2 -4
  134. package/lib/common/Collapse/index.js +4 -14
  135. package/lib/common/GroupList/index.js +3 -2
  136. package/lib/common/ImageModal/index.js +26 -31
  137. package/lib/common/ImageModal/index.less +1 -6
  138. package/lib/common/LinkModal/BundleCampaign/index.js +17 -17
  139. package/lib/common/LinkModal/CustomTable/index.js +1 -2
  140. package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
  141. package/lib/common/LinkModal/FilteredProductModal/index.less +2 -6
  142. package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
  143. package/lib/common/LinkModal/index.less +1 -1
  144. package/lib/common/ProductModal/index.js +1 -1
  145. package/lib/common/ProductModal/index.less +7 -12
  146. package/lib/common/UrlPicker/index.js +2 -6
  147. package/lib/common/UrlPicker/index.less +1 -12
  148. package/lib/common/index.js +0 -8
  149. package/lib/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
  150. package/lib/composite-comp/bol/components/Banner/mobile/index.js +10 -4
  151. package/lib/composite-comp/bol/components/Banner/pc/index.js +6 -3
  152. package/lib/composite-comp/bol/components/Button/defaultJSON.js +70 -40
  153. package/lib/composite-comp/bol/components/Button/index.js +14 -8
  154. package/lib/composite-comp/bol/components/Button/index.less +0 -1
  155. package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +16 -12
  156. package/lib/composite-comp/bol/components/Carousel/index.js +6 -1
  157. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +7 -4
  158. package/lib/composite-comp/bol/components/Carousel/pc/index.js +7 -12
  159. package/lib/composite-comp/bol/components/Carousel/pc/index.less +5 -13
  160. package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
  161. package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +166 -26
  162. package/lib/composite-comp/bol/components/ImageText/mobile/index.js +5 -2
  163. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
  164. package/lib/composite-comp/bol/components/ImageText/pc/index.js +18 -46
  165. package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +2 -2
  166. package/lib/composite-comp/bol/components/Newsletter/index.js +6 -1
  167. package/lib/composite-comp/bol/components/Tag/defaultJSON.js +48 -38
  168. package/lib/composite-comp/bol/components/Tag/index.js +14 -8
  169. package/lib/composite-comp/bol/components/Tag/index.less +0 -1
  170. package/lib/composite-comp/bol/components/Text/defaultJSON.js +4 -4
  171. package/lib/composite-comp/bol/components/Text/index.js +8 -4
  172. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +1 -3
  173. package/{es/composite-comp/bol/second-config-panels/TagSecondConfig → lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent}/index.js +38 -40
  174. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
  175. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +2 -4
  176. package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -1
  177. package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +1 -3
  178. package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +1 -2
  179. package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +4 -6
  180. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +17 -9
  181. package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +4 -7
  182. package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +1 -3
  183. package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
  184. package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +13 -8
  185. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +5 -10
  186. package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
  187. package/lib/composite-comp/common/components/ImageLabel/index.less +2 -6
  188. package/lib/composite-comp/common/components/ProductItem/index.less +10 -9
  189. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -24
  190. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
  191. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +2 -62
  192. package/lib/composite-comp/dito/components/FlashDeal/index.js +1 -5
  193. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
  194. package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +4 -5
  195. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +3 -13
  196. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +2 -3
  197. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +12 -30
  198. package/lib/composite-comp/dito/components/Recommend/index.js +6 -5
  199. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +35 -40
  200. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +3 -10
  201. package/lib/composite-comp/dito/components/Recommend/pc/index.js +19 -123
  202. package/lib/composite-comp/dito/components/Recommend/pc/index.less +12 -53
  203. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -26
  204. package/lib/composite-comp/dito/components/SearchBar/index.js +2 -7
  205. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +23 -26
  206. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +3 -13
  207. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +6 -16
  208. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +0 -20
  209. package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +3 -21
  210. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +3 -17
  211. package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +5 -42
  212. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +29 -39
  213. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +49 -80
  214. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +1 -13
  215. package/lib/constants/component-types.js +3 -13
  216. package/lib/constants/index.js +2 -20
  217. package/lib/constants/layout.js +8 -34
  218. package/lib/core/Designer/CompListPanel/index.js +33 -8
  219. package/lib/core/Designer/ConfigPanel/index.js +23 -72
  220. package/lib/core/Designer/ConfigPanel/index.less +0 -4
  221. package/lib/core/Designer/History/index.js +28 -34
  222. package/lib/core/Designer/PageCompList/index.js +3 -13
  223. package/lib/core/Designer/PageCompList/index.less +10 -10
  224. package/lib/core/Designer/QuickMenuBar/index.js +1 -1
  225. package/lib/core/Designer/ViewArea/index.js +6 -20
  226. package/lib/core/Designer/index.js +37 -42
  227. package/lib/core/Renderer/index.js +2 -17
  228. package/lib/decorator/compositeDecorator.js +12 -45
  229. package/lib/decorator/index.js +0 -8
  230. package/lib/decorator/metaDecorator.js +2 -2
  231. package/lib/locale/en/en.json +1 -14
  232. package/lib/locale/es/es.json +1 -14
  233. package/lib/locale/id/id.json +1 -14
  234. package/lib/meta-comp/components/Button/index.js +13 -32
  235. package/lib/meta-comp/components/Button/index.less +2 -10
  236. package/lib/meta-comp/components/Image/index.js +7 -38
  237. package/lib/meta-comp/components/Image/index.less +0 -2
  238. package/lib/meta-comp/components/Text/index.js +11 -27
  239. package/lib/meta-comp/config-panels/BaseConfig.js +10 -8
  240. package/lib/meta-comp/config-panels/ButtonConfig/index.js +2 -2
  241. package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -17
  242. package/lib/meta-comp/config-panels/TextConfig/index.js +3 -10
  243. package/lib/mobx/Store.js +10 -6
  244. package/lib/utils/coreUtil.js +3 -17
  245. package/package.json +3 -5
  246. package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  247. package/es/common/ImgArea/components/Crop.js +0 -267
  248. package/es/common/ImgArea/components/Icons.js +0 -44
  249. package/es/common/ImgArea/components/MultiCrops.js +0 -210
  250. package/es/common/ImgArea/index.js +0 -11
  251. package/es/common/MagicLink/index.js +0 -89
  252. package/es/common/MagicLink/index.less +0 -0
  253. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +0 -141
  254. package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +0 -16
  255. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +0 -141
  256. package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +0 -16
  257. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +0 -103
  258. package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +0 -3
  259. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +0 -8
  260. package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +0 -3
  261. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
  262. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
  263. package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
  264. package/es/composite-comp/dito/components/FlashDeal/pc/index.js +0 -578
  265. package/es/composite-comp/dito/components/FlashDeal/pc/index.less +0 -121
  266. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +0 -131
  267. package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +0 -6
  268. package/es/composite-comp/dito/components/PcNavigation/index.js +0 -85
  269. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +0 -478
  270. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +0 -98
  271. package/es/composite-comp/dito/components/SearchBar/pc/index.js +0 -151
  272. package/es/composite-comp/dito/components/SearchBar/pc/index.less +0 -59
  273. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +0 -130
  274. package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +0 -128
  275. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +0 -222
  276. package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +0 -195
  277. package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +0 -102
  278. package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +0 -73
  279. package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +0 -29
  280. package/es/decorator/updateConfigDecorator.js +0 -76
  281. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +0 -164
  282. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +0 -26
  283. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +0 -133
  284. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +0 -17
  285. package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
  286. package/lib/common/ImgArea/components/Crop.js +0 -267
  287. package/lib/common/ImgArea/components/Icons.js +0 -44
  288. package/lib/common/ImgArea/components/MultiCrops.js +0 -210
  289. package/lib/common/ImgArea/index.js +0 -11
  290. package/lib/common/MagicLink/index.js +0 -89
  291. package/lib/common/MagicLink/index.less +0 -0
  292. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +0 -141
  293. package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +0 -16
  294. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +0 -141
  295. package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +0 -16
  296. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +0 -103
  297. package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +0 -3
  298. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +0 -8
  299. package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +0 -3
  300. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
  301. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
  302. package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
  303. package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +0 -578
  304. package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +0 -121
  305. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +0 -131
  306. package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +0 -6
  307. package/lib/composite-comp/dito/components/PcNavigation/index.js +0 -85
  308. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +0 -478
  309. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +0 -98
  310. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +0 -151
  311. package/lib/composite-comp/dito/components/SearchBar/pc/index.less +0 -59
  312. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +0 -130
  313. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +0 -128
  314. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +0 -222
  315. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +0 -195
  316. package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +0 -102
  317. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +0 -73
  318. package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +0 -29
  319. package/lib/decorator/updateConfigDecorator.js +0 -76
  320. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +0 -164
  321. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +0 -26
  322. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +0 -133
  323. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +0 -17
@@ -1,164 +0,0 @@
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;
@@ -1,26 +0,0 @@
1
-
2
- .body_wrap {
3
- display: flex;
4
-
5
- .area_config_wrap {
6
- margin-left: 23px;
7
- width: 259px;
8
- max-height: 480px;
9
- padding-right: 10px;
10
- .list_wrap {
11
- height: calc(100% - 30px);
12
- overflow: auto;
13
- .add_item {
14
- margin-top: 18px;
15
- }
16
- }
17
-
18
- .btn_wrap {
19
- cursor: pointer;
20
- display: flex;
21
- align-items: center;
22
- color: #2F54EB;
23
- margin-top: 10px;
24
- }
25
- }
26
- }
@@ -1,133 +0,0 @@
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("./index.less");
13
-
14
- var _antd = require("antd");
15
-
16
- var _coreUtil = require("../../../../utils/coreUtil");
17
-
18
- var _locale = require("../../../../locale");
19
-
20
- var _common = require("../../../../common");
21
-
22
- var _AreaConfigModal = _interopRequireDefault(require("../AreaConfigModal"));
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
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); }
27
-
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; }
29
-
30
- var __extends = void 0 && (void 0).__extends || function () {
31
- var _extendStatics = function extendStatics(d, b) {
32
- _extendStatics = Object.setPrototypeOf || {
33
- __proto__: []
34
- } instanceof Array && function (d, b) {
35
- d.__proto__ = b;
36
- } || function (d, b) {
37
- for (var p in b) {
38
- if (b.hasOwnProperty(p)) d[p] = b[p];
39
- }
40
- };
41
-
42
- return _extendStatics(d, b);
43
- };
44
-
45
- return function (d, b) {
46
- _extendStatics(d, b);
47
-
48
- function __() {
49
- this.constructor = d;
50
- }
51
-
52
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
53
- };
54
- }();
55
-
56
- var HotAreaConfig =
57
- /** @class */
58
- function (_super) {
59
- __extends(HotAreaConfig, _super);
60
-
61
- function HotAreaConfig() {
62
- var _this = _super !== null && _super.apply(this, arguments) || this;
63
-
64
- _this.state = {
65
- visible: false
66
- };
67
-
68
- _this.onCheckboxChange = function (e) {
69
- var _a = _this.props,
70
- option = _a.option,
71
- onChange = _a.onChange;
72
- console.log(e.target.checked);
73
- option.clickUrl = '';
74
- option.openHotArea = e.target.checked; // this.setState({});
75
-
76
- onChange();
77
- };
78
-
79
- _this.onAddArea = function () {
80
- _this.setState({
81
- visible: true
82
- });
83
- };
84
-
85
- _this.onOk = function (data) {
86
- if ((0, _coreUtil.isPc)()) {
87
- _this.props.option.pcAreas = data;
88
- } else {
89
- _this.props.option.h5Areas = data;
90
- }
91
-
92
- _this.setState({
93
- visible: false
94
- });
95
- };
96
-
97
- _this.onCancel = function () {
98
- _this.setState({
99
- visible: false
100
- });
101
- };
102
-
103
- return _this;
104
- }
105
-
106
- HotAreaConfig.prototype.render = function () {
107
- var option = this.props.option;
108
- var visible = this.state.visible;
109
- return /*#__PURE__*/_react["default"].createElement("div", {
110
- className: "hot_area_wrap"
111
- }, /*#__PURE__*/_react["default"].createElement("div", {
112
- className: "area_wrap mb14"
113
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('CLICKABLE_AREA')), /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
114
- checked: option.openHotArea,
115
- onChange: this.onCheckboxChange
116
- })), option.openHotArea && /*#__PURE__*/_react["default"].createElement(_common.Button, {
117
- icon: "icon-add",
118
- onClick: this.onAddArea,
119
- type: "primary"
120
- }, (0, _locale.i18n)('ADD_AREA')), /*#__PURE__*/_react["default"].createElement(_AreaConfigModal["default"], {
121
- imgUrl: this.props.imgUrl,
122
- onCancel: this.onCancel,
123
- onOk: this.onOk,
124
- value: (0, _coreUtil.isPc)() ? option.pcAreas : option.h5Areas,
125
- visible: visible
126
- }));
127
- };
128
-
129
- return HotAreaConfig;
130
- }(_react.Component);
131
-
132
- var _default = HotAreaConfig;
133
- exports["default"] = _default;
@@ -1,17 +0,0 @@
1
-
2
- .hot_area_wrap {
3
- border-bottom: 1px dashed #D2D9E5;
4
- margin-bottom: 16px;
5
- padding-bottom: 12px;
6
- .area_wrap {
7
- display: flex;
8
- align-items: center;
9
- justify-content: space-between;
10
- font-family: 'Open Sans';
11
- font-style: normal;
12
- font-weight: 600;
13
- font-size: 14px;
14
- color: #232F46;
15
- }
16
- }
17
-
@@ -1,267 +0,0 @@
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"] = exports.coordinateType = void 0;
9
-
10
- var _interactjs = _interopRequireDefault(require("interactjs"));
11
-
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
- var _ramda = require("ramda");
15
-
16
- var _react = _interopRequireWildcard(require("react"));
17
-
18
- var _Icons = require("./Icons");
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
26
- var __extends = void 0 && (void 0).__extends || function () {
27
- var _extendStatics = function extendStatics(d, b) {
28
- _extendStatics = Object.setPrototypeOf || {
29
- __proto__: []
30
- } instanceof Array && function (d, b) {
31
- d.__proto__ = b;
32
- } || function (d, b) {
33
- for (var p in b) {
34
- if (b.hasOwnProperty(p)) d[p] = b[p];
35
- }
36
- };
37
-
38
- return _extendStatics(d, b);
39
- };
40
-
41
- return function (d, b) {
42
- _extendStatics(d, b);
43
-
44
- function __() {
45
- this.constructor = d;
46
- }
47
-
48
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
- };
50
- }();
51
-
52
- var __assign = void 0 && (void 0).__assign || function () {
53
- __assign = Object.assign || function (t) {
54
- for (var s, i = 1, n = arguments.length; i < n; i++) {
55
- s = arguments[i];
56
-
57
- for (var p in s) {
58
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
59
- }
60
- }
61
-
62
- return t;
63
- };
64
-
65
- return __assign.apply(this, arguments);
66
- };
67
-
68
- var Crop =
69
- /** @class */
70
- function (_super) {
71
- __extends(Crop, _super);
72
-
73
- function Crop() {
74
- var _this = _super !== null && _super.apply(this, arguments) || this; // shouldComponentUpdate(nextProps) {
75
- // // reduce uncessary update
76
- // return !equals(nextProps.coordinate.inputVal, this.state.inputVal)||!equals(nextProps.coordinate, this.props.coordinate)
77
- // || (nextProps.index !== this.props.index)
78
- // }
79
-
80
-
81
- _this.handleResizeMove = function (e) {
82
- var _a = _this.props,
83
- index = _a.index,
84
- coordinate = _a.coordinate,
85
- _b = _a.coordinate,
86
- x = _b.x,
87
- y = _b.y,
88
- coordinates = _a.coordinates,
89
- onResize = _a.onResize,
90
- onChange = _a.onChange,
91
- onSave = _a.onSave;
92
- var _c = e.rect,
93
- width = _c.width,
94
- height = _c.height;
95
- var _d = e.deltaRect,
96
- left = _d.left,
97
- top = _d.top; // console.log(x, left, y, top);
98
- // if (x + left < 0 || y + top < 0 || x + left + width > 500 || y + top + height > 500) {
99
- // return;
100
- // }
101
-
102
- var nextCoordinate = __assign(__assign({}, coordinate), {
103
- x: x + left,
104
- y: y + top,
105
- width: width,
106
- height: height
107
- });
108
-
109
- var nextCoordinates = (0, _ramda.update)(index, nextCoordinate)(coordinates);
110
-
111
- if ((0, _ramda.is)(Function, onResize)) {
112
- onResize(nextCoordinate, index, nextCoordinates);
113
- }
114
-
115
- if ((0, _ramda.is)(Function, onChange)) {
116
- onChange(nextCoordinate, index, nextCoordinates);
117
- }
118
- };
119
-
120
- _this.handleDragMove = function (e) {
121
- var _a = _this.props,
122
- index = _a.index,
123
- coordinate = _a.coordinate,
124
- _b = _a.coordinate,
125
- x = _b.x,
126
- y = _b.y,
127
- coordinates = _a.coordinates,
128
- onDrag = _a.onDrag,
129
- onChange = _a.onChange;
130
- var dx = e.dx,
131
- dy = e.dy;
132
-
133
- var nextCoordinate = __assign(__assign({}, coordinate), {
134
- x: x + dx,
135
- y: y + dy
136
- });
137
-
138
- var nextCoordinates = (0, _ramda.update)(index, nextCoordinate)(coordinates);
139
-
140
- if ((0, _ramda.is)(Function, onDrag)) {
141
- onDrag(nextCoordinate, index, nextCoordinates);
142
- }
143
-
144
- if ((0, _ramda.is)(Function, onChange)) {
145
- onChange(nextCoordinate, index, nextCoordinates);
146
- }
147
- };
148
-
149
- _this.handleDelete = function () {
150
- var _a = _this.props,
151
- index = _a.index,
152
- coordinate = _a.coordinate,
153
- onDelete = _a.onDelete,
154
- coordinates = _a.coordinates;
155
- var nextCoordinates = (0, _ramda.remove)(index, 1)(coordinates);
156
-
157
- if ((0, _ramda.is)(Function, onDelete)) {
158
- onDelete(coordinate, index, nextCoordinates);
159
- }
160
- };
161
-
162
- _this.state = {
163
- inputVal: _this.props.coordinate && _this.props.coordinate.inputVal || ''
164
- };
165
-
166
- _this.handleSave = function () {
167
- var _a = _this.props,
168
- coordinate = _a.coordinate,
169
- _b = _a.coordinate,
170
- x = _b.x,
171
- y = _b.y,
172
- coordinates = _a.coordinates,
173
- index = _a.index,
174
- onSave = _a.onSave;
175
-
176
- var nextCoordinate = __assign(__assign({}, coordinate), {
177
- x: x,
178
- y: y,
179
- inputVal: _this.state.inputVal
180
- });
181
-
182
- var nextCoordinates = (0, _ramda.update)(index, nextCoordinate)(coordinates);
183
- onSave && onSave(coordinate, index, nextCoordinates);
184
- (0, _interactjs["default"])(_this.crop).unset();
185
- };
186
-
187
- return _this;
188
- }
189
-
190
- Crop.prototype.componentDidMount = function () {
191
- (0, _interactjs["default"])(this.crop).draggable({
192
- modifiers: [_interactjs["default"].modifiers.restrictRect({
193
- restriction: 'parent'
194
- })]
195
- }).resizable({
196
- edges: {
197
- left: true,
198
- right: true,
199
- bottom: true,
200
- top: true
201
- }
202
- }).on('dragmove', this.handleDragMove).on('resizemove', this.handleResizeMove);
203
- };
204
-
205
- Crop.prototype.componentWillUnmount = function () {
206
- (0, _interactjs["default"])(this.crop).unset();
207
- };
208
-
209
- Crop.prototype.render = function () {
210
- var _this = this;
211
-
212
- var _a = this.props,
213
- coordinate = _a.coordinate,
214
- index = _a.index,
215
- onSave = _a.onSave;
216
- return /*#__PURE__*/_react["default"].createElement("div", {
217
- ref: function ref(crop) {
218
- return _this.crop = crop;
219
- },
220
- style: Crop.cropStyle(coordinate)
221
- }, /*#__PURE__*/_react["default"].createElement(_Icons.NumberIcon, {
222
- number: index + 1
223
- }), /*#__PURE__*/_react["default"].createElement(_Icons.DeleteIcon, {
224
- onClick: this.handleDelete
225
- }));
226
- };
227
-
228
- Crop.cropStyle = function (coordinate) {
229
- var x = coordinate.x,
230
- y = coordinate.y,
231
- width = coordinate.width,
232
- height = coordinate.height;
233
- return {
234
- display: 'inline-block',
235
- position: 'absolute',
236
- width: width,
237
- height: height,
238
- top: y,
239
- left: x,
240
- border: '1px dashed #2F54EB',
241
- background: 'rgba(47, 84, 235, 0.15)'
242
- };
243
- };
244
-
245
- return Crop;
246
- }(_react.Component);
247
-
248
- var coordinateType = _propTypes["default"].shape({
249
- x: _propTypes["default"].number.isRequired,
250
- y: _propTypes["default"].number.isRequired,
251
- width: _propTypes["default"].number.isRequired,
252
- height: _propTypes["default"].number.isRequired
253
- });
254
-
255
- exports.coordinateType = coordinateType;
256
- Crop.propTypes = {
257
- coordinate: coordinateType.isRequired,
258
- index: _propTypes["default"].number.isRequired,
259
- onResize: _propTypes["default"].func,
260
- onDrag: _propTypes["default"].func,
261
- onDelete: _propTypes["default"].func,
262
- onChange: _propTypes["default"].func,
263
- coordinates: _propTypes["default"].array,
264
- onSave: _propTypes["default"].func
265
- };
266
- var _default = Crop;
267
- exports["default"] = _default;
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.NumberIcon = exports.DeleteIcon = void 0;
7
-
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
- var DeleteIcon = function DeleteIcon(props) {
17
- return /*#__PURE__*/_react["default"].createElement("div", _extends({
18
- className: "rmc-icon-container"
19
- }, props), /*#__PURE__*/_react["default"].createElement("div", {
20
- className: "rmc-remove"
21
- }), /*#__PURE__*/_react["default"].createElement("style", {
22
- jsx: "true"
23
- }, "\n .rmc-icon-container {\n width: 15px;\n height: 15px;\n cursor: pointer;\n float: right;\n background:#2F54EB;\n opacity: 0.8;\n }\n .rmc-remove {\n color: white;\n position: absolute;\n margin-top: 6px;\n }\n\n .rmc-remove:hover {\n cursor: pointer;\n }\n\n .rmc-remove:before {\n content: '';\n position: absolute;\n width: 15px;\n height: 1px;\n background-color: currentColor;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n .rmc-remove:after {\n content: '';\n position: absolute;\n width: 15px;\n height: 1px;\n background-color: currentColor;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n "));
24
- };
25
-
26
- exports.DeleteIcon = DeleteIcon;
27
-
28
- var NumberIcon = function NumberIcon(_a) {
29
- var number = _a.number;
30
- return /*#__PURE__*/_react["default"].createElement("div", {
31
- className: "rmc-number"
32
- }, number, /*#__PURE__*/_react["default"].createElement("style", {
33
- jsx: "true"
34
- }, "\n .rmc-number {\n height: 15px;\n width: 15px;\n float: left;\n font-size: 12px;\n background:#2F54EB;\n text-align: center;\n line-height: 15px;\n color: white;\n opacity: 0.8;\n }\n "));
35
- };
36
-
37
- exports.NumberIcon = NumberIcon;
38
- var number = _propTypes["default"].number;
39
- NumberIcon.propTypes = {
40
- number: number
41
- };
42
- NumberIcon.defaultProps = {
43
- number: ''
44
- };