@fonixtree/magic-design 1.0.67 → 1.0.69

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 (419) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/Trueno-Light.otf +0 -0
  3. package/es/assets/fonts/Trueno-Regular.otf +0 -0
  4. package/es/assets/fonts/TruenoBd.otf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.css +62 -6
  6. package/es/assets/fonts/magic-box-iconfont.css.bak +35 -3
  7. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  8. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  9. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  10. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  11. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  12. package/es/assets/images/base64/index.js +36 -2
  13. package/es/assets/images/layout-icon/walletLayout2.png +0 -0
  14. package/es/assets/images/layout-icon/walletNuriLayout1.png +0 -0
  15. package/es/assets/less/button.less +5 -0
  16. package/es/assets/less/cylon-antd.less +7246 -1686
  17. package/es/assets/less/font.less +22 -0
  18. package/es/common/AffiliateProductModal/index.js +582 -0
  19. package/es/common/AffiliateProductModal/index.less +146 -0
  20. package/es/common/Button/index.less +0 -1
  21. package/es/common/CardCarousel/index.js +171 -0
  22. package/es/common/CardCarousel/index.less +28 -0
  23. package/es/common/CountDown/index.js +20 -11
  24. package/es/common/CropperModal/index.js +126 -0
  25. package/es/common/CropperModal/index.less +29 -0
  26. package/es/common/GroupList/index.js +7 -2
  27. package/es/common/ImagePicker/index.js +1 -3
  28. package/es/common/LinkModal/CouponTable/index.js +3 -3
  29. package/es/common/LinkModal/CustomTable/index.js +1 -0
  30. package/es/common/LinkModal/FunctionTable/index.js +2 -1
  31. package/es/common/LinkModal/index.js +14 -2
  32. package/es/common/MagicLink/index.js +2 -2
  33. package/es/common/MyModal/index.js +417 -0
  34. package/es/common/MyModal/index.less +74 -0
  35. package/es/common/ProductModal/index.js +38 -3
  36. package/es/common/ProductSource/index.js +59 -18
  37. package/es/common/UrlPicker/AnchorModal/index.js +170 -0
  38. package/es/common/UrlPicker/AnchorModal/index.less +21 -0
  39. package/es/common/UrlPicker/index.js +52 -9
  40. package/es/common/index.js +24 -0
  41. package/es/composite-comp/bol/components/Banner/mobile/index.js +1 -2
  42. package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  43. package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  44. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  45. package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  46. package/es/composite-comp/bol/components/Video/index.js +1 -2
  47. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
  48. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
  49. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
  50. package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
  51. package/es/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
  52. package/es/composite-comp/bol/components/Wallet/index.js +11 -15
  53. package/es/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
  54. package/es/composite-comp/bol/components/Wallet/mobile/index.less +103 -40
  55. package/es/composite-comp/bol/components/Wallet/pc/index.js +0 -2
  56. package/es/composite-comp/bol/components/Wallet/pc/index.less +1 -40
  57. package/es/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
  58. package/es/composite-comp/bol/components/WalletNuri/index.js +84 -0
  59. package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
  60. package/es/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
  61. package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
  62. package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
  63. package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
  64. package/es/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
  65. package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  66. package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
  67. package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
  68. package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
  69. package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  70. package/es/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  71. package/es/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
  72. package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
  73. package/es/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
  74. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
  75. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
  76. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
  77. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
  78. package/es/composite-comp/common/components/AffiliateProductItem/index.js +168 -0
  79. package/es/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
  80. package/es/composite-comp/common/components/ProductItem/index.js +22 -20
  81. package/es/composite-comp/common/components/ProductItem/index.less +2 -12
  82. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
  83. package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
  84. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
  85. package/es/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
  86. package/es/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
  87. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
  88. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
  89. package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
  90. package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
  91. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +92 -0
  92. package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
  93. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +107 -0
  94. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
  95. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
  96. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  97. package/es/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
  98. package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +102 -0
  99. package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
  100. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
  101. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
  102. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
  103. package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
  104. package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
  105. package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
  106. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
  107. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
  108. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  109. package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
  110. package/es/composite-comp/dito/components/Orders/index.js +84 -0
  111. package/es/composite-comp/dito/components/Orders/mobile/index.js +345 -0
  112. package/es/composite-comp/dito/components/Orders/mobile/index.less +82 -0
  113. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
  114. package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
  115. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  116. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +587 -0
  117. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +133 -0
  118. package/es/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
  119. package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  120. package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -5
  121. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  122. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +6 -9
  123. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
  124. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
  125. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  126. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
  127. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
  128. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  129. package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
  130. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
  131. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
  132. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
  133. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
  134. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
  135. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +121 -0
  136. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
  137. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
  138. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
  139. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
  140. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
  141. package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
  142. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +131 -0
  143. package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
  144. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
  145. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
  146. package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
  147. package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
  148. package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
  149. package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
  150. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
  151. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -0
  152. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
  153. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
  154. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
  155. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
  156. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
  157. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
  158. package/es/constants/component-types.js +45 -3
  159. package/es/constants/index.js +74 -5
  160. package/es/constants/layout.js +48 -1
  161. package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +128 -0
  162. package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
  163. package/es/core/Designer/ChatRobot/index.js +84 -17
  164. package/es/core/Designer/ChatRobot/index.less +69 -28
  165. package/es/core/Designer/ConfigPanel/index.js +14 -3
  166. package/es/core/Designer/FonixtreeGpt/index.js +222 -29
  167. package/es/core/Designer/PageCompList/index.js +6 -5
  168. package/es/core/Designer/QuickMenuBar/index.js +11 -5
  169. package/es/core/Designer/QuickMenuBar/index.less +4 -0
  170. package/es/core/Designer/RenderHtml/index.js +18 -15
  171. package/es/core/Designer/RenderHtml/index.less +1 -1
  172. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
  173. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
  174. package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
  175. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
  176. package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
  177. package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
  178. package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
  179. package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
  180. package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
  181. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
  182. package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
  183. package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
  184. package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
  185. package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
  186. package/es/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
  187. package/es/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
  188. package/es/core/Designer/ToolBarModal/index.js +68 -22
  189. package/es/core/Designer/ToolBarModal/index.less +3 -2
  190. package/es/core/Designer/index.js +26 -2
  191. package/es/core/Renderer/index.js +76 -29
  192. package/es/decorator/compositeDecorator.js +33 -6
  193. package/es/decorator/metaDecorator.js +1 -1
  194. package/es/locale/en/en.json +17 -3
  195. package/es/locale/es/es.json +17 -3
  196. package/es/locale/id/id.json +17 -3
  197. package/es/meta-comp/components/Image/index.js +31 -25
  198. package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
  199. package/es/meta-comp/components/Text/index.js +4 -1
  200. package/es/meta-comp/components/Text/index.less +8 -0
  201. package/es/meta-comp/config-panels/ImageConfig/index.js +48 -44
  202. package/es/mobx/Frame.js +17 -2
  203. package/es/mobx/UserState.js +144 -0
  204. package/es/mobx/index.js +9 -3
  205. package/es/utils/androidUtil.js +13 -2
  206. package/es/utils/businessUtil.js +25 -3
  207. package/es/utils/commonUtil.js +177 -22
  208. package/es/utils/coreUtil.js +45 -2
  209. package/es/utils/currencyUtil.js +9 -2
  210. package/lib/assets/fonts/.DS_Store +0 -0
  211. package/lib/assets/fonts/Trueno-Light.otf +0 -0
  212. package/lib/assets/fonts/Trueno-Regular.otf +0 -0
  213. package/lib/assets/fonts/TruenoBd.otf +0 -0
  214. package/lib/assets/fonts/magic-box-iconfont.css +62 -6
  215. package/lib/assets/fonts/magic-box-iconfont.css.bak +35 -3
  216. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  217. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  218. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  219. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  220. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  221. package/lib/assets/images/base64/index.js +36 -2
  222. package/lib/assets/images/layout-icon/walletLayout2.png +0 -0
  223. package/lib/assets/images/layout-icon/walletNuriLayout1.png +0 -0
  224. package/lib/assets/less/button.less +5 -0
  225. package/lib/assets/less/cylon-antd.less +7246 -1686
  226. package/lib/assets/less/font.less +22 -0
  227. package/lib/common/AffiliateProductModal/index.js +582 -0
  228. package/lib/common/AffiliateProductModal/index.less +146 -0
  229. package/lib/common/Button/index.less +0 -1
  230. package/lib/common/CardCarousel/index.js +171 -0
  231. package/lib/common/CardCarousel/index.less +28 -0
  232. package/lib/common/CountDown/index.js +20 -11
  233. package/lib/common/CropperModal/index.js +126 -0
  234. package/lib/common/CropperModal/index.less +29 -0
  235. package/lib/common/GroupList/index.js +7 -2
  236. package/lib/common/ImagePicker/index.js +1 -3
  237. package/lib/common/LinkModal/CouponTable/index.js +3 -3
  238. package/lib/common/LinkModal/CustomTable/index.js +1 -0
  239. package/lib/common/LinkModal/FunctionTable/index.js +2 -1
  240. package/lib/common/LinkModal/index.js +14 -2
  241. package/lib/common/MagicLink/index.js +2 -2
  242. package/lib/common/MyModal/index.js +417 -0
  243. package/lib/common/MyModal/index.less +74 -0
  244. package/lib/common/ProductModal/index.js +38 -3
  245. package/lib/common/ProductSource/index.js +59 -18
  246. package/lib/common/UrlPicker/AnchorModal/index.js +170 -0
  247. package/lib/common/UrlPicker/AnchorModal/index.less +21 -0
  248. package/lib/common/UrlPicker/index.js +52 -9
  249. package/lib/common/index.js +24 -0
  250. package/lib/composite-comp/bol/components/Banner/mobile/index.js +1 -2
  251. package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  252. package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  253. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  254. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  255. package/lib/composite-comp/bol/components/Video/index.js +1 -2
  256. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
  257. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
  258. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
  259. package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
  260. package/lib/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
  261. package/lib/composite-comp/bol/components/Wallet/index.js +11 -15
  262. package/lib/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
  263. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +103 -40
  264. package/lib/composite-comp/bol/components/Wallet/pc/index.js +0 -2
  265. package/lib/composite-comp/bol/components/Wallet/pc/index.less +1 -40
  266. package/lib/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
  267. package/lib/composite-comp/bol/components/WalletNuri/index.js +84 -0
  268. package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
  269. package/lib/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
  270. package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
  271. package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
  272. package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
  273. package/lib/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
  274. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  275. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
  276. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
  277. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
  278. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  279. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  280. package/lib/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
  281. package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
  282. package/lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
  283. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
  284. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
  285. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
  286. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
  287. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +168 -0
  288. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
  289. package/lib/composite-comp/common/components/ProductItem/index.js +22 -20
  290. package/lib/composite-comp/common/components/ProductItem/index.less +2 -12
  291. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
  292. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
  293. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
  294. package/lib/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
  295. package/lib/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
  296. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
  297. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
  298. package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
  299. package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
  300. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +92 -0
  301. package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
  302. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +107 -0
  303. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
  304. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
  305. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  306. package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
  307. package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +102 -0
  308. package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
  309. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
  310. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
  311. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
  312. package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
  313. package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
  314. package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
  315. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
  316. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
  317. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  318. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
  319. package/lib/composite-comp/dito/components/Orders/index.js +84 -0
  320. package/lib/composite-comp/dito/components/Orders/mobile/index.js +345 -0
  321. package/lib/composite-comp/dito/components/Orders/mobile/index.less +82 -0
  322. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
  323. package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
  324. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  325. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +587 -0
  326. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +133 -0
  327. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
  328. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  329. package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -5
  330. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  331. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +6 -9
  332. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
  333. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
  334. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  335. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
  336. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
  337. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  338. package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
  339. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
  340. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
  341. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
  342. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
  343. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
  344. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +121 -0
  345. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
  346. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
  347. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
  348. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
  349. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
  350. package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
  351. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +131 -0
  352. package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
  353. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
  354. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
  355. package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
  356. package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
  357. package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
  358. package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
  359. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
  360. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -0
  361. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
  362. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
  363. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
  364. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
  365. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
  366. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
  367. package/lib/constants/component-types.js +45 -3
  368. package/lib/constants/index.js +74 -5
  369. package/lib/constants/layout.js +48 -1
  370. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +128 -0
  371. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
  372. package/lib/core/Designer/ChatRobot/index.js +84 -17
  373. package/lib/core/Designer/ChatRobot/index.less +69 -28
  374. package/lib/core/Designer/ConfigPanel/index.js +14 -3
  375. package/lib/core/Designer/FonixtreeGpt/index.js +222 -29
  376. package/lib/core/Designer/PageCompList/index.js +6 -5
  377. package/lib/core/Designer/QuickMenuBar/index.js +11 -5
  378. package/lib/core/Designer/QuickMenuBar/index.less +4 -0
  379. package/lib/core/Designer/RenderHtml/index.js +18 -15
  380. package/lib/core/Designer/RenderHtml/index.less +1 -1
  381. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
  382. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
  383. package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
  384. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
  385. package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
  386. package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
  387. package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
  388. package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
  389. package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
  390. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
  391. package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
  392. package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
  393. package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
  394. package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
  395. package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
  396. package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
  397. package/lib/core/Designer/ToolBarModal/index.js +68 -22
  398. package/lib/core/Designer/ToolBarModal/index.less +3 -2
  399. package/lib/core/Designer/index.js +26 -2
  400. package/lib/core/Renderer/index.js +76 -29
  401. package/lib/decorator/compositeDecorator.js +33 -6
  402. package/lib/decorator/metaDecorator.js +1 -1
  403. package/lib/locale/en/en.json +17 -3
  404. package/lib/locale/es/es.json +17 -3
  405. package/lib/locale/id/id.json +17 -3
  406. package/lib/meta-comp/components/Image/index.js +31 -25
  407. package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
  408. package/lib/meta-comp/components/Text/index.js +4 -1
  409. package/lib/meta-comp/components/Text/index.less +8 -0
  410. package/lib/meta-comp/config-panels/ImageConfig/index.js +48 -44
  411. package/lib/mobx/Frame.js +17 -2
  412. package/lib/mobx/UserState.js +144 -0
  413. package/lib/mobx/index.js +9 -3
  414. package/lib/utils/androidUtil.js +13 -2
  415. package/lib/utils/businessUtil.js +25 -3
  416. package/lib/utils/commonUtil.js +177 -22
  417. package/lib/utils/coreUtil.js +45 -2
  418. package/lib/utils/currencyUtil.js +9 -2
  419. package/package.json +2 -1
@@ -0,0 +1,587 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setAccountPageValue = exports.pInfoData = exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _lodash = require("lodash");
13
+
14
+ var _antd = require("antd");
15
+
16
+ var _avatar = _interopRequireDefault(require("./images/avatar.png"));
17
+
18
+ var _components = require("../../../../../meta-comp/components");
19
+
20
+ var _androidUtil = require("../../../../../utils/androidUtil");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
25
+
26
+ var _commonUtil = require("../../../../../utils/commonUtil");
27
+
28
+ var _index = require("../../../../../constants/index");
29
+
30
+ var _storeUtil = require("../../../../../utils/storeUtil");
31
+
32
+ var _common = require("../../../../../common");
33
+
34
+ require("./index.less");
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
+
38
+ var __extends = void 0 && (void 0).__extends || function () {
39
+ var _extendStatics = function extendStatics(d, b) {
40
+ _extendStatics = Object.setPrototypeOf || {
41
+ __proto__: []
42
+ } instanceof Array && function (d, b) {
43
+ d.__proto__ = b;
44
+ } || function (d, b) {
45
+ for (var p in b) {
46
+ if (b.hasOwnProperty(p)) d[p] = b[p];
47
+ }
48
+ };
49
+
50
+ return _extendStatics(d, b);
51
+ };
52
+
53
+ return function (d, b) {
54
+ _extendStatics(d, b);
55
+
56
+ function __() {
57
+ this.constructor = d;
58
+ }
59
+
60
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
+ };
62
+ }();
63
+
64
+ var __assign = void 0 && (void 0).__assign || function () {
65
+ __assign = Object.assign || function (t) {
66
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
67
+ s = arguments[i];
68
+
69
+ for (var p in s) {
70
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
71
+ }
72
+ }
73
+
74
+ return t;
75
+ };
76
+
77
+ return __assign.apply(this, arguments);
78
+ };
79
+
80
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
81
+ function adopt(value) {
82
+ return value instanceof P ? value : new P(function (resolve) {
83
+ resolve(value);
84
+ });
85
+ }
86
+
87
+ return new (P || (P = Promise))(function (resolve, reject) {
88
+ function fulfilled(value) {
89
+ try {
90
+ step(generator.next(value));
91
+ } catch (e) {
92
+ reject(e);
93
+ }
94
+ }
95
+
96
+ function rejected(value) {
97
+ try {
98
+ step(generator["throw"](value));
99
+ } catch (e) {
100
+ reject(e);
101
+ }
102
+ }
103
+
104
+ function step(result) {
105
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
106
+ }
107
+
108
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
109
+ });
110
+ };
111
+
112
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
113
+ var _ = {
114
+ label: 0,
115
+ sent: function sent() {
116
+ if (t[0] & 1) throw t[1];
117
+ return t[1];
118
+ },
119
+ trys: [],
120
+ ops: []
121
+ },
122
+ f,
123
+ y,
124
+ t,
125
+ g;
126
+ return g = {
127
+ next: verb(0),
128
+ "throw": verb(1),
129
+ "return": verb(2)
130
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
131
+ return this;
132
+ }), g;
133
+
134
+ function verb(n) {
135
+ return function (v) {
136
+ return step([n, v]);
137
+ };
138
+ }
139
+
140
+ function step(op) {
141
+ if (f) throw new TypeError("Generator is already executing.");
142
+
143
+ while (_) {
144
+ try {
145
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
146
+ if (y = 0, t) op = [op[0] & 2, t.value];
147
+
148
+ switch (op[0]) {
149
+ case 0:
150
+ case 1:
151
+ t = op;
152
+ break;
153
+
154
+ case 4:
155
+ _.label++;
156
+ return {
157
+ value: op[1],
158
+ done: false
159
+ };
160
+
161
+ case 5:
162
+ _.label++;
163
+ y = op[1];
164
+ op = [0];
165
+ continue;
166
+
167
+ case 7:
168
+ op = _.ops.pop();
169
+
170
+ _.trys.pop();
171
+
172
+ continue;
173
+
174
+ default:
175
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
176
+ _ = 0;
177
+ continue;
178
+ }
179
+
180
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
181
+ _.label = op[1];
182
+ break;
183
+ }
184
+
185
+ if (op[0] === 6 && _.label < t[1]) {
186
+ _.label = t[1];
187
+ t = op;
188
+ break;
189
+ }
190
+
191
+ if (t && _.label < t[2]) {
192
+ _.label = t[2];
193
+
194
+ _.ops.push(op);
195
+
196
+ break;
197
+ }
198
+
199
+ if (t[2]) _.ops.pop();
200
+
201
+ _.trys.pop();
202
+
203
+ continue;
204
+ }
205
+
206
+ op = body.call(thisArg, _);
207
+ } catch (e) {
208
+ op = [6, e];
209
+ y = 0;
210
+ } finally {
211
+ f = t = 0;
212
+ }
213
+ }
214
+
215
+ if (op[0] & 5) throw op[1];
216
+ return {
217
+ value: op[0] ? op[1] : void 0,
218
+ done: true
219
+ };
220
+ }
221
+ };
222
+
223
+ var pInfoData = {
224
+ Wishlist: {
225
+ route: '/favourite/list'
226
+ },
227
+ Stores: {
228
+ route: '/collect-store'
229
+ },
230
+ Vouchers: {
231
+ route: '/my-coupon'
232
+ },
233
+ 'Recently Viewed': {
234
+ route: '/review-list'
235
+ }
236
+ };
237
+ exports.pInfoData = pInfoData;
238
+ var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
239
+ var currentUser = JSON.parse(localStorage.getItem('currentUser')) || {};
240
+
241
+ var setAccountPageValue = function setAccountPageValue(obj) {
242
+ var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
243
+ localStorage.setItem('accountPageValue', JSON.stringify(__assign(__assign({}, accountPageValue), obj)));
244
+ };
245
+
246
+ exports.setAccountPageValue = setAccountPageValue;
247
+
248
+ var PersonalInfoMobile =
249
+ /** @class */
250
+ function (_super) {
251
+ __extends(PersonalInfoMobile, _super);
252
+
253
+ function PersonalInfoMobile() {
254
+ var _this = _super !== null && _super.apply(this, arguments) || this;
255
+
256
+ _this.state = {
257
+ messageNum: '',
258
+ userInfo: currentUser,
259
+ loading: false,
260
+ selectedImgFile: {},
261
+ editImgModalVisible: false
262
+ };
263
+
264
+ _this.getNum = function (v) {
265
+ var userInfo = _this.state.userInfo;
266
+
267
+ if (v === _index.personalInfoType.WISHLIST) {
268
+ return userInfo.userCollectionNum || 0;
269
+ } else if (v === _index.personalInfoType.STORES) {
270
+ return userInfo.userCollectionStoreNum || 0;
271
+ } else if (v === _index.personalInfoType.VOUCHERS) {
272
+ return userInfo.couponNum || 0;
273
+ } else if (v === _index.personalInfoType.VIEWED) {
274
+ return userInfo.recentViewNum || 0;
275
+ }
276
+ };
277
+
278
+ _this.handleFileChange = function (e) {
279
+ var file = e.target.files[0];
280
+
281
+ if (file) {
282
+ if (file.name.length > 120) {
283
+ _antd.message.error((0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'));
284
+
285
+ return;
286
+ }
287
+
288
+ _this.hideBottomBar();
289
+
290
+ _this.setState({
291
+ editImgModalVisible: true,
292
+ selectedImgFile: file
293
+ });
294
+ }
295
+
296
+ e.target.value = '';
297
+ };
298
+
299
+ _this.goSettings = function () {
300
+ if ((0, _commonUtil.checkLogin)()) {
301
+ (0, _commonUtil.navigateTo)('/settings');
302
+ }
303
+ };
304
+
305
+ _this.goMessageCenter = function () {
306
+ if ((0, _commonUtil.checkLogin)(true)) {
307
+ (0, _commonUtil.navigateTo)('/message-center');
308
+ }
309
+ };
310
+
311
+ _this.clickName = function () {
312
+ if (!(0, _lodash.isEmpty)(LPObj)) {
313
+ return;
314
+ }
315
+
316
+ (0, _commonUtil.navigateTo)('/account/information');
317
+ };
318
+
319
+ _this.goLoginPage = function () {
320
+ if ((0, _androidUtil.browserVersion)().isApp) {
321
+ (0, _androidUtil.goToLoginApp)();
322
+ } else {
323
+ (0, _commonUtil.goLogin)();
324
+ }
325
+ };
326
+
327
+ _this.getMessageNum = function () {
328
+ return __awaiter(_this, void 0, void 0, function () {
329
+ var num;
330
+ return __generator(this, function (_a) {
331
+ switch (_a.label) {
332
+ case 0:
333
+ return [4
334
+ /*yield*/
335
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/inbox/unread/num', {}, 'GET')];
336
+
337
+ case 1:
338
+ num = _a.sent();
339
+ if (num > 9) num = '9+';
340
+ this.setState({
341
+ messageNum: num
342
+ });
343
+ setAccountPageValue({
344
+ messageNum: num
345
+ });
346
+ return [2
347
+ /*return*/
348
+ ];
349
+ }
350
+ });
351
+ });
352
+ };
353
+
354
+ _this.getUserInfo = function () {
355
+ return __awaiter(_this, void 0, void 0, function () {
356
+ var info;
357
+ return __generator(this, function (_a) {
358
+ switch (_a.label) {
359
+ case 0:
360
+ return [4
361
+ /*yield*/
362
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users', {}, 'GET')];
363
+
364
+ case 1:
365
+ info = _a.sent();
366
+ this.setState({
367
+ userInfo: info
368
+ });
369
+ return [2
370
+ /*return*/
371
+ ];
372
+ }
373
+ });
374
+ });
375
+ };
376
+
377
+ _this.modifyPhoto = function (params) {
378
+ return __awaiter(_this, void 0, void 0, function () {
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0:
382
+ return [4
383
+ /*yield*/
384
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/modify', params, 'POST')];
385
+
386
+ case 1:
387
+ _a.sent();
388
+
389
+ this.showBottomBar();
390
+ this.setState(function (preState, props) {
391
+ return {
392
+ userInfo: __assign(__assign({}, preState.userInfo), {
393
+ photo: params.photo
394
+ }),
395
+ loading: false,
396
+ editImgModalVisible: false
397
+ };
398
+ });
399
+ return [2
400
+ /*return*/
401
+ ];
402
+ }
403
+ });
404
+ });
405
+ };
406
+
407
+ _this.hideBottomBar = function () {
408
+ var homeNavBar = document.querySelector('.home-navigation');
409
+ console.log('homeNavBar', homeNavBar);
410
+ if (homeNavBar) homeNavBar.style.visibility = 'hidden';
411
+ };
412
+
413
+ _this.showBottomBar = function () {
414
+ var homeNavBar = document.querySelector('.home-navigation');
415
+ if (homeNavBar) homeNavBar.style.visibility = 'visible';
416
+ };
417
+
418
+ _this.onUploadImg = function (formData) {
419
+ if (_this.state.loading) return;
420
+
421
+ _this.setState({
422
+ loading: true
423
+ });
424
+
425
+ fetch('/designer/v1/h5/image', {
426
+ method: 'POST',
427
+ body: formData
428
+ }).then(function (response) {
429
+ return response.json();
430
+ }).then(function (responseData) {
431
+ var _a;
432
+
433
+ if (((_a = responseData === null || responseData === void 0 ? void 0 : responseData.fileUrl) === null || _a === void 0 ? void 0 : _a.length) > 120) {
434
+ _antd.message.toast({
435
+ type: 'error',
436
+ message: (0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'),
437
+ duration: 3000
438
+ });
439
+
440
+ return;
441
+ }
442
+
443
+ _this.modifyPhoto({
444
+ photo: responseData.fileUrl
445
+ });
446
+ })["catch"](function (err) {
447
+ _antd.message.toast({
448
+ type: 'error',
449
+ message: err === null || err === void 0 ? void 0 : err.data,
450
+ duration: 5000
451
+ });
452
+
453
+ _this.showBottomBar();
454
+
455
+ _this.setState({
456
+ editImgModalVisible: false,
457
+ loading: false
458
+ });
459
+ });
460
+ };
461
+
462
+ _this.onItemClick = function (v) {
463
+ var _a;
464
+
465
+ var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
466
+ var selfUrl = (0, _commonUtil.ensure)(function () {
467
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
468
+ }, '');
469
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
470
+ };
471
+
472
+ return _this;
473
+ }
474
+
475
+ PersonalInfoMobile.prototype.componentDidMount = function () {
476
+ if ((0, _commonUtil.checkLogin)(false)) {
477
+ this.getUserInfo();
478
+ }
479
+
480
+ this.getMessageNum();
481
+ };
482
+
483
+ PersonalInfoMobile.prototype.render = function () {
484
+ var _this = this;
485
+
486
+ var data = this.props.data;
487
+ var _a = this.state,
488
+ messageNum = _a.messageNum,
489
+ userInfo = _a.userInfo,
490
+ editImgModalVisible = _a.editImgModalVisible,
491
+ selectedImgFile = _a.selectedImgFile;
492
+ return /*#__PURE__*/_react["default"].createElement("div", {
493
+ className: (0, _classnames["default"])('personal-information-mobile')
494
+ }, /*#__PURE__*/_react["default"].createElement("div", {
495
+ className: "top"
496
+ }, /*#__PURE__*/_react["default"].createElement("div", {
497
+ className: "pInfoWrap"
498
+ }, (0, _commonUtil.isLogin)() ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
499
+ className: "photoWrap"
500
+ }, /*#__PURE__*/_react["default"].createElement("img", {
501
+ alt: "",
502
+ className: "photo",
503
+ src: userInfo.photo || _avatar["default"],
504
+ style: {
505
+ height: 44,
506
+ width: 44,
507
+ background: userInfo.photo ? '#fff' : 'unset'
508
+ }
509
+ }), /*#__PURE__*/_react["default"].createElement("input", {
510
+ accept: "image/*",
511
+ id: "userPhoto",
512
+ onChange: this.handleFileChange,
513
+ type: "file"
514
+ })), /*#__PURE__*/_react["default"].createElement("div", {
515
+ className: "userInfo"
516
+ }, /*#__PURE__*/_react["default"].createElement("p", {
517
+ className: "name",
518
+ onClick: this.clickName
519
+ }, userInfo.firstName || userInfo.nickName), /*#__PURE__*/_react["default"].createElement("p", {
520
+ className: "phone"
521
+ }, userInfo.mobilePhone))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
522
+ className: "photo"
523
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
524
+ color: "#fff",
525
+ size: 32,
526
+ type: "icon-account"
527
+ })), data.login.open && /*#__PURE__*/_react["default"].createElement("span", {
528
+ className: "btnLogin",
529
+ onClick: this.goLoginPage
530
+ }, (0, _locale.i18n)('LOGIN_OR_REGISTER')))), /*#__PURE__*/_react["default"].createElement("div", {
531
+ className: "btnGroup"
532
+ }, (0, _lodash.isEmpty)(LPObj) && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
533
+ color: "#fff",
534
+ onClick: this.goSettings,
535
+ size: 24,
536
+ type: "icon-set"
537
+ }), /*#__PURE__*/_react["default"].createElement("div", {
538
+ className: "iconWrap"
539
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
540
+ color: "#fff",
541
+ onClick: this.goMessageCenter,
542
+ size: 24,
543
+ type: "icon-messages"
544
+ }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
545
+ className: "num"
546
+ }, messageNum)))), /*#__PURE__*/_react["default"].createElement("div", {
547
+ className: "bottom"
548
+ }, data.groupSource.map(function (item) {
549
+ return /*#__PURE__*/_react["default"].createElement("div", {
550
+ className: "item",
551
+ onClick: function onClick() {
552
+ return _this.onItemClick(item.sourceType);
553
+ }
554
+ }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
555
+ className: "number",
556
+ data: __assign(__assign({}, item.number), {
557
+ text: (0, _commonUtil.isLogin)() ? _this.getNum(item.sourceType) : '- -'
558
+ }),
559
+ readonly: true
560
+ }), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
561
+ className: "title",
562
+ data: item.title,
563
+ onTextInput: function onTextInput(text) {
564
+ item.title.text = text;
565
+ }
566
+ }));
567
+ })), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
568
+ onClose: function onClose() {
569
+ _this.setState({
570
+ editImgModalVisible: false
571
+ });
572
+
573
+ _this.showBottomBar();
574
+ },
575
+ onSubmit: this.onUploadImg,
576
+ uploadedImageFile: selectedImgFile
577
+ }));
578
+ };
579
+
580
+ PersonalInfoMobile.defaultProps = {
581
+ data: {}
582
+ };
583
+ return PersonalInfoMobile;
584
+ }(_react["default"].Component);
585
+
586
+ var _default = PersonalInfoMobile;
587
+ exports["default"] = _default;
@@ -0,0 +1,133 @@
1
+ .personal-information-mobile {
2
+ height: 3.24rem;
3
+ padding: 0.32rem;
4
+ box-sizing: border-box;
5
+ }
6
+ .personal-information-mobile .top {
7
+ display: flex;
8
+ justify-content: space-between;
9
+ align-items: flex-start;
10
+ }
11
+ .personal-information-mobile .top .pInfoWrap {
12
+ display: flex;
13
+ align-items: center;
14
+ }
15
+ .personal-information-mobile .top .pInfoWrap .photoWrap {
16
+ position: relative;
17
+ display: inline-block;
18
+ vertical-align: middle;
19
+ margin-right: 0.3rem;
20
+ height: 0.88rem;
21
+ width: 0.88rem;
22
+ }
23
+ .personal-information-mobile .top .pInfoWrap .photoWrap > input {
24
+ position: absolute;
25
+ z-index: 1;
26
+ top: 0;
27
+ left: 0;
28
+ width: 100%;
29
+ height: 100%;
30
+ opacity: 0;
31
+ }
32
+ .personal-information-mobile .top .pInfoWrap .userInfo {
33
+ display: inline-block;
34
+ vertical-align: middle;
35
+ }
36
+ .personal-information-mobile .top .pInfoWrap .userInfo p {
37
+ margin: 0;
38
+ }
39
+ .personal-information-mobile .top .pInfoWrap .userInfo .name {
40
+ font-size: 0.28rem;
41
+ font-weight: 500;
42
+ color: #ffffff;
43
+ max-width: 2.96rem;
44
+ white-space: nowrap;
45
+ text-overflow: ellipsis;
46
+ overflow: hidden;
47
+ word-break: break-all;
48
+ }
49
+ .personal-information-mobile .top .pInfoWrap .userInfo .phone {
50
+ font-size: 0.28rem;
51
+ font-weight: 400;
52
+ color: #ffffff;
53
+ margin-top: 0.1rem;
54
+ }
55
+ .personal-information-mobile .top .pInfoWrap .photo {
56
+ display: inline-block;
57
+ width: 0.88rem;
58
+ height: 0.88rem;
59
+ line-height: 1.2rem;
60
+ text-align: center;
61
+ background: #7b7b7b;
62
+ margin-right: 0.3rem;
63
+ border-radius: 50%;
64
+ }
65
+ .personal-information-mobile .top .pInfoWrap .btnLogin {
66
+ font-size: 0.28rem;
67
+ font-weight: 400;
68
+ color: #ffffff;
69
+ font-family: Montserrat;
70
+ }
71
+ .personal-information-mobile .top .btnGroup .iconWrap {
72
+ display: inline-block;
73
+ margin-left: 0.3rem;
74
+ position: relative;
75
+ }
76
+ .personal-information-mobile .top .btnGroup .num {
77
+ position: absolute;
78
+ top: -0.04rem;
79
+ left: 0.28rem;
80
+ display: inline-block;
81
+ padding: 0 0.08rem;
82
+ border-radius: 50%;
83
+ text-align: center;
84
+ min-width: 0.32rem;
85
+ height: 0.32rem;
86
+ line-height: 0.32rem;
87
+ background: #ce1126;
88
+ font-size: 0.12rem;
89
+ color: #ffffff;
90
+ }
91
+ .personal-information-mobile .bottom {
92
+ display: flex;
93
+ flex-direction: row;
94
+ justify-content: space-around;
95
+ width: 100%;
96
+ margin-top: 0.48rem;
97
+ }
98
+ .personal-information-mobile .bottom .item {
99
+ display: flex;
100
+ flex-direction: column;
101
+ justify-content: flex-start;
102
+ align-items: center;
103
+ flex: 1;
104
+ position: relative;
105
+ }
106
+ .personal-information-mobile .bottom .item:after {
107
+ content: '';
108
+ display: inline-block;
109
+ width: 0.02rem;
110
+ height: 0.9rem;
111
+ position: absolute;
112
+ right: 0;
113
+ top: 0.12rem;
114
+ background: #ccc;
115
+ }
116
+ .personal-information-mobile .bottom .item:last-child:after {
117
+ display: none;
118
+ }
119
+ .personal-information-mobile .bottom .item .number {
120
+ width: 70% !important;
121
+ font-size: 0.36rem;
122
+ font-weight: 600;
123
+ color: #ffffff;
124
+ text-align: center;
125
+ }
126
+ .personal-information-mobile .bottom .item .title {
127
+ width: 70% !important;
128
+ font-size: 0.24rem;
129
+ font-weight: 400;
130
+ color: #ffffff;
131
+ line-height: 0.32rem;
132
+ text-align: center;
133
+ }