@fonixtree/magic-design 0.0.7 → 0.0.10

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 (262) hide show
  1. package/_virtual/__node-resolve_empty.js +6 -0
  2. package/_virtual/_cloneBuffer.js +3 -0
  3. package/_virtual/_commonjsHelpers.js +24 -0
  4. package/_virtual/_node-resolve_empty.js +3 -0
  5. package/_virtual/_nodeUtil.js +3 -0
  6. package/_virtual/_rollupPluginBabelHelpers.js +18 -0
  7. package/_virtual/index.js +3 -0
  8. package/_virtual/index2.js +3 -0
  9. package/_virtual/index3.js +3 -0
  10. package/_virtual/index4.js +3 -0
  11. package/_virtual/index5.js +5 -0
  12. package/_virtual/interopRequireDefault.js +3 -0
  13. package/_virtual/isBuffer.js +3 -0
  14. package/_virtual/react-is.development.js +3 -0
  15. package/_virtual/react-is.production.min.js +3 -0
  16. package/_virtual/rng-browser.js +3 -0
  17. package/_virtual/toArray.js +3 -0
  18. package/package.json +22 -3
  19. package/src/components/assets/images/layout-icon/carouselLayout1.png.js +3 -0
  20. package/src/components/assets/images/layout-icon/carouselLayout2.png.js +3 -0
  21. package/src/components/assets/images/layout-icon/dividerLayout.svg.js +3 -0
  22. package/src/components/assets/images/layout-icon/imageGalleryLayout1.png.js +3 -0
  23. package/src/components/assets/images/layout-icon/imageGalleryLayout2.png.js +3 -0
  24. package/src/components/assets/images/layout-icon/imageGalleryLayout3.png.js +3 -0
  25. package/src/components/assets/images/layout-icon/layout-imagetext-m1-1.png.js +3 -0
  26. package/src/components/assets/images/layout-icon/layout-imagetext-m1-2.png.js +3 -0
  27. package/src/components/assets/images/layout-icon/layout-imagetext-m1-3.png.js +3 -0
  28. package/src/components/assets/images/layout-icon/layout-imagetext-m2.png.js +3 -0
  29. package/src/components/assets/images/layout-icon/layout-imagetext-m3.png.js +3 -0
  30. package/src/components/assets/images/layout-icon/layout-imagetext-p1.png.js +3 -0
  31. package/src/components/assets/images/layout-icon/layout-imagetext-p2.png.js +3 -0
  32. package/src/components/assets/images/layout-icon/layout-imagetext-p4.png.js +3 -0
  33. package/src/components/assets/images/layout-icon/layout-search.png.js +3 -0
  34. package/src/components/assets/images/layout-icon/newsletter.svg.js +3 -0
  35. package/src/components/assets/less/cylon-antd.less.js +3 -0
  36. package/src/components/assets/less/index.less.js +4 -0
  37. package/src/components/common/AlignSelector/index.js +65 -0
  38. package/src/components/common/AlignSelector/index.less.js +4 -0
  39. package/src/components/common/Button/index.js +75 -0
  40. package/src/components/common/Button/index.less.js +4 -0
  41. package/src/components/common/ButtonIconLayout/index.js +66 -0
  42. package/src/components/common/ButtonIconLayout/index.less.js +4 -0
  43. package/src/components/common/Collapse/index.js +323 -0
  44. package/src/components/common/Collapse/index.less.js +4 -0
  45. package/src/components/common/ColorPicker/index.js +94 -0
  46. package/src/components/common/ColorPicker/index.less.js +4 -0
  47. package/src/components/common/ColorPickerInput/index.js +76 -0
  48. package/src/components/common/ColorPickerInput/index.less.js +4 -0
  49. package/src/components/common/CountDown/index.js +110 -0
  50. package/src/components/common/CountDown/index.less.js +4 -0
  51. package/src/components/common/Field/index.js +43 -0
  52. package/src/components/common/Field/index.less.js +4 -0
  53. package/src/components/common/FontStyles/index.js +124 -0
  54. package/src/components/common/FontStyles/index.less.js +4 -0
  55. package/src/components/common/GroupList/defaultImg.png.js +3 -0
  56. package/src/components/common/GroupList/index.js +170 -0
  57. package/src/components/common/GroupList/index.less.js +4 -0
  58. package/src/components/common/IconPicker/index.js +93 -0
  59. package/src/components/common/IconPicker/index.less.js +4 -0
  60. package/src/components/common/Iconfont/index.js +74 -0
  61. package/src/components/common/Iconfont/index.less.js +4 -0
  62. package/src/components/common/ImageModal/CommonModal/const.js +16 -0
  63. package/src/components/common/ImageModal/CommonModal/index.js +33 -0
  64. package/src/components/common/ImageModal/CommonSelPicCard/index.js +66 -0
  65. package/src/components/common/ImageModal/CommonSelPicCard/index.less.js +4 -0
  66. package/src/components/common/ImageModal/const.js +18 -0
  67. package/src/components/common/ImageModal/index.js +547 -0
  68. package/src/components/common/ImageModal/index.less.js +4 -0
  69. package/src/components/common/ImagePicker/index.js +124 -0
  70. package/src/components/common/ImagePicker/index.less.js +4 -0
  71. package/src/components/common/InputNumber/index.js +54 -0
  72. package/src/components/common/InputNumber/index.less.js +4 -0
  73. package/src/components/common/LayoutSelector/imgs/center.png.js +3 -0
  74. package/src/components/common/LayoutSelector/imgs/left.png.js +3 -0
  75. package/src/components/common/LayoutSelector/imgs/right.png.js +3 -0
  76. package/src/components/common/LayoutSelector/index.js +70 -0
  77. package/src/components/common/LayoutSelector/index.less.js +4 -0
  78. package/src/components/common/LinkModal/CatgTable/index.js +78 -0
  79. package/src/components/common/LinkModal/CouponTable/index.js +111 -0
  80. package/src/components/common/LinkModal/CustomTable/index.js +72 -0
  81. package/src/components/common/LinkModal/FilteredProductModal/index.js +463 -0
  82. package/src/components/common/LinkModal/FilteredProductModal/index.less.js +4 -0
  83. package/src/components/common/LinkModal/FunctionTable/index.js +66 -0
  84. package/src/components/common/LinkModal/ProductDetailPage/index.js +241 -0
  85. package/src/components/common/LinkModal/ProductDetailPage/index.less.js +4 -0
  86. package/src/components/common/LinkModal/index.js +112 -0
  87. package/src/components/common/LinkModal/index.less.js +4 -0
  88. package/src/components/common/NewImg/index.js +91 -0
  89. package/src/components/common/ProductModal/index.js +556 -0
  90. package/src/components/common/ProductModal/index.less.js +4 -0
  91. package/src/components/common/ProductSource/index.js +91 -0
  92. package/src/components/common/ProductSource/index.less.js +4 -0
  93. package/src/components/common/RcCollapse/Collapse.js +176 -0
  94. package/src/components/common/RcCollapse/Panel.js +146 -0
  95. package/src/components/common/RcCollapse/PanelContent.js +41 -0
  96. package/src/components/common/RcCollapse/index.js +6 -0
  97. package/src/components/common/RcCollapse/index.less.js +4 -0
  98. package/src/components/common/RcCollapse/motionUtil.js +37 -0
  99. package/src/components/common/Slider/index.js +95 -0
  100. package/src/components/common/Slider/index.less.js +4 -0
  101. package/src/components/common/SwitchCollapse/index.js +162 -0
  102. package/src/components/common/SwitchCollapse/index.less.js +4 -0
  103. package/src/components/common/UrlPicker/index.js +81 -0
  104. package/src/components/common/UrlPicker/index.less.js +4 -0
  105. package/src/components/composite-comp/bol/components/Banner/defaultJSON.js +258 -0
  106. package/src/components/composite-comp/bol/components/Banner/imgs/banner.png.js +3 -0
  107. package/src/components/composite-comp/bol/components/Banner/index.js +34 -0
  108. package/src/components/composite-comp/bol/components/Banner/mobile/index.js +176 -0
  109. package/src/components/composite-comp/bol/components/Banner/mobile/index.less.js +4 -0
  110. package/src/components/composite-comp/bol/components/Banner/pc/index.js +254 -0
  111. package/src/components/composite-comp/bol/components/Banner/pc/index.less.js +4 -0
  112. package/src/components/composite-comp/bol/components/Button/defaultJSON.js +93 -0
  113. package/src/components/composite-comp/bol/components/Button/index.js +48 -0
  114. package/src/components/composite-comp/bol/components/Button/index.less.js +4 -0
  115. package/src/components/composite-comp/bol/components/Carousel/defaultJSON.js +286 -0
  116. package/src/components/composite-comp/bol/components/Carousel/imgs/defaultImg.png.js +3 -0
  117. package/src/components/composite-comp/bol/components/Carousel/index.js +37 -0
  118. package/src/components/composite-comp/bol/components/Carousel/mobile/index.js +217 -0
  119. package/src/components/composite-comp/bol/components/Carousel/mobile/index.less.js +4 -0
  120. package/src/components/composite-comp/bol/components/Carousel/pc/index.js +208 -0
  121. package/src/components/composite-comp/bol/components/Carousel/pc/index.less.js +4 -0
  122. package/src/components/composite-comp/bol/components/Divider/defaultJSON.js +40 -0
  123. package/src/components/composite-comp/bol/components/Divider/index.js +48 -0
  124. package/src/components/composite-comp/bol/components/ImageGallery/defaultJSON.js +64 -0
  125. package/src/components/composite-comp/bol/components/ImageGallery/index.js +30 -0
  126. package/src/components/composite-comp/bol/components/ImageGallery/mobile/index.js +47 -0
  127. package/src/components/composite-comp/bol/components/ImageGallery/mobile/index.less.js +4 -0
  128. package/src/components/composite-comp/bol/components/ImageText/defaultJSON.js +535 -0
  129. package/src/components/composite-comp/bol/components/ImageText/index.js +33 -0
  130. package/src/components/composite-comp/bol/components/ImageText/mobile/index.js +143 -0
  131. package/src/components/composite-comp/bol/components/ImageText/mobile/index.less.js +4 -0
  132. package/src/components/composite-comp/bol/components/ImageText/pc/index.js +112 -0
  133. package/src/components/composite-comp/bol/components/ImageText/pc/index.less.js +4 -0
  134. package/src/components/composite-comp/bol/components/Newsletter/defaultJSON.js +114 -0
  135. package/src/components/composite-comp/bol/components/Newsletter/index.js +65 -0
  136. package/src/components/composite-comp/bol/components/Newsletter/index.less.js +4 -0
  137. package/src/components/composite-comp/bol/components/Tag/defaultJSON.js +91 -0
  138. package/src/components/composite-comp/bol/components/Tag/index.js +52 -0
  139. package/src/components/composite-comp/bol/components/Tag/index.less.js +4 -0
  140. package/src/components/composite-comp/bol/components/Text/defaultJSON.js +125 -0
  141. package/src/components/composite-comp/bol/components/Text/index.js +68 -0
  142. package/src/components/composite-comp/bol/components/Text/index.less.js +4 -0
  143. package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +73 -0
  144. package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.less.js +4 -0
  145. package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +200 -0
  146. package/src/components/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.less.js +4 -0
  147. package/src/components/composite-comp/bol/config-panels/BannerConfig/index.js +35 -0
  148. package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent/index.js +79 -0
  149. package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png.js +3 -0
  150. package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png.js +3 -0
  151. package/src/components/composite-comp/bol/config-panels/ButtonCompConfig/index.js +53 -0
  152. package/src/components/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +91 -0
  153. package/src/components/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.js +175 -0
  154. package/src/components/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigSetting/index.less.js +4 -0
  155. package/src/components/composite-comp/bol/config-panels/CarouselConfig/imgs/defaultImg.png.js +3 -0
  156. package/src/components/composite-comp/bol/config-panels/CarouselConfig/index.js +54 -0
  157. package/src/components/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +153 -0
  158. package/src/components/composite-comp/bol/config-panels/DividerConfig/DividerSpacingSetting/index.js +66 -0
  159. package/src/components/composite-comp/bol/config-panels/DividerConfig/index.js +44 -0
  160. package/src/components/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +91 -0
  161. package/src/components/composite-comp/bol/config-panels/ImageGalleryConfig/imgs/defaultImg.png.js +3 -0
  162. package/src/components/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +44 -0
  163. package/src/components/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +74 -0
  164. package/src/components/composite-comp/bol/config-panels/ImageTextConfig/index.js +170 -0
  165. package/src/components/composite-comp/bol/config-panels/NewsletterConfig/InputField/index.js +143 -0
  166. package/src/components/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +89 -0
  167. package/src/components/composite-comp/bol/config-panels/NewsletterConfig/index.js +44 -0
  168. package/src/components/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +88 -0
  169. package/src/components/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png.js +3 -0
  170. package/src/components/composite-comp/bol/config-panels/TagCompConfig/index.js +48 -0
  171. package/src/components/composite-comp/bol/config-panels/TextCompConfig/TextConfigContent/index.js +79 -0
  172. package/src/components/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +85 -0
  173. package/src/components/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.less.js +4 -0
  174. package/src/components/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png.js +3 -0
  175. package/src/components/composite-comp/bol/config-panels/TextCompConfig/index.js +55 -0
  176. package/src/components/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +109 -0
  177. package/src/components/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +107 -0
  178. package/src/components/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +116 -0
  179. package/src/components/composite-comp/bol/second-config-panels/TextSecondConfig/TextContentConfigContent/index.js +79 -0
  180. package/src/components/composite-comp/bol/second-config-panels/TextSecondConfig/index.js +70 -0
  181. package/src/components/composite-comp/common/components/ImageLabel/index.js +47 -0
  182. package/src/components/composite-comp/common/components/ImageLabel/index.less.js +4 -0
  183. package/src/components/composite-comp/common/components/ProductItem/index.js +121 -0
  184. package/src/components/composite-comp/common/components/ProductItem/index.less.js +4 -0
  185. package/src/components/composite-comp/common/config-panels/BackgroundConfig/index.js +89 -0
  186. package/src/components/composite-comp/common/config-panels/CustomizeConfig/index.js +182 -0
  187. package/src/components/composite-comp/common/config-panels/CustomizeConfig/index.less.js +4 -0
  188. package/src/components/composite-comp/common/config-panels/SpacingConfig/index.js +133 -0
  189. package/src/components/composite-comp/common/config-panels/SpacingConfig/index.less.js +4 -0
  190. package/src/components/composite-comp/dito/components/FlashDeal/defaultJSON.js +176 -0
  191. package/src/components/composite-comp/dito/components/FlashDeal/index.js +31 -0
  192. package/src/components/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg1.png.js +3 -0
  193. package/src/components/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg2.png.js +3 -0
  194. package/src/components/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg3.png.js +3 -0
  195. package/src/components/composite-comp/dito/components/FlashDeal/mobile/index.js +233 -0
  196. package/src/components/composite-comp/dito/components/FlashDeal/mobile/index.less.js +4 -0
  197. package/src/components/composite-comp/dito/components/Recommend/defaultJSON.js +210 -0
  198. package/src/components/composite-comp/dito/components/Recommend/index.js +31 -0
  199. package/src/components/composite-comp/dito/components/Recommend/mobile/index.js +317 -0
  200. package/src/components/composite-comp/dito/components/Recommend/mobile/index.less.js +4 -0
  201. package/src/components/composite-comp/dito/components/SearchBar/defaultJSON.js +44 -0
  202. package/src/components/composite-comp/dito/components/SearchBar/imgs/dito-logo.svg.js +3 -0
  203. package/src/components/composite-comp/dito/components/SearchBar/index.js +31 -0
  204. package/src/components/composite-comp/dito/components/SearchBar/mobile/index.js +89 -0
  205. package/src/components/composite-comp/dito/components/SearchBar/mobile/index.less.js +4 -0
  206. package/src/components/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +121 -0
  207. package/src/components/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigTitle/index.js +102 -0
  208. package/src/components/composite-comp/dito/config-panels/FlashDealConfig/imgs/layout1.png.js +3 -0
  209. package/src/components/composite-comp/dito/config-panels/FlashDealConfig/index.js +49 -0
  210. package/src/components/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +97 -0
  211. package/src/components/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +89 -0
  212. package/src/components/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.less.js +4 -0
  213. package/src/components/composite-comp/dito/config-panels/RecommendConfig/imgs/defaultImg.png.js +3 -0
  214. package/src/components/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png.js +3 -0
  215. package/src/components/composite-comp/dito/config-panels/RecommendConfig/index.js +49 -0
  216. package/src/components/composite-comp/dito/config-panels/SearchBarConfig/index.js +115 -0
  217. package/src/components/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +156 -0
  218. package/src/components/constants/component-types.js +48 -0
  219. package/src/components/constants/index.js +74 -0
  220. package/src/components/constants/layout.js +90 -0
  221. package/src/components/core/Designer/CompListPanel/CompCard/index.js +33 -0
  222. package/src/components/core/Designer/CompListPanel/CompCard/index.less.js +4 -0
  223. package/src/components/core/Designer/CompListPanel/index.js +109 -0
  224. package/src/components/core/Designer/CompListPanel/index.less.js +4 -0
  225. package/src/components/core/Designer/ConfigPanel/index.js +246 -0
  226. package/src/components/core/Designer/ConfigPanel/index.less.js +4 -0
  227. package/src/components/core/Designer/History/index.js +82 -0
  228. package/src/components/core/Designer/PageCompList/index.js +248 -0
  229. package/src/components/core/Designer/PageCompList/index.less.js +4 -0
  230. package/src/components/core/Designer/QuickMenuBar/index.js +130 -0
  231. package/src/components/core/Designer/QuickMenuBar/index.less.js +4 -0
  232. package/src/components/core/Designer/ViewArea/index.js +86 -0
  233. package/src/components/core/Designer/ViewArea/index.less.js +4 -0
  234. package/src/components/core/Designer/index.js +364 -0
  235. package/src/components/core/Designer/index.less.js +4 -0
  236. package/src/components/core/Renderer/index.js +55 -0
  237. package/src/components/decorator/compositeDecorator.js +94 -0
  238. package/src/components/decorator/metaDecorator.js +150 -0
  239. package/src/components/index.js +4 -0
  240. package/src/components/meta-comp/components/Button/index.js +113 -0
  241. package/src/components/meta-comp/components/Button/index.less.js +4 -0
  242. package/src/components/meta-comp/components/Image/index.js +121 -0
  243. package/src/components/meta-comp/components/Image/index.less.js +4 -0
  244. package/src/components/meta-comp/components/Text/index.js +385 -0
  245. package/src/components/meta-comp/components/Text/index.less.js +4 -0
  246. package/src/components/meta-comp/config-panels/BaseConfig.js +47 -0
  247. package/src/components/meta-comp/config-panels/ButtonConfig/index.js +308 -0
  248. package/src/components/meta-comp/config-panels/ButtonConfig/index.less.js +4 -0
  249. package/src/components/meta-comp/config-panels/ImageConfig/index.js +179 -0
  250. package/src/components/meta-comp/config-panels/ImageConfig/index.less.js +4 -0
  251. package/src/components/meta-comp/config-panels/TextConfig/index.js +310 -0
  252. package/src/components/meta-comp/config-panels/TextConfig/index.less.js +4 -0
  253. package/src/components/mobx/Store.js +88 -0
  254. package/src/components/mobx/index.js +12 -0
  255. package/src/components/utils/androidUtil.js +22 -0
  256. package/src/components/utils/businessUtil.js +214 -0
  257. package/src/components/utils/commonUtil.js +223 -0
  258. package/src/components/utils/coreUtil.js +108 -0
  259. package/src/components/utils/currencyUtil.js +110 -0
  260. package/src/components/utils/dataTreeUtils.js +93 -0
  261. package/src/components/utils/dateUtil.js +30 -0
  262. package/src/components/utils/storeUtil.js +113 -0
@@ -0,0 +1,308 @@
1
+ import { __extends, __assign } from '../../../../../node_modules/tslib/tslib.es6.js';
2
+ import React__default from 'react';
3
+ import { Select } from 'antd';
4
+ import './index.less.js';
5
+ import SpacingConfig from '../../../composite-comp/common/config-panels/SpacingConfig/index.js';
6
+ import '../../../common/LayoutSelector/index.js';
7
+ import Field from '../../../common/Field/index.js';
8
+ import UrlPicker from '../../../common/UrlPicker/index.js';
9
+ import '../../../common/Iconfont/index.js';
10
+ import '../../../common/Button/index.js';
11
+ import '../../../common/AlignSelector/index.js';
12
+ import CommonCollapse from '../../../common/Collapse/index.js';
13
+ import ColorPickerInput from '../../../common/ColorPickerInput/index.js';
14
+ import '../../../common/ImagePicker/index.js';
15
+ import IconPicker from '../../../common/IconPicker/index.js';
16
+ import '../../../common/SwitchCollapse/index.js';
17
+ import SliderInput from '../../../common/Slider/index.js';
18
+ import FontStyles from '../../../common/FontStyles/index.js';
19
+ import ButtonIconLayout from '../../../common/ButtonIconLayout/index.js';
20
+ import 'axios';
21
+ import '../../../../../node_modules/qs/lib/stringify.js';
22
+ import '../../../../../node_modules/qs/lib/utils.js';
23
+ import '../../../common/ProductModal/index.js';
24
+ import '../../../common/ProductSource/index.less.js';
25
+ import { sizeTypeList } from '../TextConfig/index.js';
26
+ import BaseConfig from '../BaseConfig.js';
27
+
28
+ var ButtonConfig =
29
+ /** @class */
30
+ function (_super) {
31
+ __extends(ButtonConfig, _super);
32
+
33
+ function ButtonConfig() {
34
+ var _this = _super !== null && _super.apply(this, arguments) || this;
35
+
36
+ _this.state = {
37
+ isHover: false
38
+ };
39
+
40
+ _this.onChangeButtonIcon = function (icon) {
41
+ var data = _this.props.data;
42
+ var isHover = _this.state.isHover;
43
+
44
+ if (isHover) {
45
+ _this.updateAttr(data.hover.buttonIcon, 'iconUrl', icon);
46
+ } else {
47
+ _this.updateAttr(data.buttonIcon, 'iconUrl', icon);
48
+ }
49
+ };
50
+
51
+ _this.updateAttr = function (data, key, value) {
52
+ data[key] = value;
53
+
54
+ _this.selfRender();
55
+ };
56
+
57
+ return _this;
58
+ }
59
+
60
+ ButtonConfig.prototype.render = function () {
61
+ var _this = this;
62
+
63
+ var data = this.props.data;
64
+
65
+ if (!data.hover) {
66
+ data.hover = {
67
+ open: false,
68
+ content: __assign({}, data.content),
69
+ buttonText: __assign({}, data.buttonText),
70
+ buttonBorder: __assign({}, data.buttonBorder),
71
+ buttonIcon: __assign({}, data.buttonIcon)
72
+ };
73
+ }
74
+
75
+ var contentSetting = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
76
+ split: true,
77
+ title: "URL"
78
+ }, /*#__PURE__*/React__default.createElement(UrlPicker, {
79
+ onChange: function (value) {
80
+ _this.updateAttr(data.content, 'url', value);
81
+ },
82
+ value: data.content.url
83
+ })), /*#__PURE__*/React__default.createElement(Field, {
84
+ title: "Button Color"
85
+ }, /*#__PURE__*/React__default.createElement(ColorPickerInput, {
86
+ onChange: function (value) {
87
+ _this.updateAttr(data.content, 'backgroundColor', value);
88
+ },
89
+ value: data.content.backgroundColor
90
+ })));
91
+
92
+ var ButtonTextSetting = function (data) {
93
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
94
+ title: "Font Style"
95
+ }, /*#__PURE__*/React__default.createElement(Select, {
96
+ onChange: function (v) {
97
+ var findOne = sizeTypeList.find(function (t) {
98
+ return t.key == v;
99
+ });
100
+ Object.assign(data, __assign(__assign({}, findOne), {
101
+ sizeType: findOne === null || findOne === void 0 ? void 0 : findOne.key
102
+ }));
103
+
104
+ _this.selfRender();
105
+ },
106
+ value: data.sizeType
107
+ }, sizeTypeList.map(function (sizeType) {
108
+ return /*#__PURE__*/React__default.createElement(Select.Option, {
109
+ value: sizeType.key
110
+ }, sizeType.key);
111
+ }))), /*#__PURE__*/React__default.createElement(Field, {
112
+ title: "font Family"
113
+ }, /*#__PURE__*/React__default.createElement(Select, {
114
+ onChange: function (v) {
115
+ _this.updateAttr(data, 'fontFamily', v);
116
+ },
117
+ value: data.fontFamily
118
+ }, /*#__PURE__*/React__default.createElement(Select.Option, {
119
+ value: "Montserrat"
120
+ }, "Montserrat"), /*#__PURE__*/React__default.createElement(Select.Option, {
121
+ value: "Open Sans"
122
+ }, "Open Sans"))), /*#__PURE__*/React__default.createElement(Field, {
123
+ title: "font Weight"
124
+ }, /*#__PURE__*/React__default.createElement(Select, {
125
+ onChange: function (v) {
126
+ _this.updateAttr(data, 'fontWeight', v);
127
+ },
128
+ value: data.fontWeight
129
+ }, /*#__PURE__*/React__default.createElement(Select.Option, {
130
+ value: 400
131
+ }, "Regular"), /*#__PURE__*/React__default.createElement(Select.Option, {
132
+ value: 600
133
+ }, "Medium"))), /*#__PURE__*/React__default.createElement(Field, {
134
+ title: "Font Size"
135
+ }, /*#__PURE__*/React__default.createElement(SliderInput, {
136
+ onChange: function (_a) {
137
+ var count = _a.count;
138
+
139
+ _this.updateAttr(data, 'fontSize', count);
140
+ },
141
+ unit: "px",
142
+ value: {
143
+ count: data.fontSize
144
+ }
145
+ })), /*#__PURE__*/React__default.createElement(Field, {
146
+ title: ""
147
+ }, /*#__PURE__*/React__default.createElement(FontStyles, {
148
+ onChange: function (value) {
149
+ Object.assign(data, value);
150
+
151
+ _this.selfRender();
152
+ },
153
+ value: data
154
+ })));
155
+ };
156
+
157
+ var ButtonBorderSetting = function (data) {
158
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
159
+ split: true,
160
+ title: "Border Color"
161
+ }, /*#__PURE__*/React__default.createElement(ColorPickerInput, {
162
+ onChange: function (value) {
163
+ _this.updateAttr(data, 'borderColor', value);
164
+ },
165
+ value: data.borderColor
166
+ })), /*#__PURE__*/React__default.createElement(Field, {
167
+ title: "Border Radius"
168
+ }, /*#__PURE__*/React__default.createElement(SliderInput, {
169
+ maxVal: 20,
170
+ onChange: function (_a) {
171
+ var count = _a.count;
172
+
173
+ _this.updateAttr(data, 'borderRadius', count);
174
+ },
175
+ value: {
176
+ count: data.borderRadius
177
+ }
178
+ })));
179
+ };
180
+
181
+ var ButtonIconSetting = function (data) {
182
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
183
+ title: "Icon"
184
+ }, /*#__PURE__*/React__default.createElement(IconPicker, {
185
+ onChange: function (icon) {
186
+ return _this.onChangeButtonIcon(icon);
187
+ },
188
+ onClick: function () {
189
+ _this.setState({
190
+ isHover: data == _this.props.data.hover.buttonIcon
191
+ });
192
+ },
193
+ value: data.iconUrl
194
+ })), data.iconUrl && /*#__PURE__*/React__default.createElement(Field, {
195
+ title: "Icon Placement"
196
+ }, /*#__PURE__*/React__default.createElement(ButtonIconLayout, {
197
+ icon: data.iconUrl,
198
+ onChange: function (value) {
199
+ return _this.updateAttr(data, 'layout', value);
200
+ },
201
+ value: data.layout
202
+ })));
203
+ };
204
+
205
+ var hoverSetting = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
206
+ split: true,
207
+ title: "Button Color"
208
+ }, /*#__PURE__*/React__default.createElement(ColorPickerInput, {
209
+ onChange: function (value) {
210
+ _this.updateAttr(data.hover.content, 'backgroundColor', value);
211
+ },
212
+ value: data.hover.content.backgroundColor
213
+ })), /*#__PURE__*/React__default.createElement(CommonCollapse, {
214
+ source: [{
215
+ key: '1',
216
+ name: 'Button Text Setting',
217
+ value: ButtonTextSetting(data.hover.buttonText)
218
+ }, {
219
+ key: '2',
220
+ name: 'Button Border Setting',
221
+ value: ButtonBorderSetting(data.hover.buttonBorder),
222
+ toggleType: 'checkbox',
223
+ metaOption: data.hover.buttonBorder
224
+ }, {
225
+ key: '3',
226
+ name: 'Button Icon Setting',
227
+ value: ButtonIconSetting(data.hover.buttonIcon)
228
+ }],
229
+ type: "arrow"
230
+ }));
231
+ return /*#__PURE__*/React__default.createElement("div", {
232
+ className: "m-button-config"
233
+ }, /*#__PURE__*/React__default.createElement(CommonCollapse // divider="dashed"
234
+ // headerSize="small"
235
+ , {
236
+ onRefresh: this.selfRender,
237
+ source: [{
238
+ key: '1',
239
+ name: 'Content',
240
+ value: contentSetting
241
+ }, {
242
+ key: '2',
243
+ name: 'Button Text Setting',
244
+ value: ButtonTextSetting(data.buttonText)
245
+ }, {
246
+ key: '3',
247
+ name: 'Button Border Setting',
248
+ value: ButtonBorderSetting(data.buttonBorder),
249
+ toggleType: 'checkbox',
250
+ metaOption: data.buttonBorder
251
+ }, {
252
+ key: '4',
253
+ name: 'Button Icon Setting',
254
+ value: ButtonIconSetting(data.buttonIcon)
255
+ }, {
256
+ key: '5',
257
+ name: 'Spacing',
258
+ value: /*#__PURE__*/React__default.createElement(SpacingConfig, {
259
+ data: data.spacing,
260
+ type: "button"
261
+ })
262
+ }, {
263
+ key: '6',
264
+ name: 'Hover',
265
+ value: hoverSetting,
266
+ toggleType: 'checkbox',
267
+ metaOption: data.hover
268
+ }],
269
+ type: "arrow"
270
+ }));
271
+ };
272
+
273
+ ButtonConfig.defaultProps = {
274
+ data: {
275
+ content: {
276
+ url: '',
277
+ backgroundColor: '#2F54EB'
278
+ },
279
+ buttonText: {
280
+ sizeType: 'Customize font styles',
281
+ fontFamily: 'Open Sans',
282
+ fontWeight: 600,
283
+ fontSize: 14,
284
+ fontStyle: 'normal',
285
+ color: '#fff'
286
+ },
287
+ buttonBorder: {
288
+ open: false,
289
+ borderColor: '',
290
+ borderRadius: 0
291
+ },
292
+ buttonIcon: {
293
+ iconUrl: '',
294
+ layout: 'right'
295
+ },
296
+ spacing: {
297
+ pc: {},
298
+ mobile: {}
299
+ },
300
+ id: '',
301
+ text: 'Button',
302
+ hover: null
303
+ }
304
+ };
305
+ return ButtonConfig;
306
+ }(BaseConfig);
307
+
308
+ export { ButtonConfig as default };
@@ -0,0 +1,4 @@
1
+ import styleInject from '../../../../../node_modules/style-inject/dist/style-inject.es.js';
2
+
3
+ var css_248z = ".index_m-button-config__YA6fc {\n padding: 0 12px;\n background-color: #F5F6F7;\n}\n";
4
+ styleInject(css_248z);
@@ -0,0 +1,179 @@
1
+ import { __extends } from '../../../../../node_modules/tslib/tslib.es6.js';
2
+ import React__default from 'react';
3
+ import { Select } from 'antd';
4
+ import './index.less.js';
5
+ import { isPc } from '../../../utils/coreUtil.js';
6
+ import '../../../common/LayoutSelector/index.js';
7
+ import Field from '../../../common/Field/index.js';
8
+ import UrlPicker from '../../../common/UrlPicker/index.js';
9
+ import '../../../common/Iconfont/index.js';
10
+ import '../../../common/Button/index.js';
11
+ import '../../../common/AlignSelector/index.js';
12
+ import CommonCollapse from '../../../common/Collapse/index.js';
13
+ import '../../../common/ColorPickerInput/index.js';
14
+ import ImagePicker from '../../../common/ImagePicker/index.js';
15
+ import '../../../common/IconPicker/index.js';
16
+ import '../../../common/SwitchCollapse/index.js';
17
+ import SliderInput from '../../../common/Slider/index.js';
18
+ import '../../../common/FontStyles/index.js';
19
+ import '../../../common/ButtonIconLayout/index.js';
20
+ import 'axios';
21
+ import '../../../../../node_modules/qs/lib/stringify.js';
22
+ import '../../../../../node_modules/qs/lib/utils.js';
23
+ import '../../../common/ProductModal/index.js';
24
+ import '../../../common/ProductSource/index.less.js';
25
+ import BaseConfig from '../BaseConfig.js';
26
+
27
+ var ImageConfig =
28
+ /** @class */
29
+ function (_super) {
30
+ __extends(ImageConfig, _super);
31
+
32
+ function ImageConfig() {
33
+ var _this = _super !== null && _super.apply(this, arguments) || this;
34
+
35
+ _this.onClick = function (event) {
36
+ console.log(event);
37
+ };
38
+
39
+ _this.getImg = function (v) {
40
+ var data = _this.props.data;
41
+
42
+ if (isPc()) {
43
+ data.content.pcImgSrc = v.url;
44
+ data.content.pcName = v.contentTitle;
45
+
46
+ if (!data.content.h5ImgSrc) {
47
+ data.content.h5ImgSrc = v.url;
48
+ data.content.h5Name = v.contentTitle;
49
+ }
50
+ } else {
51
+ data.content.h5ImgSrc = v.url;
52
+ data.content.h5Name = v.contentTitle;
53
+
54
+ if (!data.content.pcImgSrc) {
55
+ data.content.pcImgSrc = v.url;
56
+ data.content.pcName = v.contentTitle;
57
+ }
58
+ }
59
+
60
+ _this.selfRender();
61
+ };
62
+
63
+ _this.getImgHoverUrl = function (v) {
64
+ var data = _this.props.data;
65
+
66
+ if (isPc()) {
67
+ data.hover.pcImgHoverUrl = v.url;
68
+
69
+ if (!data.hover.h5ImgHoverUrl) {
70
+ data.hover.h5ImgHoverUrl = v.url;
71
+ }
72
+ } else {
73
+ data.hover.h5ImgHoverUrl = v.url;
74
+ }
75
+
76
+ _this.selfRender();
77
+ };
78
+
79
+ return _this;
80
+ }
81
+
82
+ ImageConfig.prototype.render = function () {
83
+ var _this = this;
84
+
85
+ var data = this.props.data;
86
+ console.log('---image', this.props);
87
+ var ContentSetting = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ImagePicker, {
88
+ onChange: function (v) {
89
+ _this.getImg(v);
90
+ },
91
+ value: isPc() ? data.content.pcImgSrc : data.content.h5ImgSrc
92
+ }), /*#__PURE__*/React__default.createElement(Field, {
93
+ title: "URL"
94
+ }, /*#__PURE__*/React__default.createElement(UrlPicker, {
95
+ onChange: function (v) {
96
+ data.content.clickUrl = v;
97
+
98
+ _this.selfRender();
99
+ },
100
+ value: data.content.clickUrl
101
+ })));
102
+ var HoverSetting = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
103
+ split: data.hover.backgroundType === 'new',
104
+ title: "Image"
105
+ }, /*#__PURE__*/React__default.createElement(Select, {
106
+ className: "hoverSelect",
107
+ onChange: function (v) {
108
+ data.hover.backgroundType = v;
109
+
110
+ _this.selfRender();
111
+ },
112
+ size: "large",
113
+ value: data.hover.backgroundType
114
+ }, /*#__PURE__*/React__default.createElement(Select.Option, {
115
+ value: "enlarge"
116
+ }, "Enlarge"), /*#__PURE__*/React__default.createElement(Select.Option, {
117
+ value: "new"
118
+ }, "New image"))), data.hover.backgroundType === 'enlarge' && /*#__PURE__*/React__default.createElement(Field, {
119
+ title: "Magnification"
120
+ }, /*#__PURE__*/React__default.createElement(SliderInput, {
121
+ inputType: "float",
122
+ maxVal: 3,
123
+ minVal: 1,
124
+ onChange: function (v) {
125
+ data.hover.magnification = v.count;
126
+
127
+ _this.selfRender();
128
+ },
129
+ step: 0.25,
130
+ value: {
131
+ count: data.hover.magnification
132
+ }
133
+ })), data.hover.backgroundType === 'new' && /*#__PURE__*/React__default.createElement(ImagePicker, {
134
+ onChange: function (v) {
135
+ return _this.getImgHoverUrl(v);
136
+ },
137
+ value: isPc() ? data.hover.pcImgHoverUrl : data.hover.h5ImgHoverUrl
138
+ }));
139
+ return /*#__PURE__*/React__default.createElement("div", {
140
+ className: "m-image-config",
141
+ onClick: this.onClick
142
+ }, /*#__PURE__*/React__default.createElement(CommonCollapse, {
143
+ onRefresh: this.selfRender,
144
+ source: [{
145
+ key: '1',
146
+ name: 'Content',
147
+ value: ContentSetting
148
+ }, {
149
+ key: '5',
150
+ name: 'Hover',
151
+ value: HoverSetting,
152
+ metaOption: data.hover,
153
+ toggleType: 'checkbox'
154
+ }],
155
+ type: "arrow"
156
+ }));
157
+ };
158
+
159
+ ImageConfig.defaultProps = {
160
+ data: {
161
+ content: {
162
+ clickUrl: '',
163
+ pcImgSrc: '',
164
+ h5ImgSrc: '',
165
+ name: ''
166
+ },
167
+ hover: {
168
+ open: false,
169
+ backgroundType: 'enlarge',
170
+ h5ImgHoverUrl: '',
171
+ pcImgHoverUrl: '',
172
+ magnification: 1
173
+ }
174
+ }
175
+ };
176
+ return ImageConfig;
177
+ }(BaseConfig);
178
+
179
+ export { ImageConfig as default };
@@ -0,0 +1,4 @@
1
+ import styleInject from '../../../../../node_modules/style-inject/dist/style-inject.es.js';
2
+
3
+ var css_248z = ".index_m-image-config__HxUjo {\n padding: 0 12px 1px;\n background-color: #F5F6F7;\n}\n";
4
+ styleInject(css_248z);