@fonixtree/magic-design 2.0.110 → 2.0.113

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 (191) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +14 -6
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  7. package/es/assets/images/base64/index.js +3 -1
  8. package/es/common/AffiliateProductModal/index.js +1 -1
  9. package/es/common/Button/index.js +1 -1
  10. package/es/common/Collapse/index.js +1 -1
  11. package/es/common/ImageModal/CommonModal/index.js +1 -1
  12. package/es/common/ImageModal/CommonSelPicCard/index.js +1 -1
  13. package/es/common/ImageModal/utils.js +1 -1
  14. package/es/common/ImagePicker/index.js +1 -1
  15. package/es/common/InputNumber/index.js +1 -1
  16. package/es/common/LinkModal/AffiliatePlatform/index.js +325 -0
  17. package/es/common/LinkModal/StoreCatgTable/index.js +3 -4
  18. package/es/common/LinkModal/index.js +8 -0
  19. package/es/common/ProductModal/index.js +1 -1
  20. package/es/common/Slider/index.js +1 -1
  21. package/es/common/SwitchCollapse/index.js +1 -1
  22. package/es/common/SystemNotification/Confirm/index.js +1 -1
  23. package/es/common/UrlPicker/AnchorModal/index.js +1 -1
  24. package/es/composite-comp/bol/components/Banner/mobile/index.js +1 -1
  25. package/es/composite-comp/bol/components/Banner/pc/index.js +1 -1
  26. package/es/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +1 -1
  27. package/es/composite-comp/bol/config-panels/VideoConfig/VideoShareConfig/index.js +1 -1
  28. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -1
  29. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
  30. package/es/composite-comp/common/components/ProductItem/index.js +1 -1
  31. package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +1 -1
  32. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +1 -1
  33. package/es/composite-comp/common/config-panels/InputField/index.js +1 -1
  34. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -1
  35. package/es/composite-comp/dito/components/Bargain/defaultJSON.js +244 -0
  36. package/es/composite-comp/dito/components/Bargain/index.js +86 -0
  37. package/es/composite-comp/dito/components/Bargain/mobile/imgs/defImg.png +0 -0
  38. package/es/composite-comp/dito/components/Bargain/mobile/imgs/defImg1.png +0 -0
  39. package/es/composite-comp/dito/components/Bargain/mobile/imgs/defImg2.png +0 -0
  40. package/es/composite-comp/dito/components/Bargain/mobile/imgs/defImg3.png +0 -0
  41. package/es/composite-comp/dito/components/Bargain/mobile/index.js +370 -0
  42. package/es/composite-comp/dito/components/Bargain/mobile/index.less +85 -0
  43. package/es/composite-comp/dito/components/GroupBuy/mobile/index.less +3 -3
  44. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +1 -1
  45. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
  46. package/es/composite-comp/dito/components/SearchBar/pc/index.js +1 -1
  47. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  48. package/es/composite-comp/dito/components/SignBoard/pc/index.js +1 -1
  49. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +157 -0
  50. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.less +20 -0
  51. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigTitle/index.js +126 -0
  52. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigTitle/index.less +0 -0
  53. package/es/composite-comp/dito/config-panels/BargainConfig/imgs/layout1.png +0 -0
  54. package/es/composite-comp/dito/config-panels/BargainConfig/index.js +73 -0
  55. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +1 -1
  56. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +1 -1
  57. package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +1 -1
  58. package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +1 -1
  59. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  60. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  61. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +1 -1
  62. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +1 -1
  63. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  64. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +1 -1
  65. package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +3 -3
  66. package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +1 -1
  67. package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +1 -1
  68. package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +1 -1
  69. package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +1 -1
  70. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +1 -1
  71. package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +1 -1
  72. package/es/composite-comp/nuri/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +1 -1
  73. package/es/constants/component-types.js +6 -2
  74. package/es/constants/index.js +6 -1
  75. package/es/core/Designer/AiImageGenerator/GenerateSize/index.js +1 -1
  76. package/es/core/Designer/AiImageGenerator/NumberSlider/index.js +1 -1
  77. package/es/core/Designer/AiImageGenerator/UploadReference/index.js +1 -1
  78. package/es/core/Designer/AiImageGenerator/index.js +1 -1
  79. package/es/core/Designer/AppointmentModal/index.js +1 -1
  80. package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +1 -1
  81. package/es/core/Designer/ChatRobot/index.js +1 -1
  82. package/es/core/Designer/PageCompList/index.js +1 -1
  83. package/es/core/Designer/QuickMenuBar/index.js +1 -1
  84. package/es/core/Designer/ToolBarModal/index.js +1 -1
  85. package/es/core/Designer/index.js +2 -2
  86. package/es/meta-comp/config-panels/ButtonConfig/index.js +1 -1
  87. package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +1 -1
  88. package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +1 -1
  89. package/es/meta-comp/config-panels/ImageConfig/index.js +1 -1
  90. package/es/meta-comp/config-panels/PlayIconConfig/index.js +1 -1
  91. package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.js +1 -1
  92. package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +1 -1
  93. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  94. package/es/utils/businessUtil.js +18 -3
  95. package/es/utils/coreUtil.js +24 -24
  96. package/lib/assets/fonts/.DS_Store +0 -0
  97. package/lib/assets/fonts/magic-box-iconfont.css +14 -6
  98. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  99. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  100. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  101. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  102. package/lib/assets/images/base64/index.js +3 -1
  103. package/lib/common/AffiliateProductModal/index.js +1 -1
  104. package/lib/common/Button/index.js +1 -1
  105. package/lib/common/Collapse/index.js +1 -1
  106. package/lib/common/ImageModal/CommonModal/index.js +1 -1
  107. package/lib/common/ImageModal/CommonSelPicCard/index.js +1 -1
  108. package/lib/common/ImageModal/utils.js +1 -1
  109. package/lib/common/ImagePicker/index.js +1 -1
  110. package/lib/common/InputNumber/index.js +1 -1
  111. package/lib/common/LinkModal/AffiliatePlatform/index.js +325 -0
  112. package/lib/common/LinkModal/StoreCatgTable/index.js +3 -4
  113. package/lib/common/LinkModal/index.js +8 -0
  114. package/lib/common/ProductModal/index.js +1 -1
  115. package/lib/common/Slider/index.js +1 -1
  116. package/lib/common/SwitchCollapse/index.js +1 -1
  117. package/lib/common/SystemNotification/Confirm/index.js +1 -1
  118. package/lib/common/UrlPicker/AnchorModal/index.js +1 -1
  119. package/lib/composite-comp/bol/components/Banner/mobile/index.js +1 -1
  120. package/lib/composite-comp/bol/components/Banner/pc/index.js +1 -1
  121. package/lib/composite-comp/bol/config-panels/DividerConfig/DividerContentSetting/index.js +1 -1
  122. package/lib/composite-comp/bol/config-panels/VideoConfig/VideoShareConfig/index.js +1 -1
  123. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -1
  124. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
  125. package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
  126. package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +1 -1
  127. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +1 -1
  128. package/lib/composite-comp/common/config-panels/InputField/index.js +1 -1
  129. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -1
  130. package/lib/composite-comp/dito/components/Bargain/defaultJSON.js +244 -0
  131. package/lib/composite-comp/dito/components/Bargain/index.js +86 -0
  132. package/lib/composite-comp/dito/components/Bargain/mobile/imgs/defImg.png +0 -0
  133. package/lib/composite-comp/dito/components/Bargain/mobile/imgs/defImg1.png +0 -0
  134. package/lib/composite-comp/dito/components/Bargain/mobile/imgs/defImg2.png +0 -0
  135. package/lib/composite-comp/dito/components/Bargain/mobile/imgs/defImg3.png +0 -0
  136. package/lib/composite-comp/dito/components/Bargain/mobile/index.js +370 -0
  137. package/lib/composite-comp/dito/components/Bargain/mobile/index.less +85 -0
  138. package/lib/composite-comp/dito/components/GroupBuy/mobile/index.less +3 -3
  139. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +1 -1
  140. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
  141. package/lib/composite-comp/dito/components/SearchBar/pc/index.js +1 -1
  142. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  143. package/lib/composite-comp/dito/components/SignBoard/pc/index.js +1 -1
  144. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +157 -0
  145. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.less +20 -0
  146. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigTitle/index.js +126 -0
  147. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigTitle/index.less +0 -0
  148. package/lib/composite-comp/dito/config-panels/BargainConfig/imgs/layout1.png +0 -0
  149. package/lib/composite-comp/dito/config-panels/BargainConfig/index.js +73 -0
  150. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +1 -1
  151. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +1 -1
  152. package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +1 -1
  153. package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +1 -1
  154. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  155. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  156. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +1 -1
  157. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +1 -1
  158. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  159. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +1 -1
  160. package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +3 -3
  161. package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +1 -1
  162. package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +1 -1
  163. package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +1 -1
  164. package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +1 -1
  165. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +1 -1
  166. package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +1 -1
  167. package/lib/composite-comp/nuri/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +1 -1
  168. package/lib/constants/component-types.js +6 -2
  169. package/lib/constants/index.js +6 -1
  170. package/lib/core/Designer/AiImageGenerator/GenerateSize/index.js +1 -1
  171. package/lib/core/Designer/AiImageGenerator/NumberSlider/index.js +1 -1
  172. package/lib/core/Designer/AiImageGenerator/UploadReference/index.js +1 -1
  173. package/lib/core/Designer/AiImageGenerator/index.js +1 -1
  174. package/lib/core/Designer/AppointmentModal/index.js +1 -1
  175. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +1 -1
  176. package/lib/core/Designer/ChatRobot/index.js +1 -1
  177. package/lib/core/Designer/PageCompList/index.js +1 -1
  178. package/lib/core/Designer/QuickMenuBar/index.js +1 -1
  179. package/lib/core/Designer/ToolBarModal/index.js +1 -1
  180. package/lib/core/Designer/index.js +2 -2
  181. package/lib/meta-comp/config-panels/ButtonConfig/index.js +1 -1
  182. package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +1 -1
  183. package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +1 -1
  184. package/lib/meta-comp/config-panels/ImageConfig/index.js +1 -1
  185. package/lib/meta-comp/config-panels/PlayIconConfig/index.js +1 -1
  186. package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.js +1 -1
  187. package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +1 -1
  188. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  189. package/lib/utils/businessUtil.js +18 -3
  190. package/lib/utils/coreUtil.js +24 -24
  191. package/package.json +1 -1
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDefaultJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var _base = require("../../../../assets/images/base64");
11
+
12
+ var getDefaultJSON = function getDefaultJSON() {
13
+ var contentId = (0, _uuid.v4)();
14
+ return {
15
+ id: (0, _uuid.v4)(),
16
+ type: 'BARGAIN',
17
+ title: {
18
+ icon: {
19
+ id: (0, _uuid.v4)(),
20
+ open: true,
21
+ url: _base.bargainIcon
22
+ },
23
+ headline: {
24
+ id: (0, _uuid.v4)(),
25
+ open: true,
26
+ type: 'TEXT',
27
+ specialContent: [],
28
+ text: 'Refer and Bargain',
29
+ content: {
30
+ sizeType: 'Customize font styles',
31
+ fontFamily: 'Open Sans',
32
+ fontWeight: 700,
33
+ fontSize: 14,
34
+ color: '#FFFFFF'
35
+ },
36
+ underline: {
37
+ open: false,
38
+ textDecorationColor: '',
39
+ textDecorationStyle: 'solid'
40
+ },
41
+ vertical: {
42
+ open: false,
43
+ lineHeight: 18
44
+ }
45
+ },
46
+ button: {
47
+ id: (0, _uuid.v4)(),
48
+ open: true,
49
+ type: 'BUTTON',
50
+ text: 'Shop More',
51
+ content: {
52
+ url: '',
53
+ backgroundColor: ''
54
+ },
55
+ buttonText: {
56
+ sizeType: 'Customize font styles',
57
+ fontFamily: 'Open Sans',
58
+ fontWeight: 600,
59
+ fontSize: 12,
60
+ fontStyle: 'normal',
61
+ color: '#fff',
62
+ padding: '0'
63
+ },
64
+ buttonBorder: {
65
+ open: false,
66
+ borderColor: '',
67
+ borderRadius: 6
68
+ },
69
+ spacing: {
70
+ pc: {
71
+ paddingTop: 2,
72
+ paddingBottom: 2,
73
+ paddingLeft: 5,
74
+ paddingRight: 5
75
+ },
76
+ mobile: {
77
+ paddingTop: 2,
78
+ paddingBottom: 2,
79
+ paddingLeft: 5,
80
+ paddingRight: 5
81
+ }
82
+ },
83
+ buttonIcon: {
84
+ iconUrl: '/get/resource/platform/conf/20220719/picture/icon-arrow-right-s1549371733179686912.png',
85
+ layout: 'right'
86
+ },
87
+ hover: null
88
+ }
89
+ },
90
+ content: {
91
+ id: contentId,
92
+ sortType: '1',
93
+ label: {
94
+ id: (0, _uuid.v4)(),
95
+ contentId: contentId,
96
+ open: true,
97
+ type: 'BUTTON',
98
+ text: 'Button',
99
+ content: {
100
+ url: '',
101
+ backgroundColor: '#CC1D20'
102
+ },
103
+ buttonText: {
104
+ sizeType: 'Customize font styles',
105
+ fontFamily: 'Open Sans',
106
+ fontWeight: 600,
107
+ fontSize: 8,
108
+ fontStyle: 'normal',
109
+ color: '#fff'
110
+ },
111
+ buttonBorder: {
112
+ open: true,
113
+ borderColor: '',
114
+ borderRadius: 7
115
+ },
116
+ spacing: {
117
+ pc: {
118
+ paddingTop: 0,
119
+ paddingBottom: 0,
120
+ paddingLeft: 4,
121
+ paddingRight: 4
122
+ },
123
+ mobile: {
124
+ paddingTop: 0,
125
+ paddingBottom: 0,
126
+ paddingLeft: 4,
127
+ paddingRight: 4
128
+ }
129
+ },
130
+ buttonIcon: {
131
+ iconUrl: '',
132
+ layout: 'right'
133
+ },
134
+ hover: null
135
+ },
136
+ productName: {
137
+ id: (0, _uuid.v4)(),
138
+ contentId: contentId,
139
+ open: true,
140
+ type: 'TEXT',
141
+ specialContent: [],
142
+ text: 'Flash Deal',
143
+ content: {
144
+ sizeType: 'Customize font styles',
145
+ fontFamily: 'Open Sans',
146
+ fontWeight: 500,
147
+ fontSize: 14,
148
+ color: '#2C2C2C'
149
+ },
150
+ underline: {
151
+ open: false,
152
+ textDecorationColor: '',
153
+ textDecorationStyle: 'solid'
154
+ },
155
+ vertical: {
156
+ open: false,
157
+ lineHeight: 18
158
+ }
159
+ },
160
+ activityPrice: {
161
+ id: (0, _uuid.v4)(),
162
+ contentId: contentId,
163
+ open: true,
164
+ type: 'TEXT',
165
+ specialContent: [],
166
+ text: 'Flash Deal',
167
+ content: {
168
+ sizeType: 'Customize font styles',
169
+ fontFamily: 'Open Sans',
170
+ fontWeight: 600,
171
+ fontSize: 14,
172
+ color: '#CE1126'
173
+ },
174
+ underline: {
175
+ open: false,
176
+ textDecorationColor: '',
177
+ textDecorationStyle: 'solid'
178
+ },
179
+ vertical: {
180
+ open: false,
181
+ lineHeight: 18
182
+ }
183
+ },
184
+ salesPrice: {
185
+ id: (0, _uuid.v4)(),
186
+ contentId: contentId,
187
+ open: true,
188
+ type: 'TEXT',
189
+ specialContent: [],
190
+ text: 'Flash Deal',
191
+ content: {
192
+ sizeType: 'Customize font styles',
193
+ fontFamily: 'Open Sans',
194
+ fontWeight: 500,
195
+ fontSize: 10,
196
+ color: '#929292'
197
+ },
198
+ underline: {
199
+ open: false,
200
+ textDecorationColor: '',
201
+ textDecorationStyle: 'solid'
202
+ },
203
+ vertical: {
204
+ open: false,
205
+ lineHeight: 18
206
+ }
207
+ },
208
+ salesProgress: {
209
+ open: true
210
+ }
211
+ },
212
+ spacing: {
213
+ pc: {
214
+ paddingTop: 0,
215
+ paddingBottom: 0,
216
+ paddingLeft: 0,
217
+ paddingRight: 0,
218
+ marginBottom: window.magicDesign.compSpacing * 1.5
219
+ },
220
+ mobile: {
221
+ paddingTop: 0,
222
+ paddingBottom: 0,
223
+ paddingLeft: 0,
224
+ paddingRight: 0,
225
+ marginBottom: window.magicDesign.compSpacing
226
+ }
227
+ },
228
+ customize: {
229
+ layout: 'layout1',
230
+ align: 'left',
231
+ pcRowNum: 6,
232
+ pcMaxRowNum: 6,
233
+ pcMinRowNum: 5
234
+ },
235
+ background: {
236
+ opacity: 100,
237
+ color: '#CE1126',
238
+ image: '',
239
+ bgType: 'color'
240
+ }
241
+ };
242
+ };
243
+
244
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _mobile = _interopRequireDefault(require("./mobile"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _coreUtil = require("../../../../utils/coreUtil");
15
+
16
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
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 _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); }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
53
+ var c = arguments.length,
54
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
55
+ d;
56
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
57
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58
+ }
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+
62
+ var FlashDeal =
63
+ /** @class */
64
+ function (_super) {
65
+ __extends(FlashDeal, _super);
66
+
67
+ function FlashDeal() {
68
+ return _super !== null && _super.apply(this, arguments) || this;
69
+ }
70
+
71
+ FlashDeal.prototype.render = function () {
72
+ var nodeData = this.props.nodeData;
73
+ return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
74
+ panelProps: nodeData
75
+ }));
76
+ };
77
+
78
+ FlashDeal.defaultProps = {};
79
+ FlashDeal.type = 'BARGAIN';
80
+ FlashDeal.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
+ FlashDeal = __decorate([_compositeDecorator["default"]], FlashDeal);
82
+ return FlashDeal;
83
+ }(_react.Component);
84
+
85
+ var _default = FlashDeal;
86
+ exports["default"] = _default;
@@ -0,0 +1,370 @@
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
+ require("./index.less");
11
+
12
+ var _defImg = _interopRequireDefault(require("./imgs/defImg.png"));
13
+
14
+ var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
15
+
16
+ var _coreUtil = require("../../../../../utils/coreUtil");
17
+
18
+ var _components = require("../../../../../meta-comp/components");
19
+
20
+ var _commonUtil = require("../../../../../utils/commonUtil");
21
+
22
+ var _storeUtil = require("../../../../../utils/storeUtil");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __assign = void 0 && (void 0).__assign || function () {
53
+ __assign = Object.assign || function (t) {
54
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
55
+ s = arguments[i];
56
+
57
+ for (var p in s) {
58
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
59
+ }
60
+ }
61
+
62
+ return t;
63
+ };
64
+
65
+ return __assign.apply(this, arguments);
66
+ };
67
+
68
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
69
+ function adopt(value) {
70
+ return value instanceof P ? value : new P(function (resolve) {
71
+ resolve(value);
72
+ });
73
+ }
74
+
75
+ return new (P || (P = Promise))(function (resolve, reject) {
76
+ function fulfilled(value) {
77
+ try {
78
+ step(generator.next(value));
79
+ } catch (e) {
80
+ reject(e);
81
+ }
82
+ }
83
+
84
+ function rejected(value) {
85
+ try {
86
+ step(generator["throw"](value));
87
+ } catch (e) {
88
+ reject(e);
89
+ }
90
+ }
91
+
92
+ function step(result) {
93
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
94
+ }
95
+
96
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
97
+ });
98
+ };
99
+
100
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
101
+ var _ = {
102
+ label: 0,
103
+ sent: function sent() {
104
+ if (t[0] & 1) throw t[1];
105
+ return t[1];
106
+ },
107
+ trys: [],
108
+ ops: []
109
+ },
110
+ f,
111
+ y,
112
+ t,
113
+ g;
114
+ return g = {
115
+ next: verb(0),
116
+ "throw": verb(1),
117
+ "return": verb(2)
118
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
119
+ return this;
120
+ }), g;
121
+
122
+ function verb(n) {
123
+ return function (v) {
124
+ return step([n, v]);
125
+ };
126
+ }
127
+
128
+ function step(op) {
129
+ if (f) throw new TypeError("Generator is already executing.");
130
+
131
+ while (_) {
132
+ try {
133
+ 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;
134
+ if (y = 0, t) op = [op[0] & 2, t.value];
135
+
136
+ switch (op[0]) {
137
+ case 0:
138
+ case 1:
139
+ t = op;
140
+ break;
141
+
142
+ case 4:
143
+ _.label++;
144
+ return {
145
+ value: op[1],
146
+ done: false
147
+ };
148
+
149
+ case 5:
150
+ _.label++;
151
+ y = op[1];
152
+ op = [0];
153
+ continue;
154
+
155
+ case 7:
156
+ op = _.ops.pop();
157
+
158
+ _.trys.pop();
159
+
160
+ continue;
161
+
162
+ default:
163
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
164
+ _ = 0;
165
+ continue;
166
+ }
167
+
168
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
169
+ _.label = op[1];
170
+ break;
171
+ }
172
+
173
+ if (op[0] === 6 && _.label < t[1]) {
174
+ _.label = t[1];
175
+ t = op;
176
+ break;
177
+ }
178
+
179
+ if (t && _.label < t[2]) {
180
+ _.label = t[2];
181
+
182
+ _.ops.push(op);
183
+
184
+ break;
185
+ }
186
+
187
+ if (t[2]) _.ops.pop();
188
+
189
+ _.trys.pop();
190
+
191
+ continue;
192
+ }
193
+
194
+ op = body.call(thisArg, _);
195
+ } catch (e) {
196
+ op = [6, e];
197
+ y = 0;
198
+ } finally {
199
+ f = t = 0;
200
+ }
201
+ }
202
+
203
+ if (op[0] & 5) throw op[1];
204
+ return {
205
+ value: op[0] ? op[1] : void 0,
206
+ done: true
207
+ };
208
+ }
209
+ };
210
+
211
+ var defaultData = [{
212
+ imgUrlContent: {
213
+ url: _defImg["default"]
214
+ },
215
+ offerName: 'Product Name',
216
+ salesPrice: 18000000,
217
+ specialPrice: 18000000,
218
+ marketPrice: 19000000,
219
+ discountPercent: 10,
220
+ salePercent: 500,
221
+ sppType: '12'
222
+ }, {
223
+ imgUrlContent: {
224
+ url: _defImg["default"]
225
+ },
226
+ offerName: 'Product Name',
227
+ salesPrice: 18000000,
228
+ specialPrice: 18000000,
229
+ marketPrice: 19000000,
230
+ discountPercent: 10,
231
+ salePercent: 500,
232
+ sppType: '12'
233
+ }, {
234
+ imgUrlContent: {
235
+ url: _defImg["default"]
236
+ },
237
+ offerName: 'Product Name',
238
+ salesPrice: 18000000,
239
+ specialPrice: 18000000,
240
+ marketPrice: 19000000,
241
+ discountPercent: 10,
242
+ salePercent: 500,
243
+ sppType: '12'
244
+ }];
245
+
246
+ var FlashDealMobile =
247
+ /** @class */
248
+ function (_super) {
249
+ __extends(FlashDealMobile, _super);
250
+
251
+ function FlashDealMobile() {
252
+ var _this = _super !== null && _super.apply(this, arguments) || this; // 商品列表排序方式
253
+
254
+
255
+ _this.sortType = '';
256
+ _this.state = {
257
+ list: (0, _coreUtil.isDesignMode)() ? [] : (0, _commonUtil.ensure)(function () {
258
+ return (0, _storeUtil.getMagicStore)("bargain_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
259
+ }, [])
260
+ };
261
+
262
+ _this.getData = function () {
263
+ return __awaiter(_this, void 0, void 0, function () {
264
+ var res, pageId, list;
265
+ return __generator(this, function (_a) {
266
+ switch (_a.label) {
267
+ case 0:
268
+ return [4
269
+ /*yield*/
270
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/bargain/offer/page', {
271
+ sortType: this.sortType,
272
+ pageIndex: 1,
273
+ pageSize: 30
274
+ })];
275
+
276
+ case 1:
277
+ res = _a.sent();
278
+ pageId = window.magicDesign.pageId || '';
279
+ list = res.pageInfo.list || [];
280
+
281
+ if (!(0, _coreUtil.isDesignMode)()) {
282
+ (0, _storeUtil.setMagicStore)("bargain_" + pageId + "_" + this.props.panelProps.id, list);
283
+ }
284
+
285
+ this.setState({
286
+ list: list
287
+ });
288
+ return [2
289
+ /*return*/
290
+ ];
291
+ }
292
+ });
293
+ });
294
+ };
295
+
296
+ return _this;
297
+ }
298
+
299
+ FlashDealMobile.prototype.componentDidMount = function () {
300
+ this.sortType = this.props.panelProps.content.sortType;
301
+ this.getData();
302
+ };
303
+
304
+ FlashDealMobile.prototype.componentWillReceiveProps = function (nextProps) {
305
+ if (nextProps.panelProps.content.sortType !== this.sortType) {
306
+ this.sortType = nextProps.panelProps.content.sortType;
307
+ this.getData();
308
+ }
309
+ };
310
+
311
+ FlashDealMobile.prototype.render = function () {
312
+ var panelProps = this.props.panelProps;
313
+ var list = this.state.list;
314
+
315
+ var _list = list.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : list;
316
+
317
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _list.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
318
+ className: "m-bargain-mobile"
319
+ }, /*#__PURE__*/_react["default"].createElement("div", {
320
+ className: "bargain-title"
321
+ }, /*#__PURE__*/_react["default"].createElement("div", {
322
+ className: "left"
323
+ }, panelProps.title.icon.open && panelProps.title.icon.url && /*#__PURE__*/_react["default"].createElement("img", {
324
+ alt: "",
325
+ className: "icon",
326
+ src: panelProps.title.icon.url
327
+ }), panelProps.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
328
+ className: "title",
329
+ data: panelProps.title.headline
330
+ })), /*#__PURE__*/_react["default"].createElement("div", {
331
+ className: "right",
332
+ onClick: function onClick() {
333
+ return (0, _coreUtil.clickUrl)('/spike');
334
+ }
335
+ }, panelProps.title.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
336
+ className: "btn",
337
+ data: panelProps.title.button
338
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
339
+ className: "bargain-list"
340
+ }, _list.map(function (item) {
341
+ return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
342
+ key: item.id,
343
+ data: __assign(__assign({}, item), {
344
+ salePercent: item.salePercent
345
+ }) // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
346
+ ,
347
+ onItemClick: function onItemClick() {
348
+ if (window.magicDesign.pushGA) {
349
+ window.magicDesign.pushGA({}, 'select_promotion', {
350
+ event_section: 'Bargain',
351
+ promotion_name: item === null || item === void 0 ? void 0 : item.offerName
352
+ });
353
+ }
354
+
355
+ (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
356
+ },
357
+ panelProps: panelProps.content,
358
+ type: "bargain"
359
+ });
360
+ }))));
361
+ };
362
+
363
+ FlashDealMobile.defaultProps = {
364
+ panelProps: {}
365
+ };
366
+ return FlashDealMobile;
367
+ }(_react["default"].Component);
368
+
369
+ var _default = FlashDealMobile;
370
+ exports["default"] = _default;