@fonixtree/magic-design 0.1.76 → 0.1.78

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 (313) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +23 -3
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +23 -3
  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/imageTextLeft.svg +6 -0
  9. package/es/assets/images/layout-icon/imageTextRight.svg +6 -0
  10. package/es/assets/images/layout-icon/locationLayout.png +0 -0
  11. package/es/assets/less/modal.less +1 -1
  12. package/es/common/ColorPicker/index.js +4 -1
  13. package/es/common/Field/index.js +20 -3
  14. package/es/common/ImageLazy/index.js +172 -0
  15. package/es/common/ImageLazy/index.less +0 -0
  16. package/es/common/ImagePicker/index.js +50 -5
  17. package/es/common/ImagePicker/index.less +1 -0
  18. package/es/common/LinkModal/BundleCampaign/index.js +2 -2
  19. package/es/common/LinkModal/CatgTable/index.js +1 -1
  20. package/es/common/LinkModal/CouponTable/index.js +10 -2
  21. package/es/common/LinkModal/FilteredProductModal/index.js +12 -9
  22. package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
  23. package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
  24. package/es/common/LinkModal/index.js +1 -1
  25. package/es/common/ProductModal/index.js +25 -32
  26. package/es/common/Video/index.js +11 -3
  27. package/es/common/Video/index.less +11 -7
  28. package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  29. package/es/composite-comp/bol/components/Carousel/index.js +27 -3
  30. package/es/composite-comp/bol/components/Carousel/mobile/index.js +11 -20
  31. package/es/composite-comp/bol/components/Carousel/pc/index.js +4 -2
  32. package/es/composite-comp/bol/components/CustomCode/defaultJSON.js +39 -0
  33. package/es/composite-comp/bol/components/CustomCode/index.js +138 -0
  34. package/es/composite-comp/bol/components/ImageText/pc/index.js +95 -3
  35. package/es/composite-comp/bol/components/ImageText/pc/index.less +32 -0
  36. package/es/composite-comp/bol/components/Location/defaultJSON.js +60 -0
  37. package/es/composite-comp/bol/components/Location/index.js +100 -0
  38. package/es/composite-comp/bol/components/Location/index.less +15 -0
  39. package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  40. package/es/composite-comp/bol/config-panels/CustomCodeConfig/MyEditor/index.js +42 -0
  41. package/es/composite-comp/bol/config-panels/CustomCodeConfig/index.js +111 -0
  42. package/es/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
  43. package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  44. package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
  45. package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
  46. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
  47. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +53 -2
  48. package/es/composite-comp/common/components/ProductItem/index.js +8 -4
  49. package/es/composite-comp/common/components/ProductItem/index.less +30 -15
  50. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  51. package/es/composite-comp/dito/components/Recommend/mobile/index.js +16 -3
  52. package/es/composite-comp/dito/components/Recommend/pc/index.js +2 -1
  53. package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
  54. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +67 -7
  55. package/es/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
  56. package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  57. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +46 -37
  58. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  59. package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  60. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
  61. package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  62. package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  63. package/es/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
  64. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -4
  65. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  66. package/es/constants/component-types.js +10 -2
  67. package/es/constants/index.js +10 -1
  68. package/es/constants/layout.js +21 -1
  69. package/es/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
  70. package/es/core/Designer/AiImageGenerator/History/index.js +147 -0
  71. package/es/core/Designer/AiImageGenerator/History/index.less +75 -0
  72. package/es/core/Designer/AiImageGenerator/NumberSlider/index.js +31 -0
  73. package/es/core/Designer/AiImageGenerator/NumberSlider/index.less +8 -0
  74. package/es/core/Designer/AiImageGenerator/UploadReference/index.js +18 -8
  75. package/es/core/Designer/AiImageGenerator/UploadReference/index.less +6 -0
  76. package/es/core/Designer/AiImageGenerator/index.js +364 -63
  77. package/es/core/Designer/AiImageGenerator/index.less +70 -46
  78. package/es/core/Designer/ChatRobot/index.js +51 -14
  79. package/es/core/Designer/ChatRobot/index.less +11 -0
  80. package/es/core/Designer/ConfigPanel/index.js +2 -1
  81. package/es/core/Designer/FonixtreeGpt/index.js +32 -171
  82. package/es/core/Designer/LeftTitle/index.js +1 -1
  83. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
  84. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
  85. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
  86. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
  87. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
  88. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
  89. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
  90. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.js +101 -0
  91. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.less +60 -0
  92. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/CircleSVG.js +52 -0
  93. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/InitialSVG.js +51 -0
  94. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/SquareSVG.js +58 -0
  95. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +96 -0
  96. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +26 -0
  97. package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +105 -0
  98. package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
  99. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
  100. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
  101. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
  102. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
  103. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.js +133 -0
  104. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.less +60 -0
  105. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/CJLDecimalSVG.js +46 -0
  106. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/DecimalSVG.js +46 -0
  107. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerAlphaSVG.js +46 -0
  108. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerRomanSVG.js +46 -0
  109. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperAlphaSVG.js +46 -0
  110. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperRomanSVG.js +46 -0
  111. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +105 -0
  112. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +26 -0
  113. package/es/core/Designer/ToolBarModal/ToolBtn/images/BackgroundSVG.js +29 -0
  114. package/es/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
  115. package/es/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
  116. package/es/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
  117. package/es/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
  118. package/es/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
  119. package/es/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
  120. package/es/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +36 -0
  121. package/es/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
  122. package/es/core/Designer/ToolBarModal/ToolBtn/index.js +151 -0
  123. package/es/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
  124. package/es/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
  125. package/es/core/Designer/ToolBarModal/index.js +366 -0
  126. package/es/core/Designer/ToolBarModal/index.less +32 -0
  127. package/es/core/Designer/index.js +33 -10
  128. package/es/core/Renderer/index.js +20 -21
  129. package/es/decorator/index.js +38 -1
  130. package/es/decorator/lazyLoadDecorator.js +75 -0
  131. package/es/locale/en/en.json +6 -1
  132. package/es/locale/es/es.json +6 -1
  133. package/es/locale/id/id.json +6 -1
  134. package/es/meta-comp/components/Button/index.js +7 -0
  135. package/es/meta-comp/components/Image/index.js +19 -3
  136. package/es/meta-comp/components/Text/formats/fontFamily.js +58 -0
  137. package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
  138. package/es/meta-comp/components/Text/formats/fontWeight.js +58 -0
  139. package/es/meta-comp/components/Text/formats/listStyleTypeStyle.js +58 -0
  140. package/es/meta-comp/components/Text/formats/textDecorationColor.js +58 -0
  141. package/es/meta-comp/components/Text/formats/textDecorationStyle.js +58 -0
  142. package/es/meta-comp/components/Text/index.js +110 -372
  143. package/es/meta-comp/components/Text/index.less +57 -0
  144. package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  145. package/es/meta-comp/config-panels/ImageConfig/index.js +3 -1
  146. package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
  147. package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
  148. package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +108 -0
  149. package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.less +26 -0
  150. package/es/meta-comp/config-panels/TextConfig/index.js +9 -30
  151. package/es/meta-comp/config-panels/TextConfig/index.less +12 -16
  152. package/es/mobx/Frame.js +7 -1
  153. package/es/utils/androidUtil.js +6 -0
  154. package/es/utils/commonUtil.js +35 -7
  155. package/es/utils/coreUtil.js +15 -0
  156. package/es/utils/currencyUtil.js +29 -10
  157. package/lib/assets/fonts/magic-box-iconfont.css +23 -3
  158. package/lib/assets/fonts/magic-box-iconfont.css.bak +23 -3
  159. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  160. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  161. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  162. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  163. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  164. package/lib/assets/images/layout-icon/imageTextLeft.svg +6 -0
  165. package/lib/assets/images/layout-icon/imageTextRight.svg +6 -0
  166. package/lib/assets/images/layout-icon/locationLayout.png +0 -0
  167. package/lib/assets/less/modal.less +1 -1
  168. package/lib/common/ColorPicker/index.js +4 -1
  169. package/lib/common/Field/index.js +20 -3
  170. package/lib/common/ImageLazy/index.js +172 -0
  171. package/lib/common/ImageLazy/index.less +0 -0
  172. package/lib/common/ImagePicker/index.js +50 -5
  173. package/lib/common/ImagePicker/index.less +1 -0
  174. package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
  175. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  176. package/lib/common/LinkModal/CouponTable/index.js +10 -2
  177. package/lib/common/LinkModal/FilteredProductModal/index.js +12 -9
  178. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
  179. package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
  180. package/lib/common/LinkModal/index.js +1 -1
  181. package/lib/common/ProductModal/index.js +25 -32
  182. package/lib/common/Video/index.js +11 -3
  183. package/lib/common/Video/index.less +11 -7
  184. package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  185. package/lib/composite-comp/bol/components/Carousel/index.js +27 -3
  186. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +11 -20
  187. package/lib/composite-comp/bol/components/Carousel/pc/index.js +4 -2
  188. package/lib/composite-comp/bol/components/CustomCode/defaultJSON.js +39 -0
  189. package/lib/composite-comp/bol/components/CustomCode/index.js +138 -0
  190. package/lib/composite-comp/bol/components/ImageText/pc/index.js +95 -3
  191. package/lib/composite-comp/bol/components/ImageText/pc/index.less +32 -0
  192. package/lib/composite-comp/bol/components/Location/defaultJSON.js +60 -0
  193. package/lib/composite-comp/bol/components/Location/index.js +100 -0
  194. package/lib/composite-comp/bol/components/Location/index.less +15 -0
  195. package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  196. package/lib/composite-comp/bol/config-panels/CustomCodeConfig/MyEditor/index.js +42 -0
  197. package/lib/composite-comp/bol/config-panels/CustomCodeConfig/index.js +111 -0
  198. package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
  199. package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  200. package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
  201. package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
  202. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
  203. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +53 -2
  204. package/lib/composite-comp/common/components/ProductItem/index.js +8 -4
  205. package/lib/composite-comp/common/components/ProductItem/index.less +30 -15
  206. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  207. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +16 -3
  208. package/lib/composite-comp/dito/components/Recommend/pc/index.js +2 -1
  209. package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
  210. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +67 -7
  211. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
  212. package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  213. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +46 -37
  214. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  215. package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  216. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
  217. package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  218. package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  219. package/lib/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
  220. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -4
  221. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  222. package/lib/constants/component-types.js +10 -2
  223. package/lib/constants/index.js +10 -1
  224. package/lib/constants/layout.js +21 -1
  225. package/lib/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
  226. package/lib/core/Designer/AiImageGenerator/History/index.js +147 -0
  227. package/lib/core/Designer/AiImageGenerator/History/index.less +75 -0
  228. package/lib/core/Designer/AiImageGenerator/NumberSlider/index.js +31 -0
  229. package/lib/core/Designer/AiImageGenerator/NumberSlider/index.less +8 -0
  230. package/lib/core/Designer/AiImageGenerator/UploadReference/index.js +18 -8
  231. package/lib/core/Designer/AiImageGenerator/UploadReference/index.less +6 -0
  232. package/lib/core/Designer/AiImageGenerator/index.js +364 -63
  233. package/lib/core/Designer/AiImageGenerator/index.less +70 -46
  234. package/lib/core/Designer/ChatRobot/index.js +51 -14
  235. package/lib/core/Designer/ChatRobot/index.less +11 -0
  236. package/lib/core/Designer/ConfigPanel/index.js +2 -1
  237. package/lib/core/Designer/FonixtreeGpt/index.js +32 -171
  238. package/lib/core/Designer/LeftTitle/index.js +1 -1
  239. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
  240. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
  241. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
  242. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
  243. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
  244. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
  245. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
  246. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.js +101 -0
  247. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.less +60 -0
  248. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/CircleSVG.js +52 -0
  249. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/InitialSVG.js +51 -0
  250. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/SquareSVG.js +58 -0
  251. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +96 -0
  252. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +26 -0
  253. package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +105 -0
  254. package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
  255. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
  256. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
  257. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
  258. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
  259. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.js +133 -0
  260. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.less +60 -0
  261. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/CJLDecimalSVG.js +46 -0
  262. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/DecimalSVG.js +46 -0
  263. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerAlphaSVG.js +46 -0
  264. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerRomanSVG.js +46 -0
  265. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperAlphaSVG.js +46 -0
  266. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperRomanSVG.js +46 -0
  267. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +105 -0
  268. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +26 -0
  269. package/lib/core/Designer/ToolBarModal/ToolBtn/images/BackgroundSVG.js +29 -0
  270. package/lib/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
  271. package/lib/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
  272. package/lib/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
  273. package/lib/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
  274. package/lib/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
  275. package/lib/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
  276. package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +36 -0
  277. package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
  278. package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +151 -0
  279. package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
  280. package/lib/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
  281. package/lib/core/Designer/ToolBarModal/index.js +366 -0
  282. package/lib/core/Designer/ToolBarModal/index.less +32 -0
  283. package/lib/core/Designer/index.js +33 -10
  284. package/lib/core/Renderer/index.js +20 -21
  285. package/lib/decorator/index.js +38 -1
  286. package/lib/decorator/lazyLoadDecorator.js +75 -0
  287. package/lib/locale/en/en.json +6 -1
  288. package/lib/locale/es/es.json +6 -1
  289. package/lib/locale/id/id.json +6 -1
  290. package/lib/meta-comp/components/Button/index.js +7 -0
  291. package/lib/meta-comp/components/Image/index.js +19 -3
  292. package/lib/meta-comp/components/Text/formats/fontFamily.js +58 -0
  293. package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
  294. package/lib/meta-comp/components/Text/formats/fontWeight.js +58 -0
  295. package/lib/meta-comp/components/Text/formats/listStyleTypeStyle.js +58 -0
  296. package/lib/meta-comp/components/Text/formats/textDecorationColor.js +58 -0
  297. package/lib/meta-comp/components/Text/formats/textDecorationStyle.js +58 -0
  298. package/lib/meta-comp/components/Text/index.js +110 -372
  299. package/lib/meta-comp/components/Text/index.less +57 -0
  300. package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  301. package/lib/meta-comp/config-panels/ImageConfig/index.js +3 -1
  302. package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
  303. package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
  304. package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +108 -0
  305. package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.less +26 -0
  306. package/lib/meta-comp/config-panels/TextConfig/index.js +9 -30
  307. package/lib/meta-comp/config-panels/TextConfig/index.less +12 -16
  308. package/lib/mobx/Frame.js +7 -1
  309. package/lib/utils/androidUtil.js +6 -0
  310. package/lib/utils/commonUtil.js +35 -7
  311. package/lib/utils/coreUtil.js +15 -0
  312. package/lib/utils/currencyUtil.js +29 -10
  313. package/package.json +5 -2
@@ -13,6 +13,8 @@ require("./index.less");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
16
+ 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); }
17
+
16
18
  var __extends = void 0 && (void 0).__extends || function () {
17
19
  var _extendStatics = function extendStatics(d, b) {
18
20
  _extendStatics = Object.setPrototypeOf || {
@@ -39,6 +41,19 @@ var __extends = void 0 && (void 0).__extends || function () {
39
41
  };
40
42
  }();
41
43
 
44
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
45
+ var t = {};
46
+
47
+ for (var p in s) {
48
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
49
+ }
50
+
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+
42
57
  var Field =
43
58
  /** @class */
44
59
  function (_super) {
@@ -53,13 +68,15 @@ function (_super) {
53
68
  title = _a.title,
54
69
  children = _a.children,
55
70
  layout = _a.layout,
56
- split = _a.split;
57
- return /*#__PURE__*/_react["default"].createElement("div", {
71
+ split = _a.split,
72
+ rest = __rest(_a, ["title", "children", "layout", "split"]);
73
+
74
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
58
75
  className: (0, _classnames["default"])('m-field', {
59
76
  split: split,
60
77
  bold: split === 'bold'
61
78
  })
62
- }, /*#__PURE__*/_react["default"].createElement("div", {
79
+ }, rest), /*#__PURE__*/_react["default"].createElement("div", {
63
80
  className: (0, _classnames["default"])('field-item', {
64
81
  horizontal: layout === 'horizontal'
65
82
  })
@@ -0,0 +1,172 @@
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 _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _propTypes = _interopRequireDefault(require("prop-types"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ 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); }
19
+
20
+ 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; }
21
+
22
+ 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); }
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 __assign = void 0 && (void 0).__assign || function () {
51
+ __assign = Object.assign || function (t) {
52
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
53
+ s = arguments[i];
54
+
55
+ for (var p in s) {
56
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
57
+ }
58
+ }
59
+
60
+ return t;
61
+ };
62
+
63
+ return __assign.apply(this, arguments);
64
+ };
65
+
66
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
67
+ var t = {};
68
+
69
+ for (var p in s) {
70
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
71
+ }
72
+
73
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
74
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
75
+ }
76
+ return t;
77
+ };
78
+
79
+ // import styles from './index.less';
80
+ var ImageLazy =
81
+ /** @class */
82
+ function (_super) {
83
+ __extends(ImageLazy, _super);
84
+
85
+ function ImageLazy() {
86
+ var _this = _super !== null && _super.apply(this, arguments) || this;
87
+
88
+ _this.state = {
89
+ show: false
90
+ };
91
+ _this.imageRef = /*#__PURE__*/_react["default"].createRef();
92
+ _this.intersectionObserver = null;
93
+ return _this;
94
+ }
95
+
96
+ ImageLazy.prototype.componentDidMount = function () {
97
+ var _this = this;
98
+
99
+ var _a;
100
+
101
+ this.intersectionObserver = new IntersectionObserver(function (entries) {
102
+ if (entries[0].isIntersecting) {
103
+ if (!_this.state.show) {
104
+ _this.setState({
105
+ show: true
106
+ });
107
+ }
108
+ }
109
+ }, {
110
+ root: (_a = this.props) === null || _a === void 0 ? void 0 : _a.rootContainer(),
111
+ // threshold: 0.8,
112
+ rootMargin: '0px 0px 100px 0px'
113
+ });
114
+ this.intersectionObserver.observe(this.imageRef.current);
115
+ };
116
+
117
+ ImageLazy.prototype.componentWillUnmount = function () {
118
+ this.intersectionObserver.disconnect(this.imageRef.current);
119
+ };
120
+
121
+ ImageLazy.prototype.render = function () {
122
+ var _this = this;
123
+
124
+ var _a = this.props,
125
+ _b = _a.lazy,
126
+ lazy = _b === void 0 ? true : _b,
127
+ src = _a.src,
128
+ onLoadFunc = _a.onLoadFunc,
129
+ style = _a.style,
130
+ className = _a.className,
131
+ rest = __rest(_a, ["lazy", "src", "onLoadFunc", "style", "className"]);
132
+
133
+ var show = this.state.show;
134
+ var isShow = lazy ? show : true;
135
+ return /*#__PURE__*/_react["default"].createElement("img", _extends({
136
+ ref: this.imageRef,
137
+ alt: "",
138
+ className: (0, _classnames["default"])(className),
139
+ onLoad: function onLoad() {
140
+ if (onLoadFunc) {
141
+ onLoadFunc(_this.imageRef.current.clientWidth);
142
+ }
143
+ },
144
+ src: isShow ? src : '',
145
+ style: __assign({
146
+ opacity: ~~isShow
147
+ }, style)
148
+ }, rest));
149
+ };
150
+
151
+ return ImageLazy;
152
+ }(_react.Component);
153
+
154
+ ImageLazy.propTypes = {
155
+ /** 外层容器 */
156
+ rootContainer: _propTypes["default"].func,
157
+
158
+ /** src */
159
+ src: _propTypes["default"].string,
160
+
161
+ /** 懒加载 */
162
+ lazy: _propTypes["default"].bool
163
+ };
164
+ ImageLazy.defaultProps = {
165
+ rootContainer: function rootContainer() {
166
+ return null;
167
+ },
168
+ lazy: true,
169
+ src: ''
170
+ };
171
+ var _default = ImageLazy;
172
+ exports["default"] = _default;
File without changes
@@ -17,6 +17,8 @@ var _ImageModal = _interopRequireDefault(require("../ImageModal"));
17
17
 
18
18
  var _ = require("..");
19
19
 
20
+ var _AiImageGenerator = _interopRequireDefault(require("../../core/Designer/AiImageGenerator"));
21
+
20
22
  var _Iconfont = _interopRequireDefault(require("../Iconfont"));
21
23
 
22
24
  var _coreUtil = require("../../utils/coreUtil");
@@ -68,7 +70,8 @@ function (_super) {
68
70
 
69
71
  _this.state = {
70
72
  visible: false,
71
- inputVal: ''
73
+ inputVal: '',
74
+ aiImageVisible: false
72
75
  };
73
76
 
74
77
  _this.onChange = function (v) {
@@ -93,9 +96,17 @@ function (_super) {
93
96
  }
94
97
  };
95
98
 
99
+ _this.onAiImageClick = function () {
100
+ _this.setState({
101
+ aiImageVisible: true
102
+ });
103
+ };
104
+
96
105
  _this.getImagePick = function () {
97
106
  var visible = _this.state.visible;
98
- var value = _this.props.value;
107
+ var _a = _this.props,
108
+ value = _a.value,
109
+ recommendImgSize = _a.recommendImgSize;
99
110
  return /*#__PURE__*/_react["default"].createElement("div", {
100
111
  className: "m-image-picker"
101
112
  }, value ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -129,7 +140,9 @@ function (_super) {
129
140
  }), /*#__PURE__*/_react["default"].createElement("div", {
130
141
  className: "btn-del",
131
142
  onClick: function onClick() {
132
- _this.props.onChange('');
143
+ _this.props.onChange({
144
+ url: ''
145
+ });
133
146
  }
134
147
  }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
135
148
  color: "#fff",
@@ -140,7 +153,7 @@ function (_super) {
140
153
  className: "no-img"
141
154
  }, /*#__PURE__*/_react["default"].createElement("div", {
142
155
  className: "hint-txt"
143
- }, (0, _locale.i18n)('LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_')), /*#__PURE__*/_react["default"].createElement("div", {
156
+ }, (0, _locale.i18n)('LOOKS_LIKE_YOU_DO_NOT_HAVE_ANY_IMAGES_IN_YOUR_GALLERY__CHOOSE_IMAGES_TO_FEATURE_ON_THIS_PAGE_'), recommendImgSize && recommendImgSize.width && /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('RECOMMENDED_SIZE'), ": ", recommendImgSize.width, "*", recommendImgSize.height)), /*#__PURE__*/_react["default"].createElement("div", {
144
157
  className: "pick-btn",
145
158
  onClick: function onClick() {
146
159
  _this.setState({
@@ -162,6 +175,19 @@ function (_super) {
162
175
  }));
163
176
  };
164
177
 
178
+ _this.onAiImageConfirm = function (data) {
179
+ _this.setState({
180
+ aiImageVisible: false
181
+ });
182
+
183
+ _this.props.onChange({
184
+ contentTitle: data.fileName,
185
+ contentType: 'File',
186
+ imgUrl: data.oriUrl,
187
+ url: data.oriUrl
188
+ });
189
+ };
190
+
165
191
  _this.getImageUrl = function () {
166
192
  var onChange = _this.props.onChange;
167
193
  var inputVal = _this.state.inputVal;
@@ -236,6 +262,7 @@ function (_super) {
236
262
 
237
263
  var imageSelectedWay = this.props.imageSelectedWay;
238
264
  var way = (0, _coreUtil.isPc)() ? imageSelectedWay.pc : imageSelectedWay.mobile;
265
+ var aiImageVisible = this.state.aiImageVisible;
239
266
  return /*#__PURE__*/_react["default"].createElement("div", {
240
267
  className: "image-picker-wrap"
241
268
  }, /*#__PURE__*/_react["default"].createElement(_.Field, {
@@ -254,7 +281,25 @@ function (_super) {
254
281
  key: v.key,
255
282
  value: v.key
256
283
  }, v.value);
257
- })))), way === 'url' ? this.getImageUrl() : this.getImagePick());
284
+ })), window.magicDesign.needAi && /*#__PURE__*/_react["default"].createElement("div", {
285
+ className: "ai-btn",
286
+ onClick: this.onAiImageClick
287
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
288
+ color: "#2F54EB",
289
+ size: 20,
290
+ type: "icon-ai"
291
+ }), /*#__PURE__*/_react["default"].createElement("span", {
292
+ className: "btn-txt"
293
+ }, (0, _locale.i18n)('AI_IMAGE'))))), way === 'url' ? this.getImageUrl() : this.getImagePick(), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], {
294
+ onClose: function onClose() {
295
+ return _this.setState({
296
+ aiImageVisible: false
297
+ });
298
+ },
299
+ onConfirm: this.onAiImageConfirm,
300
+ single: true,
301
+ visible: aiImageVisible
302
+ }));
258
303
  };
259
304
 
260
305
  ImagePicker.defaultProps = {
@@ -7,6 +7,7 @@
7
7
  justify-content: space-between;
8
8
  align-items: center;
9
9
  .ai-btn {
10
+ cursor: pointer;
10
11
  background: #FFFFFF;
11
12
  border: 1px solid #2F54EB;
12
13
  border-radius: 8px;
@@ -179,7 +179,7 @@ var BundleCampaign = function BundleCampaign(props) {
179
179
  campaignName = _b[0],
180
180
  setCampaignName = _b[1];
181
181
 
182
- var _c = (0, _react.useState)(''),
182
+ var _c = (0, _react.useState)(window.magicDesign.storeId ? window.magicDesign.storeId : ''),
183
183
  storeId = _c[0],
184
184
  setStoreId = _c[1];
185
185
 
@@ -241,7 +241,7 @@ var BundleCampaign = function BundleCampaign(props) {
241
241
 
242
242
  var reset = function reset() {
243
243
  setCampaignName('');
244
- setStoreId('');
244
+ setStoreId(window.magicDesign.storeId ? window.magicDesign.storeId : '');
245
245
  setCmpState('A,B');
246
246
  };
247
247
 
@@ -184,7 +184,7 @@ function CatgTable(props) {
184
184
  setLoading(true);
185
185
  return [4
186
186
  /*yield*/
187
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/contract/offercatgs", {}, 'GET')];
187
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
188
188
 
189
189
  case 1:
190
190
  res = _a.sent();
@@ -246,14 +246,22 @@ function CouponTable(props) {
246
246
 
247
247
  var getCoupons = function getCoupons(params) {
248
248
  return __awaiter(_this, void 0, void 0, function () {
249
- var res, list;
249
+ var newParams, res, list;
250
250
  return __generator(this, function (_a) {
251
251
  switch (_a.label) {
252
252
  case 0:
253
253
  setLoading(true);
254
+ newParams = __assign(__assign({}, params), {
255
+ tableFlag: 'effective',
256
+ isPublic: 'Y',
257
+ state: 'A',
258
+ couponLocation: 'Promotion',
259
+ pageTotal: false,
260
+ storeId: window.magicDesign.storeId ? window.magicDesign.storeId : ''
261
+ });
254
262
  return [4
255
263
  /*yield*/
256
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/coupons/couponList/page?tableFlag=effective&isPublic=Y&state=A&pageTotal=false&couponLocation=Promotion", params, 'GET')];
264
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/coupons/couponList/page", newParams, 'GET')];
257
265
 
258
266
  case 1:
259
267
  res = _a.sent();
@@ -217,7 +217,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
217
217
  storeName = _g[0],
218
218
  setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)(''),
220
+ var _h = (0, _react.useState)(window.magicDesign.storeId || ''),
221
221
  storeId = _h[0],
222
222
  setStoreId = _h[1];
223
223
 
@@ -281,7 +281,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
281
281
  settVal([]);
282
282
  settBrandId([]);
283
283
  settLabelId({});
284
- setStoreId('');
284
+ setStoreId(window.magicDesign.storeId || '');
285
285
  setStoreName('');
286
286
  setProductName('');
287
287
  setMinimum('');
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
346
346
  case 0:
347
347
  return [4
348
348
  /*yield*/
349
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/contract/offercatgs", {}, 'GET')];
349
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
350
350
 
351
351
  case 1:
352
352
  res = _a.sent();
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
368
368
  case 0:
369
369
  return [4
370
370
  /*yield*/
371
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands", {}, 'GET')];
371
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
372
372
 
373
373
  case 1:
374
374
  res = _a.sent();
@@ -447,7 +447,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
447
447
  switch (_a.label) {
448
448
  case 0:
449
449
  precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
450
- return window.ecommerce.precision;
450
+ return window.systemParams.precision;
451
451
  }, '0'));
452
452
  params = {
453
453
  catgIds: tValue.join(','),
@@ -471,8 +471,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
471
471
  , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
472
472
 
473
473
  case 1:
474
- res = _a.sent(); // const res = await commonFetch(`/designer/v1/products`, params, 'GET');
475
-
474
+ res = _a.sent();
476
475
  setLoading(false);
477
476
  paginationParams.total = res.total;
478
477
 
@@ -533,12 +532,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
533
532
  layout: "vertical"
534
533
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
535
534
  label: "Category"
536
- }, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
537
- allowClear: true,
535
+ }, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect // allowClear
536
+ , {
538
537
  dropdownStyle: {
539
538
  maxHeight: 400,
540
539
  overflow: 'auto'
541
540
  },
541
+ maxTagCount: 2,
542
+ maxTagTextLength: 5,
542
543
  multiple: true,
543
544
  onChange: onChange,
544
545
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
@@ -550,6 +551,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
550
551
  label: "Brand"
551
552
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
552
553
  defaultValue: [],
554
+ maxTagCount: 2,
555
+ maxTagTextLength: 5,
553
556
  mode: "multiple",
554
557
  onChange: handleBrandChange,
555
558
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
@@ -84,7 +84,7 @@
84
84
  }
85
85
 
86
86
  .leftCot {
87
- width: 230px;
87
+ width: 280px;
88
88
  // height: 400px;
89
89
  box-sizing: border-box;
90
90
  border-right: 1px solid #e0e0e0;
@@ -220,7 +220,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
220
220
  productName = _e[0],
221
221
  setProductName = _e[1];
222
222
 
223
- var _f = (0, _react.useState)([]),
223
+ var _f = (0, _react.useState)(''),
224
224
  storeId = _f[0],
225
225
  setStoreId = _f[1];
226
226
 
@@ -309,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
309
309
  case 0:
310
310
  return [4
311
311
  /*yield*/
312
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
312
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
313
313
 
314
314
  case 1:
315
315
  res = _a.sent();
@@ -357,7 +357,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
357
357
  setProductName('');
358
358
  setProductCode('');
359
359
  setBrandId([]);
360
- setStoreId([]);
360
+ setStoreId('');
361
361
  };
362
362
 
363
363
  (0, _react.useEffect)(function () {
@@ -285,7 +285,7 @@ var LinkModal = function LinkModal(props) {
285
285
  ,
286
286
  title: (0, _locale.i18n)('URL_SETUP'),
287
287
  visible: visible,
288
- width: "900px",
288
+ width: "1000px",
289
289
  wrapClassName: "magicLinkModal"
290
290
  }, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
291
291
  activeKey: selected,
@@ -204,8 +204,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
204
204
  return r;
205
205
  };
206
206
 
207
- var precision = (0, _currencyUtil.getPrecision)();
208
-
209
207
  var formatData = function formatData(list) {
210
208
  list.map(function (item) {
211
209
  item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
@@ -271,7 +269,7 @@ var ProductModal = function ProductModal(props) {
271
269
  productCode = _m[0],
272
270
  setProductCode = _m[1];
273
271
 
274
- var _o = (0, _react.useState)([]),
272
+ var _o = (0, _react.useState)(''),
275
273
  storeId = _o[0],
276
274
  setStoreId = _o[1];
277
275
 
@@ -377,21 +375,18 @@ var ProductModal = function ProductModal(props) {
377
375
 
378
376
  var queryOfferCatgs = function queryOfferCatgs() {
379
377
  return __awaiter(void 0, void 0, void 0, function () {
380
- var res, arr;
378
+ var res, tree;
381
379
  return __generator(this, function (_a) {
382
380
  switch (_a.label) {
383
381
  case 0:
384
382
  return [4
385
383
  /*yield*/
386
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/offers/catgs', {}, 'GET')];
384
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
387
385
 
388
386
  case 1:
389
387
  res = _a.sent();
390
- arr = [];
391
- res.forEach(function (f) {
392
- if (f.children) arr.push.apply(arr, f.children);
393
- });
394
- setCatgsList(arr);
388
+ tree = (0, _businessUtil.listToTree)(res);
389
+ setCatgsList(tree);
395
390
  return [2
396
391
  /*return*/
397
392
  ];
@@ -409,7 +404,7 @@ var ProductModal = function ProductModal(props) {
409
404
  case 0:
410
405
  return [4
411
406
  /*yield*/
412
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offerdiscatgs/brands", {}, 'GET')];
407
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
413
408
 
414
409
  case 1:
415
410
  res = _a.sent();
@@ -491,7 +486,7 @@ var ProductModal = function ProductModal(props) {
491
486
  setSelCatgsList([]);
492
487
  setSelLabelData([]);
493
488
  setProductName('');
494
- setStoreId([]);
489
+ setStoreId('');
495
490
  setProductCode('');
496
491
  setMinPrice('');
497
492
  setMaxPrice('');
@@ -565,35 +560,33 @@ var ProductModal = function ProductModal(props) {
565
560
  layout: "vertical"
566
561
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
567
562
  label: "Category"
568
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
569
- mode: "multiple",
570
- onChange: function onChange(value, option) {
563
+ }, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
564
+ dropdownStyle: {
565
+ maxHeight: 400,
566
+ overflow: 'auto'
567
+ },
568
+ maxTagCount: 2,
569
+ maxTagTextLength: 5,
570
+ multiple: true,
571
+ onChange: function onChange(value) {
571
572
  setSelCatgsList(value);
572
573
  },
573
574
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
574
575
  size: "small",
576
+ treeData: catgsList,
577
+ treeDefaultExpandAll: true,
575
578
  value: selCatgsList
576
- }, catgsList.map(function (item) {
577
- return /*#__PURE__*/_react["default"].createElement(OptGroup, {
578
- key: item.model.catgId,
579
- label: item.model.catgName
580
- }, (item.children || []).map(function (i) {
581
- return /*#__PURE__*/_react["default"].createElement(Option, {
582
- key: i.model.catgId,
583
- value: i.model.catgId
584
- }, i.model.catgName);
585
- }));
586
- }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
579
+ })), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
587
580
  label: "Brand"
588
581
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
589
582
  mode: "multiple",
590
- onChange: function onChange(value, option) {
583
+ onChange: function onChange(value) {
591
584
  setSelBrandsList(value);
592
585
  },
593
586
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
594
587
  size: "small",
595
588
  value: selBrandsList
596
- }, brandsList.map(function (item, index) {
589
+ }, brandsList.map(function (item) {
597
590
  return /*#__PURE__*/_react["default"].createElement(Option, {
598
591
  key: item.catgId,
599
592
  value: item.brandId
@@ -706,8 +699,8 @@ var ProductModal = function ProductModal(props) {
706
699
  productCode: productCode,
707
700
  storeId: storeId,
708
701
  cmpTypeId: promotions || '',
709
- minPrice: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
710
- maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
702
+ minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
703
+ maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
711
704
  catgIds: selCatgsList.join(','),
712
705
  brandIds: selBrandsList.join(','),
713
706
  labelIds: selLabelData.value || '',
@@ -736,8 +729,8 @@ var ProductModal = function ProductModal(props) {
736
729
  productName: productName,
737
730
  productCode: productCode,
738
731
  cmpTypeId: promotions || '',
739
- minPrice: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
740
- maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
732
+ minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
733
+ maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
741
734
  catgIds: selCatgsList.join(','),
742
735
  brandIds: selBrandsList.join(','),
743
736
  labelIds: selLabelData.value || '',