@fonixtree/magic-design 0.1.93 → 0.2.2

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 (247) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +7 -35
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +4 -8
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/assets/less/button.less +0 -5
  9. package/es/common/AffiliateProductModal/index.js +1 -1
  10. package/es/common/AffiliateProductModal/index.less +1 -1
  11. package/es/common/Button/index.less +1 -0
  12. package/es/common/CountDown/index.js +11 -20
  13. package/es/common/GroupList/index.js +2 -7
  14. package/es/common/LinkModal/BundleCampaign/index.js +2 -2
  15. package/es/common/LinkModal/CouponTable/index.js +1 -1
  16. package/es/common/LinkModal/CustomTable/index.js +0 -1
  17. package/es/common/LinkModal/FilteredProductModal/index.js +106 -82
  18. package/es/common/LinkModal/FilteredProductModal/index.less +0 -1
  19. package/es/common/LinkModal/ProductDetailPage/index.js +60 -115
  20. package/es/common/LinkModal/ProductDetailPage/index.less +1 -6
  21. package/es/common/LinkModal/SelectVideoModal/index.js +2 -3
  22. package/es/common/LinkModal/index.js +5 -20
  23. package/es/common/MagicLink/index.js +2 -2
  24. package/es/common/ProductModal/index.js +124 -181
  25. package/es/common/ProductModal/index.less +1 -7
  26. package/es/common/ProductSource/index.js +21 -81
  27. package/es/common/UrlPicker/index.js +10 -51
  28. package/es/common/Video/index.js +86 -142
  29. package/es/common/VideoUpload/index.js +1 -1
  30. package/es/common/index.js +0 -8
  31. package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -4
  32. package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
  33. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -3
  34. package/es/composite-comp/common/components/AffiliateProductItem/index.js +20 -22
  35. package/es/composite-comp/common/components/AffiliateProductItem/index.less +1 -31
  36. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +0 -1
  37. package/{lib/composite-comp/nuri → es/composite-comp/dito}/components/AffiliateRecommend/mobile/index.js +10 -12
  38. package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.js +10 -12
  39. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +1 -8
  40. package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +17 -22
  41. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
  42. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +0 -11
  43. package/es/composite-comp/dito/components/Recommend/mobile/index.js +26 -31
  44. package/es/composite-comp/dito/components/Recommend/pc/index.js +1 -1
  45. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -13
  46. package/{lib/composite-comp/nuri → es/composite-comp/dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  47. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +27 -25
  48. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  49. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  50. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +2 -4
  51. package/es/constants/component-types.js +6 -24
  52. package/es/constants/index.js +5 -52
  53. package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +16 -34
  54. package/es/core/Designer/ChatRobot/index.js +4 -49
  55. package/es/core/Designer/ConfigPanel/index.js +0 -6
  56. package/es/core/Designer/FonixtreeGpt/index.js +29 -222
  57. package/es/core/Designer/PageCompList/index.js +1 -1
  58. package/es/core/Designer/QuickMenuBar/index.js +2 -6
  59. package/es/core/Designer/ToolBarModal/index.js +1 -5
  60. package/es/core/Designer/index.js +1 -12
  61. package/es/core/Renderer/index.js +2 -6
  62. package/es/decorator/compositeDecorator.js +6 -10
  63. package/es/decorator/index.js +1 -4
  64. package/es/decorator/metaDecorator.js +3 -7
  65. package/es/locale/en/en.json +2 -20
  66. package/es/locale/es/es.json +2 -20
  67. package/es/locale/id/id.json +2 -20
  68. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  69. package/es/mobx/index.js +3 -9
  70. package/es/utils/androidUtil.js +2 -17
  71. package/es/utils/businessUtil.js +5 -54
  72. package/es/utils/commonUtil.js +13 -151
  73. package/es/utils/coreUtil.js +24 -89
  74. package/lib/assets/fonts/magic-box-iconfont.css +7 -35
  75. package/lib/assets/fonts/magic-box-iconfont.css.bak +4 -8
  76. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  77. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  78. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  79. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  80. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  81. package/lib/assets/less/button.less +0 -5
  82. package/lib/common/AffiliateProductModal/index.js +1 -1
  83. package/lib/common/AffiliateProductModal/index.less +1 -1
  84. package/lib/common/Button/index.less +1 -0
  85. package/lib/common/CountDown/index.js +11 -20
  86. package/lib/common/GroupList/index.js +2 -7
  87. package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
  88. package/lib/common/LinkModal/CouponTable/index.js +1 -1
  89. package/lib/common/LinkModal/CustomTable/index.js +0 -1
  90. package/lib/common/LinkModal/FilteredProductModal/index.js +106 -82
  91. package/lib/common/LinkModal/FilteredProductModal/index.less +0 -1
  92. package/lib/common/LinkModal/ProductDetailPage/index.js +60 -115
  93. package/lib/common/LinkModal/ProductDetailPage/index.less +1 -6
  94. package/lib/common/LinkModal/SelectVideoModal/index.js +2 -3
  95. package/lib/common/LinkModal/index.js +5 -20
  96. package/lib/common/MagicLink/index.js +2 -2
  97. package/lib/common/ProductModal/index.js +124 -181
  98. package/lib/common/ProductModal/index.less +1 -7
  99. package/lib/common/ProductSource/index.js +21 -81
  100. package/lib/common/UrlPicker/index.js +10 -51
  101. package/lib/common/Video/index.js +86 -142
  102. package/lib/common/VideoUpload/index.js +1 -1
  103. package/lib/common/index.js +0 -8
  104. package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -4
  105. package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
  106. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -3
  107. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +20 -22
  108. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +1 -31
  109. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +0 -1
  110. package/{es/composite-comp/nuri → lib/composite-comp/dito}/components/AffiliateRecommend/mobile/index.js +10 -12
  111. package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.js +10 -12
  112. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +1 -8
  113. package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +17 -22
  114. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
  115. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +0 -11
  116. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +26 -31
  117. package/lib/composite-comp/dito/components/Recommend/pc/index.js +1 -1
  118. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -13
  119. package/{es/composite-comp/nuri → lib/composite-comp/dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  120. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +27 -25
  121. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  122. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  123. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +2 -4
  124. package/lib/constants/component-types.js +6 -24
  125. package/lib/constants/index.js +5 -52
  126. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +16 -34
  127. package/lib/core/Designer/ChatRobot/index.js +4 -49
  128. package/lib/core/Designer/ConfigPanel/index.js +0 -6
  129. package/lib/core/Designer/FonixtreeGpt/index.js +29 -222
  130. package/lib/core/Designer/PageCompList/index.js +1 -1
  131. package/lib/core/Designer/QuickMenuBar/index.js +2 -6
  132. package/lib/core/Designer/ToolBarModal/index.js +1 -5
  133. package/lib/core/Designer/index.js +1 -12
  134. package/lib/core/Renderer/index.js +2 -6
  135. package/lib/decorator/compositeDecorator.js +6 -10
  136. package/lib/decorator/index.js +1 -4
  137. package/lib/decorator/metaDecorator.js +3 -7
  138. package/lib/locale/en/en.json +2 -20
  139. package/lib/locale/es/es.json +2 -20
  140. package/lib/locale/id/id.json +2 -20
  141. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  142. package/lib/mobx/index.js +3 -9
  143. package/lib/utils/androidUtil.js +2 -17
  144. package/lib/utils/businessUtil.js +5 -54
  145. package/lib/utils/commonUtil.js +13 -151
  146. package/lib/utils/coreUtil.js +24 -89
  147. package/package.json +1 -2
  148. package/es/common/CropperModal/index.js +0 -126
  149. package/es/common/CropperModal/index.less +0 -29
  150. package/es/common/LinkModal/AffiliatePlatform/index.js +0 -326
  151. package/es/common/LinkModal/AffiliateStore/index.js +0 -332
  152. package/es/common/ProductModal/SortableImageList/index.js +0 -118
  153. package/es/common/ProductModal/SortableImageList/index.less +0 -3
  154. package/es/common/UrlPicker/AnchorModal/index.js +0 -170
  155. package/es/common/UrlPicker/AnchorModal/index.less +0 -21
  156. package/es/common/Video/QualityComponent/index.js +0 -169
  157. package/es/common/Video/QualityComponent/index.less +0 -78
  158. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +0 -9
  159. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +0 -92
  160. package/es/composite-comp/dito/components/CommonFunctions/index.js +0 -84
  161. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +0 -113
  162. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +0 -30
  163. package/es/composite-comp/dito/components/Orders/defaultJSON.js +0 -89
  164. package/es/composite-comp/dito/components/Orders/index.js +0 -84
  165. package/es/composite-comp/dito/components/Orders/mobile/index.js +0 -350
  166. package/es/composite-comp/dito/components/Orders/mobile/index.less +0 -86
  167. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +0 -95
  168. package/es/composite-comp/dito/components/PersonalInformation/index.js +0 -84
  169. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  170. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +0 -592
  171. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +0 -135
  172. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +0 -128
  173. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +0 -113
  174. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +0 -131
  175. package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +0 -114
  176. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +0 -131
  177. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +0 -118
  178. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +0 -121
  179. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +0 -148
  180. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +0 -9
  181. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +0 -143
  182. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +0 -9
  183. package/es/mobx/UserState.js +0 -144
  184. package/lib/common/CropperModal/index.js +0 -126
  185. package/lib/common/CropperModal/index.less +0 -29
  186. package/lib/common/LinkModal/AffiliatePlatform/index.js +0 -326
  187. package/lib/common/LinkModal/AffiliateStore/index.js +0 -332
  188. package/lib/common/ProductModal/SortableImageList/index.js +0 -118
  189. package/lib/common/ProductModal/SortableImageList/index.less +0 -3
  190. package/lib/common/UrlPicker/AnchorModal/index.js +0 -170
  191. package/lib/common/UrlPicker/AnchorModal/index.less +0 -21
  192. package/lib/common/Video/QualityComponent/index.js +0 -169
  193. package/lib/common/Video/QualityComponent/index.less +0 -78
  194. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +0 -9
  195. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +0 -92
  196. package/lib/composite-comp/dito/components/CommonFunctions/index.js +0 -84
  197. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +0 -113
  198. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +0 -30
  199. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +0 -89
  200. package/lib/composite-comp/dito/components/Orders/index.js +0 -84
  201. package/lib/composite-comp/dito/components/Orders/mobile/index.js +0 -350
  202. package/lib/composite-comp/dito/components/Orders/mobile/index.less +0 -86
  203. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +0 -95
  204. package/lib/composite-comp/dito/components/PersonalInformation/index.js +0 -84
  205. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  206. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +0 -592
  207. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +0 -135
  208. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +0 -128
  209. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +0 -113
  210. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +0 -131
  211. package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +0 -114
  212. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +0 -131
  213. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +0 -118
  214. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +0 -121
  215. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +0 -148
  216. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +0 -9
  217. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +0 -143
  218. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +0 -9
  219. package/lib/mobx/UserState.js +0 -144
  220. /package/es/common/Video/{RateComponent → components}/index.js +0 -0
  221. /package/es/common/Video/{RateComponent → components}/index.less +0 -0
  222. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/defaultJSON.js +0 -0
  223. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/index.js +0 -0
  224. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/mobile/index.less +0 -0
  225. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.less +0 -0
  226. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  227. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  228. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  229. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  230. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  231. /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  232. /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  233. /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
  234. /package/lib/common/Video/{RateComponent → components}/index.js +0 -0
  235. /package/lib/common/Video/{RateComponent → components}/index.less +0 -0
  236. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/defaultJSON.js +0 -0
  237. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/index.js +0 -0
  238. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/mobile/index.less +0 -0
  239. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.less +0 -0
  240. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  241. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  242. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  243. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  244. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  245. /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  246. /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  247. /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
@@ -11,165 +11,6 @@ var _commonUtil = require("../../../utils/commonUtil");
11
11
 
12
12
  var _storeUtil = require("../../../utils/storeUtil");
13
13
 
14
- var __assign = void 0 && (void 0).__assign || function () {
15
- __assign = Object.assign || function (t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
-
19
- for (var p in s) {
20
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
21
- }
22
- }
23
-
24
- return t;
25
- };
26
-
27
- return __assign.apply(this, arguments);
28
- };
29
-
30
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
31
- function adopt(value) {
32
- return value instanceof P ? value : new P(function (resolve) {
33
- resolve(value);
34
- });
35
- }
36
-
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) {
39
- try {
40
- step(generator.next(value));
41
- } catch (e) {
42
- reject(e);
43
- }
44
- }
45
-
46
- function rejected(value) {
47
- try {
48
- step(generator["throw"](value));
49
- } catch (e) {
50
- reject(e);
51
- }
52
- }
53
-
54
- function step(result) {
55
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
56
- }
57
-
58
- step((generator = generator.apply(thisArg, _arguments || [])).next());
59
- });
60
- };
61
-
62
- var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
63
- var _ = {
64
- label: 0,
65
- sent: function sent() {
66
- if (t[0] & 1) throw t[1];
67
- return t[1];
68
- },
69
- trys: [],
70
- ops: []
71
- },
72
- f,
73
- y,
74
- t,
75
- g;
76
- return g = {
77
- next: verb(0),
78
- "throw": verb(1),
79
- "return": verb(2)
80
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
81
- return this;
82
- }), g;
83
-
84
- function verb(n) {
85
- return function (v) {
86
- return step([n, v]);
87
- };
88
- }
89
-
90
- function step(op) {
91
- if (f) throw new TypeError("Generator is already executing.");
92
-
93
- while (_) {
94
- try {
95
- 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;
96
- if (y = 0, t) op = [op[0] & 2, t.value];
97
-
98
- switch (op[0]) {
99
- case 0:
100
- case 1:
101
- t = op;
102
- break;
103
-
104
- case 4:
105
- _.label++;
106
- return {
107
- value: op[1],
108
- done: false
109
- };
110
-
111
- case 5:
112
- _.label++;
113
- y = op[1];
114
- op = [0];
115
- continue;
116
-
117
- case 7:
118
- op = _.ops.pop();
119
-
120
- _.trys.pop();
121
-
122
- continue;
123
-
124
- default:
125
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
126
- _ = 0;
127
- continue;
128
- }
129
-
130
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
131
- _.label = op[1];
132
- break;
133
- }
134
-
135
- if (op[0] === 6 && _.label < t[1]) {
136
- _.label = t[1];
137
- t = op;
138
- break;
139
- }
140
-
141
- if (t && _.label < t[2]) {
142
- _.label = t[2];
143
-
144
- _.ops.push(op);
145
-
146
- break;
147
- }
148
-
149
- if (t[2]) _.ops.pop();
150
-
151
- _.trys.pop();
152
-
153
- continue;
154
- }
155
-
156
- op = body.call(thisArg, _);
157
- } catch (e) {
158
- op = [6, e];
159
- y = 0;
160
- } finally {
161
- f = t = 0;
162
- }
163
- }
164
-
165
- if (op[0] & 5) throw op[1];
166
- return {
167
- value: op[0] ? op[1] : void 0,
168
- done: true
169
- };
170
- }
171
- };
172
-
173
14
  // 角色
174
15
  var roleMap = {
175
16
  ASSISTANT: 'assistant',
@@ -192,7 +33,6 @@ function () {
192
33
  this.initParams = {}; // 建立连接
193
34
 
194
35
  this.initChatConnect = function () {
195
- // return new Promise((resolve, reject) => {
196
36
  var _a = _this.initParams,
197
37
  onMessage = _a.onMessage,
198
38
  onEnd = _a.onEnd;
@@ -203,16 +43,14 @@ function () {
203
43
 
204
44
  eventSource.onopen = function (event) {
205
45
  console.log('onOpen');
206
- sse = event.target; // resolve();
46
+ sse = event.target;
207
47
  };
208
48
 
209
49
  eventSource.onmessage = function (event) {
210
50
  if (event.data == '[DONE]') {
211
51
  _this.isGenerating = false;
212
52
 
213
- _this.insertMessage2Context({
214
- content: text
215
- }, roleMap.ASSISTANT);
53
+ _this.insertMessage2Context(text, roleMap.ASSISTANT);
216
54
 
217
55
  text = '';
218
56
  onEnd();
@@ -239,80 +77,50 @@ function () {
239
77
  _this.isGenerating = false;
240
78
 
241
79
  _this.regenerate();
242
- }; // });
243
-
244
- }; // 获取全部对话上下文
80
+ };
81
+ }; // 获取chat上下文
245
82
 
246
83
 
247
84
  this.getContext = function () {
248
85
  var messages = (0, _storeUtil.getSessionStore)(catchKey) || [];
249
86
  return messages;
250
- }; // 获取发送消息上下文
251
-
252
-
253
- this.getSendContext = function () {
254
- var context = (0, _storeUtil.getSessionStore)(catchKey) || [];
255
- context = context.splice(context.length - 5).map(function (ctx) {
256
- return {
257
- role: ctx.role,
258
- content: ctx.content
259
- };
260
- });
261
- return context;
262
87
  }; // 消息插入上下文中
263
88
 
264
89
 
265
- this.insertMessage2Context = function (messageObj, role) {
90
+ this.insertMessage2Context = function (message, role) {
266
91
  if (role === void 0) {
267
92
  role = roleMap.USER;
268
93
  }
269
94
 
270
95
  var messages = (0, _storeUtil.getSessionStore)(catchKey) || [];
271
- messages.push(__assign({
96
+ messages.push({
97
+ content: message,
272
98
  role: role
273
- }, messageObj));
99
+ });
274
100
  (0, _storeUtil.setSessionStore)(catchKey, messages);
275
101
  }; // 发送消息
276
102
 
277
103
 
278
- this.sendMessage = function (messageObj) {
279
- return __awaiter(_this, void 0, void 0, function () {
280
- var messages, newMessages;
281
-
282
- var _this = this;
283
-
284
- return __generator(this, function (_a) {
285
- switch (_a.label) {
286
- case 0:
287
- if (!messageObj.content) {
288
- return [2
289
- /*return*/
290
- ];
291
- }
292
-
293
- this.isGenerating = true;
294
- this.insertMessage2Context(messageObj);
295
- messages = this.getSendContext();
296
- return [4
297
- /*yield*/
298
- , this.initChatConnect()];
299
-
300
- case 1:
301
- _a.sent();
302
-
303
- newMessages = messages.splice(messages.length - 5);
304
- setTimeout(function () {
305
- (0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
306
- clientId: _this.clientId,
307
- messages: newMessages
308
- }, 'POST');
309
- }, 200);
310
- return [2
311
- /*return*/
312
- ];
313
- }
314
- });
315
- });
104
+ this.sendMessage = function (message) {
105
+ if (!message) {
106
+ return;
107
+ }
108
+
109
+ _this.isGenerating = true;
110
+
111
+ _this.insertMessage2Context(message);
112
+
113
+ var messages = _this.getContext();
114
+
115
+ _this.initChatConnect();
116
+
117
+ var newMessages = messages.splice(messages.length - 5);
118
+ setTimeout(function () {
119
+ (0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
120
+ clientId: _this.clientId,
121
+ messages: newMessages
122
+ }, 'POST');
123
+ }, 200);
316
124
  }; // 重新生成
317
125
 
318
126
 
@@ -331,8 +139,7 @@ function () {
331
139
 
332
140
  _this.initChatConnect();
333
141
 
334
- var newMessages = _this.getSendContext();
335
-
142
+ var newMessages = messages.splice(messages.length - 5);
336
143
  setTimeout(function () {
337
144
  (0, _commonUtil.commonFetch)('/designer/v1/ai/stream-chat-completion', {
338
145
  clientId: _this.clientId,
@@ -293,7 +293,7 @@ function PageCompList(_a) {
293
293
  type: "icon-drag"
294
294
  }), /*#__PURE__*/_react["default"].createElement("span", {
295
295
  className: "card-title ml16"
296
- }, index + 1, ". ", (_b = _constants.compInfoMap[comp.type]) === null || _b === void 0 ? void 0 : _b.name)), pageType !== 'Menu' && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
296
+ }, index + 1, ". ", (_b = _constants.compInfoMap[comp.type]) === null || _b === void 0 ? void 0 : _b.name)), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
297
297
  overlay: menu,
298
298
  placement: "bottomRight",
299
299
  trigger: ['click']
@@ -183,11 +183,7 @@ function (_super) {
183
183
  type: "light"
184
184
  }, (0, _locale.i18n)('SAVE'))) : /*#__PURE__*/_react["default"].createElement("div", {
185
185
  className: "menu_right"
186
- }, window.magicDesign.templateType === _constants.tempTypeMap.PAGE && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
187
- "data-code": _constants.quickMenuCode.SET_AS_TEMPLATE,
188
- onClick: this.onBtnClick,
189
- type: "text"
190
- }, (0, _locale.i18n)('SET_AS_TEMPLATE')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
186
+ }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
191
187
  "data-code": _constants.quickMenuCode.PREVIEW,
192
188
  onClick: this.onBtnClick
193
189
  }, (0, _locale.i18n)('PREVIEW')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -204,7 +200,7 @@ function (_super) {
204
200
  onClick: this.onBtnClick,
205
201
  tip: "The page is in use. Please copy or create a new page",
206
202
  type: "primary"
207
- }, (0, _locale.i18n)('PUBLISH_NOW'), window.magicDesign.templateType === 'Page' && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
203
+ }, (0, _locale.i18n)('PUBLISH_NOW'), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
208
204
  getPopupContainer: function getPopupContainer() {
209
205
  return document.querySelector('.publish_wrap');
210
206
  },
@@ -153,11 +153,7 @@ function (_super) {
153
153
 
154
154
  _this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
155
155
  } else if (type == 'link') {
156
- if (window.magicDesign.outputType === 'html') {
157
- _this.props.quillRef.format('link', value.name);
158
- } else {
159
- _this.props.quillRef.format('link', JSON.stringify(value));
160
- }
156
+ _this.props.quillRef.format('link', JSON.stringify(value));
161
157
  } else if (type == 'size') {
162
158
  _this.props.quillRef.format('size', value + 'px');
163
159
  } else if (type == 'font') {
@@ -467,9 +467,7 @@ function (_super) {
467
467
  var _a = _this.props,
468
468
  onPublish = _a.onPublish,
469
469
  onSave = _a.onSave,
470
- onPreviews = _a.onPreviews,
471
- onPush = _a.onPush,
472
- onSetAsTemp = _a.onSetAsTemp;
470
+ onPreviews = _a.onPreviews;
473
471
  var _b = _this.state,
474
472
  device = _b.device,
475
473
  MPageData = _b.MPageData;
@@ -504,14 +502,6 @@ function (_super) {
504
502
 
505
503
  break;
506
504
 
507
- case _constants.quickMenuCode.PUSH:
508
- onPush(handleParams);
509
- break;
510
-
511
- case _constants.quickMenuCode.SET_AS_TEMPLATE:
512
- onSetAsTemp(handleParams);
513
- break;
514
-
515
505
  case _constants.quickMenuCode.PUBLISH:
516
506
  onPublish(handleParams);
517
507
  break;
@@ -604,7 +594,6 @@ function (_super) {
604
594
  onHtmlBack: _this.onHtmlBack,
605
595
  onHtmlSave: _this.onHtmlSave,
606
596
  outputType: _this.props.outputType,
607
- pageState: _this.props.pageState,
608
597
  pageType: _this.props.pageType,
609
598
  redoDisable: !_this.history.redoAble(),
610
599
  undoDisable: !_this.history.undoAble()
@@ -44,8 +44,7 @@ var __assign = void 0 && (void 0).__assign || function () {
44
44
  var setDesignConfig = function setDesignConfig(props) {
45
45
  var config = props.config,
46
46
  device = props.device,
47
- isPreview = props.isPreview,
48
- projectCode = props.projectCode;
47
+ isPreview = props.isPreview;
49
48
  window.magicDesign = __assign(__assign({
50
49
  pageBackground: '#f2f2f2',
51
50
  mode: 'renderer',
@@ -53,7 +52,6 @@ var setDesignConfig = function setDesignConfig(props) {
53
52
  designMode: isPreview,
54
53
  navigatePreUrl: ''
55
54
  }, config), {
56
- projectCode: projectCode,
57
55
  compSpacing: Number(config.compSpacing),
58
56
  compWidth: Number(config.compWidth)
59
57
  });
@@ -139,9 +137,7 @@ var Renderer = function Renderer(props) {
139
137
  };
140
138
  }
141
139
 
142
- return {
143
- overflow: 'auto'
144
- };
140
+ return {};
145
141
  };
146
142
 
147
143
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -87,11 +87,7 @@ function compositeDecorator(WrappedComponent) {
87
87
  }; // 复合组件点击事件
88
88
 
89
89
  _this.onCompositeCompClick = function (event) {
90
- if (window.magicDesign.mode === 'renderer') {
91
- return;
92
- } // 触发左侧楼层的滚动
93
-
94
-
90
+ // 触发左侧楼层的滚动
95
91
  if (document.getElementById("card" + _this.props.nodeData.id)) {
96
92
  document.getElementById("card" + _this.props.nodeData.id).scrollIntoView({
97
93
  behavior: 'smooth'
@@ -119,20 +115,19 @@ function compositeDecorator(WrappedComponent) {
119
115
  device = _b.device,
120
116
  compWidth = _b.compWidth;
121
117
  var zIndex = '0';
122
- var position = 'relative';
123
118
 
124
- if (nodeData.type === 'CAROUSEL' || nodeData.type === 'IMAGE_GALLERY' || nodeData.type === 'ORDERS') {
119
+ if (nodeData.type === 'CAROUSEL' || nodeData.type === 'IMAGE_GALLERY') {
125
120
  zIndex = '1';
126
121
  } // 解决pc导航hover上去,类目被下面组件遮罩的问题
127
122
 
128
123
 
129
- if (nodeData.type === 'PC_NAVIGATION' || nodeData.type === 'PERSONAL_INFOMATION') {
124
+ if (nodeData.type === 'PC_NAVIGATION') {
130
125
  zIndex = '2';
131
126
  }
132
127
 
133
128
  var wrapStyle = {
134
129
  border: 'none',
135
- position: position,
130
+ position: 'relative',
136
131
  zIndex: zIndex,
137
132
  margin: '0 auto'
138
133
  }; // 复合组件内边距
@@ -210,7 +205,8 @@ function compositeDecorator(WrappedComponent) {
210
205
  };
211
206
 
212
207
  _this.getWrapStyle = function () {
213
- var mode = window.magicDesign.mode;
208
+ var mode = window.magicDesign.mode; // const { nodeData } = this.props;
209
+
214
210
  var style = {
215
211
  position: 'relative',
216
212
  zIndex: '1'
@@ -55,14 +55,11 @@ function shouldUpdate() {
55
55
  descriptor.value = function (nextProps, nextState) {
56
56
  var nowPropsJson = JSON.stringify(nextProps);
57
57
  var nowStateJson = JSON.stringify(nextState);
58
- var nowDevice = window.magicDesign.device;
59
58
  var should1 = nowPropsJson != this.preProps;
60
59
  var should2 = nowStateJson != this.preState;
61
- var should3 = nowDevice != this.preDevice;
62
60
  this.preProps = nowPropsJson;
63
61
  this.preState = nowStateJson;
64
- this.preDevice = nowDevice;
65
- var result = should1 || should2 || should3;
62
+ var result = should1 || should2;
66
63
  return result && fn.apply(this, {
67
64
  nextProps: nextProps
68
65
  });
@@ -93,14 +93,10 @@ function metaDecorator(WrappedComponent) {
93
93
  var _c = _this.props,
94
94
  data = _c.data,
95
95
  GAData = _c.GAData;
96
-
97
- var eventData = __assign(__assign({}, GAData), {
96
+ (0, _commonUtil.pushGA)(__assign(__assign({}, GAData), {
98
97
  elementId: data.id,
99
- elementName: data.text || (GAData === null || GAData === void 0 ? void 0 : GAData.groupName)
100
- });
101
-
102
- (0, _commonUtil.pushGA)(eventData); // triggerBuryingPointEvent(eventData);
103
-
98
+ elementName: data.text || GAData.groupName
99
+ }));
104
100
  return;
105
101
  } // 组织冒泡
106
102
 
@@ -1,22 +1,4 @@
1
1
  {
2
- "SUBMIT": "Submit",
3
- "CANCELLED": "Cancelled",
4
- "DONE": "Done",
5
- "TO_RECEIVE": "To Receive",
6
- "TO_SHIP": "To ship",
7
- "TO_PAY": "To Pay",
8
- "VIEW_ALL_ORDERS": "View All Orders",
9
- "ORDERS": "Orders",
10
- "RECENTLY_VIEWED": "Recently Viewed",
11
- "VOUCHERS": "Vouchers",
12
- "STORES": "Stores",
13
- "WISHLIST": "Wishlist",
14
- "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
15
- "ADD": "Add",
16
- "LOGIN_OR_REGISTER": "Login or Register",
17
- "ANCHOR": "Anchor",
18
- "PUSH": "Push",
19
- "SET_AS_TEMPLATE": "Set as Template",
20
2
  "DISPLAY_PAGE": "Display page",
21
3
  "NAME": "Name",
22
4
  "ADD_MENU": "Add Menu",
@@ -113,8 +95,7 @@
113
95
  "BANNER_HEIGHT": "Banner Height",
114
96
  "IMAGE": "Image",
115
97
  "PRODUCT_NAME": "Product Name",
116
- "SKU_CODE": "SKU Code",
117
- "SPU_CODE": "SPU Code",
98
+ "PRODUCT_CODE": "Product Code",
118
99
  "SKU": "SKU",
119
100
  "PRICE": "Price",
120
101
  "BRAND": "Brand",
@@ -129,6 +110,7 @@
129
110
  "MOVE_DOWN": "Move Down",
130
111
  "COPY": "Copy",
131
112
  "DELETE": "Delete",
113
+ "DONE": "Done",
132
114
  "ADD_COMPONENT": "Add Component",
133
115
  "ALL": "ALL",
134
116
  "HOT": "Hot",
@@ -1,22 +1,4 @@
1
1
  {
2
- "SUBMIT": "Submit",
3
- "CANCELLED": "Cancelled",
4
- "DONE": "Hecho",
5
- "TO_RECEIVE": "To Receive",
6
- "TO_SHIP": "To ship",
7
- "TO_PAY": "To Pay",
8
- "VIEW_ALL_ORDERS": "View All Orders",
9
- "ORDERS": "Orders",
10
- "RECENTLY_VIEWED": "Recently Viewed",
11
- "VOUCHERS": "Vouchers",
12
- "STORES": "Stores",
13
- "WISHLIST": "Wishlist",
14
- "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
15
- "ADD": "Add",
16
- "LOGIN_OR_REGISTER": "Login or Register",
17
- "ANCHOR": "Anchor",
18
- "PUSH": "Push",
19
- "SET_AS_TEMPLATE": "Set as Template",
20
2
  "DISPLAY_PAGE": "Display page",
21
3
  "NAME": "Name",
22
4
  "ADD_MENU": "Add Menu",
@@ -113,8 +95,7 @@
113
95
  "BANNER_HEIGHT": "Altura del banner",
114
96
  "IMAGE": "Imagen",
115
97
  "PRODUCT_NAME": "Nombre del producto",
116
- "SKU_CODE": "Código SKU",
117
- "SPU_CODE": "Código spu",
98
+ "PRODUCT_CODE": "Código de producto",
118
99
  "SKU": "SKU",
119
100
  "PRICE": "Precio",
120
101
  "BRAND": "Marca",
@@ -129,6 +110,7 @@
129
110
  "MOVE_DOWN": "Mover hacia abajo",
130
111
  "COPY": "Copiar",
131
112
  "DELETE": "Eliminar",
113
+ "DONE": "Hecho",
132
114
  "ADD_COMPONENT": "Agregar Componente",
133
115
  "ALL": "TODO",
134
116
  "HOT": "Caliente",
@@ -1,22 +1,4 @@
1
1
  {
2
- "SUBMIT": "Submit",
3
- "CANCELLED": "Cancelled",
4
- "DONE": "Done",
5
- "TO_RECEIVE": "To Receive",
6
- "TO_SHIP": "To ship",
7
- "TO_PAY": "To Pay",
8
- "VIEW_ALL_ORDERS": "View All Orders",
9
- "ORDERS": "Orders",
10
- "RECENTLY_VIEWED": "Recently Viewed",
11
- "VOUCHERS": "Vouchers",
12
- "STORES": "Stores",
13
- "WISHLIST": "Wishlist",
14
- "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
15
- "ADD": "Add",
16
- "LOGIN_OR_REGISTER": "Login or Register",
17
- "ANCHOR": "Anchor",
18
- "PUSH": "Push",
19
- "SET_AS_TEMPLATE": "Set as Template",
20
2
  "DISPLAY_PAGE": "Display page",
21
3
  "NAME": "Name",
22
4
  "ADD_MENU": "Add Menu",
@@ -113,8 +95,7 @@
113
95
  "BANNER_HEIGHT": "Banner Height",
114
96
  "IMAGE": "Image",
115
97
  "PRODUCT_NAME": "Product Name",
116
- "SKU_CODE": "SKU Code",
117
- "SPU_CODE": "SPU Code",
98
+ "PRODUCT_CODE": "Product Code",
118
99
  "SKU": "SKU",
119
100
  "PRICE": "Price",
120
101
  "BRAND": "Brand",
@@ -129,6 +110,7 @@
129
110
  "MOVE_DOWN": "Move Down",
130
111
  "COPY": "Copy",
131
112
  "DELETE": "Delete",
113
+ "DONE": "Done",
132
114
  "ADD_COMPONENT": "Add Component",
133
115
  "ALL": "ALL",
134
116
  "HOT": "Hot",
@@ -278,7 +278,7 @@ function (_super) {
278
278
  showBgColor: true,
279
279
  showTextAlign: true,
280
280
  value: textData
281
- })), window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
281
+ })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
282
282
  split: true,
283
283
  title: "URL"
284
284
  }, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
package/es/mobx/index.js CHANGED
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var _exportNames = {
7
7
  store: true,
8
- frameStore: true,
9
- userState: true
8
+ frameStore: true
10
9
  };
11
- exports.userState = exports.store = exports.frameStore = exports["default"] = void 0;
10
+ exports.store = exports.frameStore = exports["default"] = void 0;
12
11
 
13
12
  var _mobx = require("mobx");
14
13
 
@@ -28,8 +27,6 @@ var _Store = require("./Store");
28
27
 
29
28
  var _Frame = require("./Frame");
30
29
 
31
- var _UserState = require("./UserState");
32
-
33
30
  /* 开启严格模式 */
34
31
  (0, _mobx.configure)({
35
32
  enforceActions: 'observed'
@@ -38,11 +35,8 @@ var store = new _Store.Store();
38
35
  exports.store = store;
39
36
  var frameStore = new _Frame.Frame();
40
37
  exports.frameStore = frameStore;
41
- var userState = new _UserState.UserState();
42
- exports.userState = userState;
43
38
  var _default = {
44
39
  store: store,
45
- frameStore: frameStore,
46
- userState: userState
40
+ frameStore: frameStore
47
41
  };
48
42
  exports["default"] = _default;