@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
@@ -1,326 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = AffiliatePlatform;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _antd = require("antd");
13
-
14
- var _commonUtil = require("../../../utils/commonUtil");
15
-
16
- var _locale = require("../../../locale");
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- var __assign = void 0 && (void 0).__assign || function () {
23
- __assign = Object.assign || function (t) {
24
- for (var s, i = 1, n = arguments.length; i < n; i++) {
25
- s = arguments[i];
26
-
27
- for (var p in s) {
28
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
29
- }
30
- }
31
-
32
- return t;
33
- };
34
-
35
- return __assign.apply(this, arguments);
36
- };
37
-
38
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
39
- function adopt(value) {
40
- return value instanceof P ? value : new P(function (resolve) {
41
- resolve(value);
42
- });
43
- }
44
-
45
- return new (P || (P = Promise))(function (resolve, reject) {
46
- function fulfilled(value) {
47
- try {
48
- step(generator.next(value));
49
- } catch (e) {
50
- reject(e);
51
- }
52
- }
53
-
54
- function rejected(value) {
55
- try {
56
- step(generator["throw"](value));
57
- } catch (e) {
58
- reject(e);
59
- }
60
- }
61
-
62
- function step(result) {
63
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
64
- }
65
-
66
- step((generator = generator.apply(thisArg, _arguments || [])).next());
67
- });
68
- };
69
-
70
- var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
71
- var _ = {
72
- label: 0,
73
- sent: function sent() {
74
- if (t[0] & 1) throw t[1];
75
- return t[1];
76
- },
77
- trys: [],
78
- ops: []
79
- },
80
- f,
81
- y,
82
- t,
83
- g;
84
- return g = {
85
- next: verb(0),
86
- "throw": verb(1),
87
- "return": verb(2)
88
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
89
- return this;
90
- }), g;
91
-
92
- function verb(n) {
93
- return function (v) {
94
- return step([n, v]);
95
- };
96
- }
97
-
98
- function step(op) {
99
- if (f) throw new TypeError("Generator is already executing.");
100
-
101
- while (_) {
102
- try {
103
- 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;
104
- if (y = 0, t) op = [op[0] & 2, t.value];
105
-
106
- switch (op[0]) {
107
- case 0:
108
- case 1:
109
- t = op;
110
- break;
111
-
112
- case 4:
113
- _.label++;
114
- return {
115
- value: op[1],
116
- done: false
117
- };
118
-
119
- case 5:
120
- _.label++;
121
- y = op[1];
122
- op = [0];
123
- continue;
124
-
125
- case 7:
126
- op = _.ops.pop();
127
-
128
- _.trys.pop();
129
-
130
- continue;
131
-
132
- default:
133
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
134
- _ = 0;
135
- continue;
136
- }
137
-
138
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
139
- _.label = op[1];
140
- break;
141
- }
142
-
143
- if (op[0] === 6 && _.label < t[1]) {
144
- _.label = t[1];
145
- t = op;
146
- break;
147
- }
148
-
149
- if (t && _.label < t[2]) {
150
- _.label = t[2];
151
-
152
- _.ops.push(op);
153
-
154
- break;
155
- }
156
-
157
- if (t[2]) _.ops.pop();
158
-
159
- _.trys.pop();
160
-
161
- continue;
162
- }
163
-
164
- op = body.call(thisArg, _);
165
- } catch (e) {
166
- op = [6, e];
167
- y = 0;
168
- } finally {
169
- f = t = 0;
170
- }
171
- }
172
-
173
- if (op[0] & 5) throw op[1];
174
- return {
175
- value: op[0] ? op[1] : void 0,
176
- done: true
177
- };
178
- }
179
- };
180
-
181
- var paginationParams = {
182
- pageSize: 20,
183
- pageIndex: 1
184
- };
185
-
186
- function AffiliatePlatform(props) {
187
- var _this = this;
188
-
189
- var _onChange = props.onChange;
190
-
191
- var _a = (0, _react.useState)([]),
192
- platformList = _a[0],
193
- setPlatformList = _a[1];
194
-
195
- var _b = (0, _react.useState)(false),
196
- loading = _b[0],
197
- setLoading = _b[1];
198
-
199
- var _c = (0, _react.useState)(''),
200
- platformName = _c[0],
201
- setPlatformName = _c[1];
202
-
203
- var queryPlatform = function queryPlatform(params) {
204
- return __awaiter(_this, void 0, void 0, function () {
205
- var res;
206
- return __generator(this, function (_a) {
207
- switch (_a.label) {
208
- case 0:
209
- setLoading(true);
210
- return [4
211
- /*yield*/
212
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/distribution/platform/page", params, 'GET')];
213
-
214
- case 1:
215
- res = _a.sent();
216
- paginationParams.total = res.total;
217
- setPlatformList(res.list);
218
- setLoading(false);
219
- return [2
220
- /*return*/
221
- ];
222
- }
223
- });
224
- });
225
- };
226
-
227
- (0, _react.useEffect)(function () {
228
- queryPlatform(paginationParams);
229
- }, []);
230
- var columns = [{
231
- title: 'Platform Name',
232
- dataIndex: 'platformName'
233
- }, {
234
- title: 'Logo',
235
- dataIndex: 'logo',
236
- render: function render(val) {
237
- return /*#__PURE__*/_react["default"].createElement("img", {
238
- alt: "",
239
- src: val,
240
- style: {
241
- maxWidth: '50px',
242
- maxHeight: '50px'
243
- }
244
- });
245
- }
246
- }];
247
- var rowSelection = {
248
- onChange: function onChange(selectedRowKeys, selectedRow) {
249
- _onChange({
250
- value: selectedRow[0].distributionPlatformId,
251
- name: selectedRow[0].platformName
252
- });
253
- },
254
- type: 'radio'
255
- };
256
-
257
- var reset = function reset() {
258
- setPlatformName('');
259
- queryPlatform(__assign({
260
- platformName: ''
261
- }, paginationParams));
262
- };
263
-
264
- return /*#__PURE__*/_react["default"].createElement("div", {
265
- style: {
266
- height: 550
267
- }
268
- }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
269
- labelCol: {
270
- span: 6
271
- },
272
- layout: "horizontal"
273
- }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
274
- gutter: 24
275
- }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
276
- span: 16
277
- }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
278
- label: "Platform Name"
279
- }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
280
- onChange: function onChange(e) {
281
- return setPlatformName(e.target.value);
282
- },
283
- size: "small",
284
- value: platformName
285
- }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
286
- span: 6
287
- }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
288
- onClick: function onClick() {
289
- setLoading(true);
290
- paginationParams.pageIndex = 1;
291
- queryPlatform(__assign({
292
- platformName: platformName
293
- }, paginationParams));
294
- },
295
- size: "small",
296
- style: {
297
- marginRight: 10
298
- },
299
- type: "primary"
300
- }, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
301
- onClick: function onClick() {
302
- reset();
303
- },
304
- size: "small"
305
- }, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
306
- bordered: false,
307
- columns: columns,
308
- dataSource: platformList,
309
- defaultExpandAllRows: true,
310
- loading: loading,
311
- pagination: __assign(__assign({}, paginationParams), {
312
- onChange: function onChange(page) {
313
- paginationParams.pageIndex = page;
314
- queryPlatform(__assign(__assign({}, paginationParams), {
315
- platformName: platformName
316
- }));
317
- },
318
- showSizeChanger: false
319
- }),
320
- rowKey: "distributionPlatformId",
321
- rowSelection: rowSelection,
322
- scroll: {
323
- y: 400
324
- }
325
- }));
326
- }
@@ -1,332 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = AffiliateStore;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _antd = require("antd");
13
-
14
- var _commonUtil = require("../../../utils/commonUtil");
15
-
16
- var _locale = require("../../../locale");
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- var __assign = void 0 && (void 0).__assign || function () {
23
- __assign = Object.assign || function (t) {
24
- for (var s, i = 1, n = arguments.length; i < n; i++) {
25
- s = arguments[i];
26
-
27
- for (var p in s) {
28
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
29
- }
30
- }
31
-
32
- return t;
33
- };
34
-
35
- return __assign.apply(this, arguments);
36
- };
37
-
38
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
39
- function adopt(value) {
40
- return value instanceof P ? value : new P(function (resolve) {
41
- resolve(value);
42
- });
43
- }
44
-
45
- return new (P || (P = Promise))(function (resolve, reject) {
46
- function fulfilled(value) {
47
- try {
48
- step(generator.next(value));
49
- } catch (e) {
50
- reject(e);
51
- }
52
- }
53
-
54
- function rejected(value) {
55
- try {
56
- step(generator["throw"](value));
57
- } catch (e) {
58
- reject(e);
59
- }
60
- }
61
-
62
- function step(result) {
63
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
64
- }
65
-
66
- step((generator = generator.apply(thisArg, _arguments || [])).next());
67
- });
68
- };
69
-
70
- var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
71
- var _ = {
72
- label: 0,
73
- sent: function sent() {
74
- if (t[0] & 1) throw t[1];
75
- return t[1];
76
- },
77
- trys: [],
78
- ops: []
79
- },
80
- f,
81
- y,
82
- t,
83
- g;
84
- return g = {
85
- next: verb(0),
86
- "throw": verb(1),
87
- "return": verb(2)
88
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
89
- return this;
90
- }), g;
91
-
92
- function verb(n) {
93
- return function (v) {
94
- return step([n, v]);
95
- };
96
- }
97
-
98
- function step(op) {
99
- if (f) throw new TypeError("Generator is already executing.");
100
-
101
- while (_) {
102
- try {
103
- 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;
104
- if (y = 0, t) op = [op[0] & 2, t.value];
105
-
106
- switch (op[0]) {
107
- case 0:
108
- case 1:
109
- t = op;
110
- break;
111
-
112
- case 4:
113
- _.label++;
114
- return {
115
- value: op[1],
116
- done: false
117
- };
118
-
119
- case 5:
120
- _.label++;
121
- y = op[1];
122
- op = [0];
123
- continue;
124
-
125
- case 7:
126
- op = _.ops.pop();
127
-
128
- _.trys.pop();
129
-
130
- continue;
131
-
132
- default:
133
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
134
- _ = 0;
135
- continue;
136
- }
137
-
138
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
139
- _.label = op[1];
140
- break;
141
- }
142
-
143
- if (op[0] === 6 && _.label < t[1]) {
144
- _.label = t[1];
145
- t = op;
146
- break;
147
- }
148
-
149
- if (t && _.label < t[2]) {
150
- _.label = t[2];
151
-
152
- _.ops.push(op);
153
-
154
- break;
155
- }
156
-
157
- if (t[2]) _.ops.pop();
158
-
159
- _.trys.pop();
160
-
161
- continue;
162
- }
163
-
164
- op = body.call(thisArg, _);
165
- } catch (e) {
166
- op = [6, e];
167
- y = 0;
168
- } finally {
169
- f = t = 0;
170
- }
171
- }
172
-
173
- if (op[0] & 5) throw op[1];
174
- return {
175
- value: op[0] ? op[1] : void 0,
176
- done: true
177
- };
178
- }
179
- };
180
-
181
- var paginationParams = {
182
- pageSize: 20,
183
- pageIndex: 1
184
- };
185
-
186
- function AffiliateStore(props) {
187
- var _this = this;
188
-
189
- var _onChange = props.onChange;
190
-
191
- var _a = (0, _react.useState)([]),
192
- storeList = _a[0],
193
- setStoreList = _a[1];
194
-
195
- var _b = (0, _react.useState)(false),
196
- loading = _b[0],
197
- setLoading = _b[1];
198
-
199
- var _c = (0, _react.useState)(''),
200
- storeName = _c[0],
201
- setStoreName = _c[1];
202
-
203
- var queryStore = function queryStore(params) {
204
- return __awaiter(_this, void 0, void 0, function () {
205
- var res;
206
- return __generator(this, function (_a) {
207
- switch (_a.label) {
208
- case 0:
209
- setLoading(true);
210
- return [4
211
- /*yield*/
212
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/affiliate/store/query/page", params, 'GET')];
213
-
214
- case 1:
215
- res = _a.sent();
216
- paginationParams.total = res.total;
217
- setStoreList(res.list);
218
- setLoading(false);
219
- return [2
220
- /*return*/
221
- ];
222
- }
223
- });
224
- });
225
- };
226
-
227
- (0, _react.useEffect)(function () {
228
- queryStore(paginationParams);
229
- }, []);
230
- var columns = [{
231
- title: 'Store ID',
232
- dataIndex: 'shopId'
233
- }, {
234
- title: 'Store Name',
235
- dataIndex: 'storeName'
236
- }, {
237
- title: 'Logo',
238
- dataIndex: 'logo',
239
- render: function render(val) {
240
- return /*#__PURE__*/_react["default"].createElement("img", {
241
- alt: "",
242
- src: val,
243
- style: {
244
- maxWidth: '50px',
245
- maxHeight: '50px'
246
- }
247
- });
248
- }
249
- }, {
250
- title: 'Channel',
251
- dataIndex: 'bindChannel'
252
- }];
253
- var rowSelection = {
254
- onChange: function onChange(selectedRowKeys, selectedRow) {
255
- _onChange({
256
- value: selectedRow[0].affiliateStoreId,
257
- name: selectedRow[0].storeName
258
- });
259
- },
260
- type: 'radio'
261
- };
262
-
263
- var reset = function reset() {
264
- setStoreName('');
265
- queryStore(__assign({
266
- storeName: ''
267
- }, paginationParams));
268
- };
269
-
270
- return /*#__PURE__*/_react["default"].createElement("div", {
271
- style: {
272
- height: 550
273
- }
274
- }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
275
- labelCol: {
276
- span: 6
277
- },
278
- layout: "horizontal"
279
- }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
280
- gutter: 24
281
- }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
282
- span: 12
283
- }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
284
- label: "Store Name"
285
- }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
286
- onChange: function onChange(e) {
287
- return setStoreName(e.target.value);
288
- },
289
- size: "small",
290
- value: storeName
291
- }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
292
- span: 6
293
- }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
294
- onClick: function onClick() {
295
- setLoading(true);
296
- paginationParams.pageIndex = 1;
297
- queryStore(__assign({
298
- storeName: storeName
299
- }, paginationParams));
300
- },
301
- size: "small",
302
- style: {
303
- marginRight: 10
304
- },
305
- type: "primary"
306
- }, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
307
- onClick: function onClick() {
308
- reset();
309
- },
310
- size: "small"
311
- }, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
312
- bordered: false,
313
- columns: columns,
314
- dataSource: storeList,
315
- defaultExpandAllRows: true,
316
- loading: loading,
317
- pagination: __assign(__assign({}, paginationParams), {
318
- onChange: function onChange(page) {
319
- paginationParams.pageIndex = page;
320
- queryStore(__assign(__assign({}, paginationParams), {
321
- storeName: storeName
322
- }));
323
- },
324
- showSizeChanger: false
325
- }),
326
- rowKey: "affiliateStoreId",
327
- rowSelection: rowSelection,
328
- scroll: {
329
- y: 400
330
- }
331
- }));
332
- }