@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,118 +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"] = SortableImageList;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _immutabilityHelper = _interopRequireDefault(require("immutability-helper"));
13
-
14
- var _Iconfont = _interopRequireDefault(require("../../Iconfont"));
15
-
16
- require("./index.less");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- 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); }
21
-
22
- 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; }
23
-
24
- function SortableImageList(_a) {
25
- var selectedList = _a.selectedList,
26
- setSelectedList = _a.setSelectedList;
27
-
28
- var _b = (0, _react.useState)(''),
29
- dragId = _b[0],
30
- setDragId = _b[1];
31
-
32
- var _c = (0, _react.useState)(selectedList || []),
33
- list = _c[0],
34
- setList = _c[1];
35
-
36
- var ref = (0, _react.useRef)();
37
-
38
- var onDragEnd = function onDragEnd() {
39
- console.log('onDragEnd');
40
- setDragId('');
41
-
42
- if (ref.current) {
43
- setSelectedList(ref.current);
44
- }
45
- };
46
-
47
- (0, _react.useEffect)(function () {
48
- setList(selectedList || []);
49
- }, [selectedList]);
50
-
51
- var delSelectedItem = function delSelectedItem(index) {
52
- var rows = JSON.parse(JSON.stringify(selectedList));
53
- rows.splice(index, 1);
54
- setSelectedList(rows);
55
- };
56
-
57
- var moveCard = (0, _react.useCallback)(function (dragNodeId, hoverNodeId) {
58
- var dragIndex = list.findIndex(function (comp) {
59
- return comp.productId === Number(dragNodeId);
60
- });
61
- var hoverIndex = list.findIndex(function (comp) {
62
- return comp.productId === Number(hoverNodeId);
63
- });
64
- setList(function (prevCards) {
65
- var newList = (0, _immutabilityHelper["default"])(prevCards, {
66
- $splice: [[dragIndex, 1], [hoverIndex, 0, prevCards[dragIndex]]]
67
- });
68
- ref.current = newList;
69
- return newList;
70
- });
71
- }, [list]);
72
-
73
- var onDragEnter = function onDragEnter(e) {
74
- console.log('onDragEnter');
75
- var hoverNodeId = e.currentTarget.dataset.nodeid;
76
-
77
- if (dragId === hoverNodeId) {
78
- return;
79
- }
80
-
81
- moveCard(dragId, hoverNodeId);
82
- };
83
-
84
- var onDragStart = function onDragStart(e) {
85
- setDragId(e.currentTarget.dataset.nodeid);
86
- console.log('onDragStart');
87
- };
88
-
89
- return /*#__PURE__*/_react["default"].createElement("div", {
90
- className: "imgListWrap"
91
- }, list.map(function (item, index) {
92
- return /*#__PURE__*/_react["default"].createElement("div", {
93
- key: index,
94
- className: "selectedItem"
95
- }, /*#__PURE__*/_react["default"].createElement("img", {
96
- alt: "",
97
- className: "selectedItemImg " + (item.state !== 'A' ? 'invalid' : ''),
98
- "data-nodeid": item.productId,
99
- draggable: "true",
100
- onDragEnd: onDragEnd,
101
- onDragEnter: onDragEnter,
102
- onDragOver: function onDragOver(e) {
103
- e.preventDefault();
104
- },
105
- onDragStart: onDragStart,
106
- src: item.productImageUrl,
107
- title: item.productName
108
- }), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
109
- className: "selectedItemClose",
110
- color: "#000",
111
- onClick: function onClick() {
112
- return delSelectedItem(index);
113
- },
114
- size: 12,
115
- type: "icon-close"
116
- }));
117
- }));
118
- }
@@ -1,3 +0,0 @@
1
- .imgListWrap {
2
- display: flex;
3
- }
@@ -1,170 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _antd = require("antd");
11
-
12
- var _locale = require("../../../locale");
13
-
14
- var _mobx = require("../../../mobx");
15
-
16
- var _constants = require("../../../constants");
17
-
18
- require("./index.less");
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- var __extends = void 0 && (void 0).__extends || function () {
23
- var _extendStatics = function extendStatics(d, b) {
24
- _extendStatics = Object.setPrototypeOf || {
25
- __proto__: []
26
- } instanceof Array && function (d, b) {
27
- d.__proto__ = b;
28
- } || function (d, b) {
29
- for (var p in b) {
30
- if (b.hasOwnProperty(p)) d[p] = b[p];
31
- }
32
- };
33
-
34
- return _extendStatics(d, b);
35
- };
36
-
37
- return function (d, b) {
38
- _extendStatics(d, b);
39
-
40
- function __() {
41
- this.constructor = d;
42
- }
43
-
44
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
- };
46
- }();
47
-
48
- var __assign = void 0 && (void 0).__assign || function () {
49
- __assign = Object.assign || function (t) {
50
- for (var s, i = 1, n = arguments.length; i < n; i++) {
51
- s = arguments[i];
52
-
53
- for (var p in s) {
54
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
- }
56
- }
57
-
58
- return t;
59
- };
60
-
61
- return __assign.apply(this, arguments);
62
- };
63
-
64
- var AnchorModal =
65
- /** @class */
66
- function (_super) {
67
- __extends(AnchorModal, _super);
68
-
69
- function AnchorModal() {
70
- var _this = _super !== null && _super.apply(this, arguments) || this;
71
-
72
- _this.state = {
73
- selectedValue: ''
74
- };
75
-
76
- _this.onAnchorChange = function (e) {
77
- var selectedAnchor = _mobx.store.MPageData.find(function (m) {
78
- return m.id === e.target.value;
79
- });
80
-
81
- console.log('store.MPageData: ', JSON.parse(JSON.stringify(_mobx.store.MPageData)));
82
-
83
- _this.setState({
84
- selectedValue: selectedAnchor.id
85
- });
86
- };
87
-
88
- _this.onOk = function () {
89
- var initData = _this.props.initData;
90
- var selectedValue = _this.state.selectedValue;
91
-
92
- var selectedAnchorIndex = _mobx.store.MPageData.findIndex(function (m) {
93
- return m.id === selectedValue;
94
- });
95
-
96
- var selectedAnchor = _mobx.store.MPageData[selectedAnchorIndex];
97
-
98
- var value = __assign({}, initData.value);
99
-
100
- if (selectedAnchor.activeTerminal === 'ALL') {
101
- value.pcNodeId = selectedAnchor.id;
102
- value.mobileNodeId = selectedAnchor.id;
103
- } else if (selectedAnchor.activeTerminal === 'MOBILE') {
104
- value.mobileNodeId = selectedAnchor.id;
105
- } else if (selectedAnchor.activeTerminal === 'PC') {
106
- value.pcNodeId = selectedAnchor.id;
107
- }
108
-
109
- var data = {
110
- type: _constants.urlTypeMap.ANCHOR,
111
- value: value
112
- };
113
-
114
- _this.props.onConfirm(data);
115
- };
116
-
117
- return _this;
118
- }
119
-
120
- AnchorModal.prototype.render = function () {
121
- var _a = this.props,
122
- visible = _a.visible,
123
- onClose = _a.onClose;
124
- var selectedValue = this.state.selectedValue;
125
- return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
126
- cancelText: (0, _locale.i18n)('CANCEL'),
127
- draggable: false,
128
- footer: null,
129
- okText: "OK",
130
- onCancel: onClose,
131
- title: (0, _locale.i18n)('ANCHOR'),
132
- visible: visible,
133
- width: "400px",
134
- wrapClassName: "magicAnchorModal"
135
- }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
136
- onChange: this.onAnchorChange,
137
- value: selectedValue
138
- }, /*#__PURE__*/_react["default"].createElement(_antd.Space, {
139
- direction: "vertical"
140
- }, _mobx.store.MPageData.map(function (page, i) {
141
- var _a;
142
-
143
- return /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
144
- value: page.id
145
- }, i + 1, "\u3001", (_a = _constants.compInfoMap[page.type]) === null || _a === void 0 ? void 0 : _a.name);
146
- })))), /*#__PURE__*/_react["default"].createElement("div", {
147
- className: "footer"
148
- }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
149
- className: "btn-cancel",
150
- onClick: function onClick() {
151
- return onClose && onClose();
152
- }
153
- }, (0, _locale.i18n)('CANCEL')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
154
- className: "btn-confirm",
155
- onClick: this.onOk,
156
- type: "primary"
157
- }, (0, _locale.i18n)('OK'))));
158
- };
159
-
160
- AnchorModal.defaultProps = {
161
- visible: false,
162
- onClose: function onClose() {},
163
- onConfirm: function onConfirm() {},
164
- initData: null
165
- };
166
- return AnchorModal;
167
- }(_react["default"].Component);
168
-
169
- var _default = AnchorModal;
170
- exports["default"] = _default;
@@ -1,21 +0,0 @@
1
- .magicAnchorModal {
2
-
3
-
4
- .footer {
5
- display: flex;
6
- align-items: center;
7
- justify-content: flex-end;
8
- padding-top: 20px;
9
-
10
- .btn-cancel {
11
- margin-right: 12px;
12
- }
13
-
14
- .btn-confirm {
15
- background: #2F54EB;
16
- border: none;
17
- border-radius: 6px;
18
- // margin-left: 20px;
19
- }
20
- }
21
- }
@@ -1,169 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- require("./index.less");
9
-
10
- function parseDom(html) {
11
- var ele = document.createElement('div');
12
- ele.innerHTML = html;
13
- return ele.childNodes[0];
14
- }
15
-
16
- function cookieSet(cname, cvalue, exdays) {
17
- var d = new Date();
18
- d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
19
- var expires = 'expires=' + d.toGMTString();
20
- document.cookie = cname + '=' + escape(cvalue) + '; ' + expires;
21
- }
22
-
23
- var qualityHtml = "<div class=\"quality-components\">\n <div class=\"current-quality\" data-ref=\"\"></div>\n <ul class=\"quality-list\">\n </ul>\n</div>";
24
- var qualityModal = "<div class=\"quality-modal\">\n <span class=\"switchimg\"></span> <span class=\"current-quality-tag\"></span> , <span class=\"wait\"></span>\n</div>";
25
- /**
26
- * 切换清晰度组件
27
- */
28
-
29
- var QualityComponent =
30
- /** @class */
31
- function () {
32
- function QualityComponent(getQuality) {
33
- this.html = parseDom(qualityHtml);
34
- this.modalHtml = parseDom(qualityModal);
35
- this.hasCreated = false;
36
- this.definition = '';
37
- this.getQuality = getQuality;
38
- }
39
-
40
- QualityComponent.prototype.createEl = function (el, player) {
41
- var lang = player._options && player._options.language;
42
- this.isEn = lang && lang === 'en-us';
43
- this.html.querySelector('.current-quality').innerText = this.isEn ? 'Resolution' : '清晰度';
44
- this.modalHtml.querySelector('.switchimg').innerText = this.isEn ? 'Switching to you for' : '正在为您切换到';
45
- this.modalHtml.querySelector('.wait').innerText = this.isEn ? 'Please wait...' : '请稍后...';
46
- var eleControlbar = el.querySelector('.prism-controlbar');
47
- eleControlbar.appendChild(this.html);
48
- el.appendChild(this.modalHtml);
49
- };
50
-
51
- QualityComponent.prototype.setCurrentQuality = function (quality, def) {
52
- var currentQuality = this.html.querySelector('.current-quality');
53
- currentQuality.innerText = quality;
54
- currentQuality.dataset.def = def;
55
- this.definition = def;
56
- var qualityListEle = this.html.querySelector('.quality-list');
57
- var currentEle = qualityListEle.querySelector('.current');
58
-
59
- if (currentEle) {
60
- currentEle.className = '';
61
- }
62
-
63
- var liTarget = qualityListEle.querySelector("li[data-def=\"" + def + "\"]");
64
-
65
- if (liTarget) {
66
- liTarget.className = 'current';
67
- }
68
- };
69
-
70
- QualityComponent.prototype.created = function (player) {
71
- var _this = this;
72
-
73
- this._urls = player._urls;
74
- var currentQualityEle = this.html.querySelector('.current-quality');
75
- var qualityListEle = this.html.querySelector('.quality-list');
76
-
77
- var lisEle = this._urls.map(function (url) {
78
- return "<li data-def=\"" + url.definition + "\">" + url.desc + "</li>";
79
- });
80
-
81
- this.html.querySelector('.quality-list').innerHTML = lisEle.join('');
82
- console.log(this.definition);
83
-
84
- if (this.hasCreated == false && this.definition) {
85
- var liTarget = qualityListEle.querySelector("li[data-def=\"" + this.definition + "\"]");
86
- liTarget.className = 'current';
87
- }
88
-
89
- this.hasCreated = true;
90
- var timeId = null;
91
-
92
- currentQualityEle.onclick = function () {
93
- var listVisible = qualityListEle.style.display !== 'none';
94
-
95
- if (listVisible) {
96
- qualityListEle.style.display = 'none';
97
- } else {
98
- qualityListEle.style.display = 'block';
99
- }
100
- };
101
-
102
- currentQualityEle.onmouseleave = function () {
103
- if (timeId) clearTimeout(timeId);
104
- timeId = setTimeout(function () {
105
- qualityListEle.style.display = 'none';
106
- }, 150);
107
- };
108
-
109
- qualityListEle.onmouseenter = function () {
110
- clearTimeout(timeId);
111
- };
112
-
113
- qualityListEle.onmouseleave = function () {
114
- if (timeId) clearTimeout(timeId);
115
- timeId = setTimeout(function () {
116
- qualityListEle.style.display = 'none';
117
- }, 150);
118
- };
119
-
120
- qualityListEle.onclick = function (_a) {
121
- var target = _a.target;
122
- var definition = target.dataset.def;
123
- var desc = target.innerText;
124
-
125
- if (definition && target.className !== 'current') {
126
- var url = _this._urls.find(function (url) {
127
- return url.definition === definition;
128
- });
129
-
130
- if (url) {
131
- cookieSet('selectedStreamLevel', url.definition, 365);
132
-
133
- if (player._switchLevel && !player._options.isLive) {
134
- player._switchLevel(url.Url);
135
- } else {
136
- player._loadByUrlInner(url.Url, player.getCurrentTime(), true
137
- /* autoPlay */
138
- , true
139
- /* isSwitchLevel */
140
- );
141
- }
142
-
143
- _this.setCurrentQuality(url.desc, url.definition);
144
-
145
- _this.modalHtml.style.display = 'block';
146
- _this.modalHtml.querySelector('span.current-quality-tag').innerText = url.desc;
147
- }
148
- } // 点击切换清晰度时,调用这个方法
149
-
150
-
151
- _this.getQuality(definition, desc);
152
- };
153
- };
154
-
155
- QualityComponent.prototype.ready = function (player) {
156
- this.modalHtml.style.display = 'none'; // 隐藏设置里面的倍速播放
157
-
158
- var settingEle = document.querySelector('.prism-setting-item.prism-setting-quality');
159
-
160
- if (settingEle) {
161
- settingEle.classList.add('player-hidden');
162
- }
163
- };
164
-
165
- return QualityComponent;
166
- }();
167
-
168
- var _default = QualityComponent;
169
- exports["default"] = _default;
@@ -1,78 +0,0 @@
1
- .player-hidden {
2
- display: none !important;
3
- }
4
-
5
- .quality-components {
6
- float: right;
7
- color: #fff;
8
- height: 35px;
9
- position: relative;
10
- box-sizing: border-box;
11
- margin-top: 4px;
12
- }
13
-
14
- .current-quality {
15
- display: flex;
16
- height: 100%;
17
- align-items: center;
18
- justify-content: center;
19
- // width: 70px;
20
- cursor: pointer;
21
- }
22
-
23
- .quality-list {
24
- position: absolute;
25
- bottom: 46px;
26
- display: none;
27
- padding: 0;
28
- margin: 0;
29
- list-style: none;
30
-
31
- li {
32
- text-align: center;
33
- // width: 70px;
34
- line-height: 30px;
35
- background-color: rgba(0, 0, 0, .6);
36
- cursor: pointer;
37
-
38
- &.current {
39
- color: #00c1de;
40
- }
41
-
42
- &+li {
43
- border-top: 1px solid rgba(78, 78, 78, 0.3);
44
- }
45
-
46
- &:hover {
47
- background-color: rgba(0, 0, 0, .5);
48
- }
49
-
50
- ;
51
- }
52
- }
53
-
54
- .quality-modal {
55
- position: absolute;
56
- bottom: 20%;
57
- left: 5%;
58
- background-color: rgba(0, 0, 0, .6);
59
- border-radius: 5px;
60
- color: #fff;
61
- padding: 10px 15px;
62
- font-size: 14px;
63
- display: none;
64
-
65
- span.current-quality-tag {
66
- color: #00c1de;
67
- }
68
- }
69
-
70
- @media(max-width: 768px) {
71
- .current-quality {
72
- width: 40px;
73
- }
74
-
75
- .quality-list li {
76
- width: 45px;
77
- }
78
- }