@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
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _BoldSVG = _interopRequireDefault(require("./images/BoldSVG"));
13
+
14
+ var _ItalicSVG = _interopRequireDefault(require("./images/ItalicSVG"));
15
+
16
+ var _StrikeSVG = _interopRequireDefault(require("./images/StrikeSVG"));
17
+
18
+ var _UnderlineSVG = _interopRequireDefault(require("./images/UnderlineSVG"));
19
+
20
+ var _ColorPickerBtn = _interopRequireDefault(require("./components/ColorPickerBtn"));
21
+
22
+ var _LinkBtn = _interopRequireDefault(require("./components/LinkBtn"));
23
+
24
+ var _AlignPicker = _interopRequireDefault(require("./components/AlignPicker"));
25
+
26
+ var _OrderSVG = _interopRequireDefault(require("./images/OrderSVG"));
27
+
28
+ var _UnorderSVG = _interopRequireDefault(require("./images/UnorderSVG"));
29
+
30
+ var _BulletPicker = _interopRequireDefault(require("./components/BulletPicker"));
31
+
32
+ var _OrderedPicker = _interopRequireDefault(require("./components/OrderedPicker"));
33
+
34
+ require("./index.less");
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
+
38
+ 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); }
39
+
40
+ var __extends = void 0 && (void 0).__extends || function () {
41
+ var _extendStatics = function extendStatics(d, b) {
42
+ _extendStatics = Object.setPrototypeOf || {
43
+ __proto__: []
44
+ } instanceof Array && function (d, b) {
45
+ d.__proto__ = b;
46
+ } || function (d, b) {
47
+ for (var p in b) {
48
+ if (b.hasOwnProperty(p)) d[p] = b[p];
49
+ }
50
+ };
51
+
52
+ return _extendStatics(d, b);
53
+ };
54
+
55
+ return function (d, b) {
56
+ _extendStatics(d, b);
57
+
58
+ function __() {
59
+ this.constructor = d;
60
+ }
61
+
62
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
+ };
64
+ }();
65
+
66
+ var iconTypeMap = {
67
+ bold: _BoldSVG["default"],
68
+ italic: _ItalicSVG["default"],
69
+ strike: _StrikeSVG["default"],
70
+ underline: _UnderlineSVG["default"],
71
+ listOrder: _OrderSVG["default"],
72
+ listUnOrder: _UnorderSVG["default"],
73
+ background: function background(props) {
74
+ return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], _extends({
75
+ type: "background"
76
+ }, props));
77
+ },
78
+ link: function link(props) {
79
+ return /*#__PURE__*/_react["default"].createElement(_LinkBtn["default"], props);
80
+ },
81
+ color: function color(props) {
82
+ return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], props);
83
+ },
84
+ align: function align(props) {
85
+ return /*#__PURE__*/_react["default"].createElement(_AlignPicker["default"], props);
86
+ },
87
+ bullet: function bullet(props) {
88
+ return /*#__PURE__*/_react["default"].createElement(_BulletPicker["default"], props);
89
+ },
90
+ ordered: function ordered(props) {
91
+ return /*#__PURE__*/_react["default"].createElement(_OrderedPicker["default"], props);
92
+ },
93
+ 'text-decoration-color': function textDecorationColor(props) {
94
+ return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], _extends({
95
+ type: "text-decoration-color"
96
+ }, props));
97
+ }
98
+ };
99
+
100
+ var ToolBtn =
101
+ /** @class */
102
+ function (_super) {
103
+ __extends(ToolBtn, _super);
104
+
105
+ function ToolBtn() {
106
+ var _this = _super !== null && _super.apply(this, arguments) || this;
107
+
108
+ _this.state = {};
109
+ _this.compareData = null;
110
+ return _this;
111
+ }
112
+
113
+ ToolBtn.prototype.shouldComponentUpdate = function (nextProps) {
114
+ var active = nextProps.active,
115
+ value = nextProps.value;
116
+ var compareTarget = JSON.stringify({
117
+ active: active,
118
+ value: value
119
+ });
120
+
121
+ if (this.compareData != compareTarget) {
122
+ this.compareData = compareTarget;
123
+ return true;
124
+ }
125
+
126
+ return false;
127
+ };
128
+
129
+ ToolBtn.prototype.render = function () {
130
+ var _a = this.props,
131
+ active = _a.active,
132
+ _b = _a.type,
133
+ type = _b === void 0 ? 'bold' : _b,
134
+ onChange = _a.onChange,
135
+ value = _a.value;
136
+ return /*#__PURE__*/_react["default"].createElement("div", {
137
+ className: (0, _classnames["default"])('tool-btn-wrap', {
138
+ active: active
139
+ })
140
+ }, iconTypeMap[type]({
141
+ value: value,
142
+ onChange: onChange
143
+ }));
144
+ };
145
+
146
+ ToolBtn.defaultProps = {};
147
+ return ToolBtn;
148
+ }(_react["default"].Component);
149
+
150
+ var _default = ToolBtn;
151
+ exports["default"] = _default;
@@ -0,0 +1,25 @@
1
+ .tool-btn-wrap {
2
+ width: 26px;
3
+ height: 26px;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ cursor: pointer;
8
+ border-radius: 6px;
9
+ padding: 0;
10
+ border: none;
11
+ transition: .2s all linear;
12
+
13
+ &:hover {
14
+ background: #f8f8f8;
15
+ }
16
+
17
+ &.active {
18
+ background: #E7E9E8;
19
+ }
20
+
21
+ svg {
22
+ height: 18px;
23
+ height: 18px;
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,366 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.fontWeightList = exports.fontSizeList = exports.fontFamilyList = exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _antd = require("antd");
11
+
12
+ var _ToolBtn = _interopRequireDefault(require("./ToolBtn"));
13
+
14
+ var _coreUtil = require("../../../utils/coreUtil");
15
+
16
+ var _UnderlineSelect = _interopRequireDefault(require("../../../meta-comp/config-panels/TextConfig/UnderlineSelect"));
17
+
18
+ require("./index.less");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ var __extends = void 0 && (void 0).__extends || function () {
23
+ var _extendStatics = function extendStatics(d, b) {
24
+ _extendStatics = Object.setPrototypeOf || {
25
+ __proto__: []
26
+ } instanceof Array && function (d, b) {
27
+ d.__proto__ = b;
28
+ } || function (d, b) {
29
+ for (var p in b) {
30
+ if (b.hasOwnProperty(p)) d[p] = b[p];
31
+ }
32
+ };
33
+
34
+ return _extendStatics(d, b);
35
+ };
36
+
37
+ return function (d, b) {
38
+ _extendStatics(d, b);
39
+
40
+ function __() {
41
+ this.constructor = d;
42
+ }
43
+
44
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
+ };
46
+ }();
47
+
48
+ var fontSizeList = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
49
+ exports.fontSizeList = fontSizeList;
50
+ var fontFamilyList = [{
51
+ name: 'Montserrat',
52
+ value: 'Montserrat'
53
+ }, {
54
+ name: 'Open Sans',
55
+ value: 'OpenSans'
56
+ }];
57
+ exports.fontFamilyList = fontFamilyList;
58
+ var fontWeightList = [{
59
+ name: 'Regular',
60
+ value: '400'
61
+ }, {
62
+ name: 'Medium',
63
+ value: '500'
64
+ }, {
65
+ name: 'Semibold',
66
+ value: '600'
67
+ }, {
68
+ name: 'Bold',
69
+ value: '700'
70
+ }];
71
+ exports.fontWeightList = fontWeightList;
72
+
73
+ var ToolBarModal =
74
+ /** @class */
75
+ function (_super) {
76
+ __extends(ToolBarModal, _super);
77
+
78
+ function ToolBarModal() {
79
+ var _this = _super !== null && _super.apply(this, arguments) || this;
80
+
81
+ _this.state = {
82
+ quillFormat: {}
83
+ };
84
+ _this.toolBarRef = /*#__PURE__*/_react["default"].createRef();
85
+
86
+ _this.setToolBarPosition = function () {
87
+ var _a = _this.props.quillRef.container.getBoundingClientRect(),
88
+ top = _a.top,
89
+ left = _a.left;
90
+
91
+ var minTop = document.querySelector('.device_border').getBoundingClientRect().top;
92
+ _this.toolBarRef.current.style.top = (top > minTop ? top : minTop) + window.scrollY + 'px';
93
+ _this.toolBarRef.current.style.left = left + window.scrollX + 'px';
94
+ };
95
+
96
+ _this.onContainerScroll = function () {
97
+ _this.setToolBarPosition();
98
+ };
99
+
100
+ _this.onSelectionChange = function () {
101
+ var range = _this.props.quillRef.getSelection();
102
+
103
+ if (range) {
104
+ var quillFormat = _this.props.quillRef.getFormat();
105
+
106
+ console.log('quillFormat: ', quillFormat);
107
+
108
+ _this.setState({
109
+ quillFormat: quillFormat
110
+ });
111
+ }
112
+ };
113
+
114
+ _this.onToolBtnClick = function (type, value) {
115
+ console.log('type: ', type, value);
116
+ window._maginc_clickUrl = _coreUtil.clickUrl;
117
+ var quillFormat = _this.state.quillFormat;
118
+
119
+ if (type == 'bold') {
120
+ _this.props.quillRef.format('bold', !quillFormat['bold']);
121
+ } else if (type == 'italic') {
122
+ _this.props.quillRef.format('italic', !quillFormat['italic']);
123
+ } else if (type == 'strike') {
124
+ _this.props.quillRef.format('strike', !quillFormat['strike']);
125
+ } else if (type == 'underline') {
126
+ _this.props.quillRef.format('underline', !quillFormat['underline']);
127
+ } else if (type == 'color') {
128
+ _this.props.quillRef.format('color', value);
129
+ } else if (type == 'background') {
130
+ _this.props.quillRef.format('background', value);
131
+ } else if (type == 'align') {
132
+ _this.props.quillRef.format('align', value);
133
+ } else if (type == 'listOrder') {
134
+ var currentListType = quillFormat['list'];
135
+
136
+ _this.props.quillRef.format('list', currentListType == 'ordered' ? '' : 'ordered');
137
+ } else if (type == 'listUnOrder') {
138
+ var currentListType = quillFormat['list'];
139
+
140
+ _this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
141
+ } else if (type == 'link') {
142
+ _this.props.quillRef.format('link', JSON.stringify(value));
143
+ } else if (type == 'size') {
144
+ _this.props.quillRef.format('size', value + 'px');
145
+ } else if (type == 'font') {
146
+ _this.props.quillRef.format('font', value);
147
+ } else if (type == 'font-weight') {
148
+ _this.props.quillRef.format('font-weight', value);
149
+ } else if (type == 'font-style') {
150
+ _this.props.quillRef.format('font-style', 'italic' === quillFormat['font-style'] ? '' : 'italic');
151
+ } else if (type == 'font-family') {
152
+ _this.props.quillRef.format('font-family', value);
153
+ } else if (type == 'text-decoration-style') {
154
+ _this.props.quillRef.format('underline', true);
155
+
156
+ _this.props.quillRef.format('text-decoration-style', value);
157
+ } else if (type == 'bullet') {
158
+ _this.props.quillRef.format('list-style-type', value);
159
+
160
+ if (value === quillFormat['list-style-type']) {
161
+ _this.props.quillRef.format('list', '');
162
+ } else {
163
+ _this.props.quillRef.format('list', 'bullet');
164
+ }
165
+ } else if (type == 'ordered') {
166
+ _this.props.quillRef.format('list-style-type', value);
167
+
168
+ if (value === quillFormat['list-style-type']) {
169
+ _this.props.quillRef.format('list', '');
170
+ } else {
171
+ _this.props.quillRef.format('list', 'ordered');
172
+ }
173
+ } else if (type == 'text-decoration-color') {
174
+ if (value) {
175
+ _this.props.quillRef.format('underline', true);
176
+ } else {
177
+ _this.props.quillRef.format('underline', false);
178
+
179
+ _this.props.quillRef.format('text-decoration-style', '');
180
+ }
181
+
182
+ _this.props.quillRef.format('text-decoration-color', value);
183
+ }
184
+
185
+ _this.onSelectionChange();
186
+ };
187
+
188
+ return _this;
189
+ }
190
+
191
+ ToolBarModal.prototype.componentDidMount = function () {
192
+ var _a;
193
+
194
+ this.props.quillRef.on('selection-change', this.onSelectionChange);
195
+ (_a = document.querySelector('.device_border')) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', this.onContainerScroll);
196
+ this.setToolBarPosition();
197
+ };
198
+
199
+ ToolBarModal.prototype.componentWillUnmount = function () {
200
+ var _a;
201
+
202
+ this.props.quillRef.off('selection-change', this.onSelectionChange);
203
+ (_a = document.querySelector('.device_border')) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', this.onContainerScroll);
204
+ };
205
+
206
+ ToolBarModal.prototype.render = function () {
207
+ var _this = this;
208
+
209
+ var quillFormat = this.state.quillFormat;
210
+ return /*#__PURE__*/_react["default"].createElement("div", {
211
+ ref: this.toolBarRef,
212
+ className: "toolbar-wrap"
213
+ }, /*#__PURE__*/_react["default"].createElement("div", {
214
+ className: "toolbar-row"
215
+ }, /*#__PURE__*/_react["default"].createElement("div", {
216
+ className: "tool-item"
217
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
218
+ onChange: function onChange(v) {
219
+ _this.onToolBtnClick('font-family', v);
220
+ },
221
+ placeholder: "Font Family",
222
+ size: "small",
223
+ style: {
224
+ width: '150px'
225
+ },
226
+ value: quillFormat['font-family']
227
+ }, fontFamilyList.map(function (v) {
228
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
229
+ label: v.name,
230
+ value: v.value
231
+ }, v.name);
232
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
233
+ className: "tool-item"
234
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
235
+ onChange: function onChange(v) {
236
+ _this.onToolBtnClick('font-weight', v);
237
+ },
238
+ placeholder: "Font Weight",
239
+ size: "small",
240
+ style: {
241
+ width: '150px'
242
+ },
243
+ value: quillFormat['font-weight']
244
+ }, fontWeightList.map(function (v) {
245
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
246
+ label: v.name,
247
+ value: v.value
248
+ }, v.name);
249
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
250
+ className: "tool-item"
251
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
252
+ onChange: function onChange(v) {
253
+ _this.onToolBtnClick('size', v);
254
+ },
255
+ placeholder: "Font Size",
256
+ size: "small",
257
+ style: {
258
+ width: '120px'
259
+ },
260
+ value: quillFormat['size']
261
+ }, fontSizeList.map(function (v) {
262
+ return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
263
+ label: v.name,
264
+ value: v
265
+ }, v, "px");
266
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
267
+ className: "tool-item"
268
+ }, /*#__PURE__*/_react["default"].createElement(_UnderlineSelect["default"], {
269
+ onChange: function onChange(v) {
270
+ _this.onToolBtnClick('text-decoration-style', v);
271
+ },
272
+ placeholder: "Underline Style",
273
+ repeatCount: 28,
274
+ size: "small",
275
+ style: {
276
+ width: '140px'
277
+ },
278
+ value: quillFormat['text-decoration-style']
279
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
280
+ className: "toolbar-row"
281
+ }, /*#__PURE__*/_react["default"].createElement("div", {
282
+ className: "tool-item"
283
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
284
+ active: quillFormat['font-style'] === 'italic',
285
+ onChange: function onChange() {
286
+ _this.onToolBtnClick('font-style');
287
+ },
288
+ type: "italic"
289
+ })), /*#__PURE__*/_react["default"].createElement("div", {
290
+ className: "tool-item"
291
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
292
+ active: quillFormat['strike'],
293
+ onChange: function onChange() {
294
+ _this.onToolBtnClick('strike');
295
+ },
296
+ type: "strike"
297
+ })), /*#__PURE__*/_react["default"].createElement("div", {
298
+ className: "tool-item"
299
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
300
+ onChange: function onChange(value) {
301
+ _this.onToolBtnClick('text-decoration-color', value);
302
+ },
303
+ type: "text-decoration-color",
304
+ value: {
305
+ color: quillFormat['text-decoration-color']
306
+ }
307
+ })), /*#__PURE__*/_react["default"].createElement("div", {
308
+ className: "tooll-line"
309
+ }), /*#__PURE__*/_react["default"].createElement("div", {
310
+ className: "tool-item"
311
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
312
+ onChange: function onChange(value) {
313
+ _this.onToolBtnClick('color', value);
314
+ },
315
+ type: "color",
316
+ value: {
317
+ color: quillFormat['color']
318
+ }
319
+ })), /*#__PURE__*/_react["default"].createElement("div", {
320
+ className: "tool-item"
321
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
322
+ onChange: function onChange(value) {
323
+ _this.onToolBtnClick('background', value);
324
+ },
325
+ type: "background",
326
+ value: {
327
+ color: quillFormat['background']
328
+ }
329
+ })), /*#__PURE__*/_react["default"].createElement("div", {
330
+ className: "tool-item"
331
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
332
+ onChange: function onChange(value) {
333
+ _this.onToolBtnClick('bullet', value);
334
+ },
335
+ type: "bullet",
336
+ value: {
337
+ list: quillFormat['list-style-type']
338
+ }
339
+ })), /*#__PURE__*/_react["default"].createElement("div", {
340
+ className: "tool-item"
341
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
342
+ onChange: function onChange(value) {
343
+ _this.onToolBtnClick('ordered', value);
344
+ },
345
+ type: "ordered",
346
+ value: {
347
+ list: quillFormat['list-style-type']
348
+ }
349
+ })), /*#__PURE__*/_react["default"].createElement("div", {
350
+ className: "tooll-line"
351
+ }), /*#__PURE__*/_react["default"].createElement("div", {
352
+ className: "tool-item"
353
+ }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
354
+ onChange: function onChange(value) {
355
+ _this.onToolBtnClick('link', value);
356
+ },
357
+ type: "link"
358
+ }))));
359
+ };
360
+
361
+ ToolBarModal.defaultProps = {};
362
+ return ToolBarModal;
363
+ }(_react["default"].Component);
364
+
365
+ var _default = ToolBarModal;
366
+ exports["default"] = _default;
@@ -0,0 +1,32 @@
1
+ .toolbar-wrap {
2
+ display: flex;
3
+ border-bottom: 1px solid rgba(0, 0, 0, .04);
4
+ border-top: 1px solid rgba(0, 0, 0, .04);
5
+ position: absolute;
6
+ border-radius: 6px;
7
+ top: 0;
8
+ left: 0;
9
+ z-index: 999;
10
+ background: #fff;
11
+ transform: translateY(calc(-100% - 1px));
12
+ flex-direction: column;
13
+ padding: 3px 0;
14
+
15
+ .tool-item {
16
+ margin: 0 5px;
17
+ }
18
+
19
+ .tooll-line {
20
+ display: inline-flex;
21
+ width: 1px;
22
+ height: 24px;
23
+ background-color: rgba(0, 0, 0, .04);
24
+ margin: 0 5px;
25
+ }
26
+
27
+ .toolbar-row {
28
+ display: flex;
29
+ align-items: center;
30
+ height: 35px;
31
+ }
32
+ }
@@ -35,7 +35,7 @@ var _LeftTitle = _interopRequireDefault(require("./LeftTitle"));
35
35
 
36
36
  var _RenderHtml = _interopRequireDefault(require("./RenderHtml"));
37
37
 
38
- var _AiImageGenerator = _interopRequireDefault(require("./AiImageGenerator"));
38
+ var _ToolBarModal = _interopRequireDefault(require("./ToolBarModal"));
39
39
 
40
40
  var _componentTypes = require("../../constants/component-types");
41
41
 
@@ -43,14 +43,14 @@ var _mobx = require("../../mobx");
43
43
 
44
44
  var _constants = require("../../constants");
45
45
 
46
- require("./index.less");
47
-
48
46
  var _common = require("../../common");
49
47
 
50
48
  var _storeUtil = require("../../utils/storeUtil");
51
49
 
52
50
  var _commonUtil = require("../../utils/commonUtil");
53
51
 
52
+ require("./index.less");
53
+
54
54
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
55
55
 
56
56
  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); }
@@ -510,6 +510,9 @@ function (_super) {
510
510
  break;
511
511
 
512
512
  case _constants.quickMenuCode.SAVE:
513
+ /** 如果保存则重置为mobile,同一移动端截图 #10504010 */
514
+ _this.onSwitchDevice(_constants.deviceTypeMap.PHONE);
515
+
513
516
  onSave(handleParams);
514
517
  break;
515
518
 
@@ -608,6 +611,18 @@ function (_super) {
608
611
  });
609
612
  };
610
613
 
614
+ _this.onEditModalOk = function (html) {
615
+ var _a;
616
+
617
+ (_a = _mobx.frameStore.textModalState) === null || _a === void 0 ? void 0 : _a.onOk(html);
618
+
619
+ _mobx.frameStore.setState({
620
+ textModalState: {
621
+ visible: false
622
+ }
623
+ });
624
+ };
625
+
611
626
  (0, _commonUtil.ensure)(function () {
612
627
  return window._MAGIC_VERSION = '0.1.49';
613
628
  });
@@ -630,7 +645,11 @@ function (_super) {
630
645
  _this.state = {
631
646
  MPageData: MPageData,
632
647
  device: _constants.deviceTypeMap.PHONE,
633
- appointmentVisible: false
648
+ appointmentVisible: false,
649
+ showEditModal: false,
650
+ textModalState: {
651
+ quillRef: null
652
+ }
634
653
  };
635
654
  setDesignConfig(__assign(__assign({}, config), {
636
655
  outputType: outputType
@@ -658,7 +677,8 @@ function (_super) {
658
677
 
659
678
  this.destory = (0, _mobx.autorun)(function () {
660
679
  var stateObj = {
661
- imgGenVisible: _mobx.store.imgGenVisible
680
+ imgGenVisible: _mobx.store.imgGenVisible,
681
+ textModalState: _mobx.frameStore.textModalState
662
682
  };
663
683
 
664
684
  if (_this.state.locale != _mobx.store.locale) {
@@ -716,7 +736,8 @@ function (_super) {
716
736
  var _a = this.state,
717
737
  MPageData = _a.MPageData,
718
738
  device = _a.device,
719
- appointmentVisible = _a.appointmentVisible;
739
+ appointmentVisible = _a.appointmentVisible,
740
+ textModalState = _a.textModalState;
720
741
  var _b = this.props,
721
742
  pagesManager = _b.pagesManager,
722
743
  compSource = _b.compSource,
@@ -735,15 +756,15 @@ function (_super) {
735
756
  return /*#__PURE__*/_react["default"].createElement(_mobxReact.Provider, {
736
757
  store: _mobx.store
737
758
  }, /*#__PURE__*/_react["default"].createElement(_antd.ConfigProvider, {
738
- getPopupContainer: function getPopupContainer(triggerNode) {
739
- return triggerNode ? triggerNode.parentNode : document.querySelector('[magic_design]');
759
+ getPopupContainer: function getPopupContainer() {
760
+ return document.querySelector('[magic_design]');
740
761
  },
741
762
  prefixCls: "cylon"
742
763
  }, /*#__PURE__*/_react["default"].createElement("div", {
743
764
  magic_design: ""
744
765
  }, /*#__PURE__*/_react["default"].createElement("div", {
745
766
  className: "designer-wrap"
746
- }, /*#__PURE__*/_react["default"].createElement(_ChatRobot["default"], null), /*#__PURE__*/_react["default"].createElement(_PageCompList["default"], {
767
+ }, window.magicDesign.needAi && /*#__PURE__*/_react["default"].createElement(_ChatRobot["default"], null), /*#__PURE__*/_react["default"].createElement(_PageCompList["default"], {
747
768
  onAdd: this.onAdd,
748
769
  pageData: MPageData,
749
770
  pageName: pageName,
@@ -777,7 +798,9 @@ function (_super) {
777
798
  },
778
799
  onConfirm: this.onAppointmentConfirm,
779
800
  visible: appointmentVisible
780
- }), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], null)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.SystemNotification, null))), /*#__PURE__*/_react["default"].createElement(_RenderHtml["default"], {
801
+ })), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.SystemNotification, null)), textModalState.quillRef && /*#__PURE__*/_react["default"].createElement(_ToolBarModal["default"], {
802
+ quillRef: textModalState.quillRef
803
+ })), /*#__PURE__*/_react["default"].createElement(_RenderHtml["default"], {
781
804
  ref: this.renderHtmlRef
782
805
  }));
783
806
  };