@fonixtree/magic-design 2.0.33 → 2.0.35
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.
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/common/AffiliateProductModal/index.js +582 -0
- package/es/common/AffiliateProductModal/index.less +146 -0
- package/es/common/ProductModal/index.js +1 -2
- package/es/common/ProductSource/index.js +42 -10
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +175 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +107 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +656 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +76 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +725 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +145 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/es/constants/component-types.js +9 -3
- package/es/constants/index.js +4 -0
- package/es/core/Designer/ConfigPanel/index.js +7 -2
- package/es/core/Renderer/index.js +18 -11
- package/es/meta-comp/components/Text/index.js +16 -0
- package/es/utils/businessUtil.js +6 -1
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/AffiliateProductModal/index.js +582 -0
- package/lib/common/AffiliateProductModal/index.less +146 -0
- package/lib/common/ProductModal/index.js +1 -2
- package/lib/common/ProductSource/index.js +42 -10
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +175 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +107 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +656 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +76 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +725 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +145 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/lib/constants/component-types.js +9 -3
- package/lib/constants/index.js +4 -0
- package/lib/core/Designer/ConfigPanel/index.js +7 -2
- package/lib/core/Renderer/index.js +18 -11
- package/lib/meta-comp/components/Text/index.js +16 -0
- package/lib/utils/businessUtil.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.recommendGroupSourceJSON = exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo, text) {
|
|
11
|
+
var groupId = (0, _uuid.v4)();
|
|
12
|
+
var imageId = (0, _uuid.v4)();
|
|
13
|
+
var groupNameId = (0, _uuid.v4)();
|
|
14
|
+
return {
|
|
15
|
+
id: groupId,
|
|
16
|
+
parentId: parentId,
|
|
17
|
+
image: {
|
|
18
|
+
parentId: groupId,
|
|
19
|
+
id: imageId,
|
|
20
|
+
open: true,
|
|
21
|
+
type: 'IMAGE',
|
|
22
|
+
content: {
|
|
23
|
+
h5Name: '',
|
|
24
|
+
pcName: '',
|
|
25
|
+
h5ImgSrc: logo,
|
|
26
|
+
pcImgSrc: logo,
|
|
27
|
+
clickUrl: ''
|
|
28
|
+
},
|
|
29
|
+
hover: {
|
|
30
|
+
open: false,
|
|
31
|
+
backgroundType: 'enlarge',
|
|
32
|
+
magnification: 1.5,
|
|
33
|
+
pcImgHoverUrl: '',
|
|
34
|
+
h5ImgHoverUrl: ''
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
groupName: {
|
|
38
|
+
parentId: groupId,
|
|
39
|
+
id: groupNameId,
|
|
40
|
+
open: true,
|
|
41
|
+
type: 'TEXT',
|
|
42
|
+
specialContent: [],
|
|
43
|
+
text: text,
|
|
44
|
+
content: {
|
|
45
|
+
sizeType: 'Customize font styles',
|
|
46
|
+
fontFamily: 'Open Sans',
|
|
47
|
+
fontWeight: 400,
|
|
48
|
+
fontSize: 14,
|
|
49
|
+
color: '#8493AF'
|
|
50
|
+
},
|
|
51
|
+
underline: {
|
|
52
|
+
open: false,
|
|
53
|
+
textDecorationColor: '',
|
|
54
|
+
textDecorationStyle: 'solid'
|
|
55
|
+
},
|
|
56
|
+
vertical: {}
|
|
57
|
+
},
|
|
58
|
+
seeAll: {
|
|
59
|
+
parentId: groupId,
|
|
60
|
+
id: (0, _uuid.v4)(),
|
|
61
|
+
open: true,
|
|
62
|
+
type: 'BUTTON',
|
|
63
|
+
text: 'See All',
|
|
64
|
+
content: {
|
|
65
|
+
url: '',
|
|
66
|
+
backgroundColor: '#fff'
|
|
67
|
+
},
|
|
68
|
+
buttonText: {
|
|
69
|
+
sizeType: 'Customize font styles',
|
|
70
|
+
fontFamily: 'Open Sans',
|
|
71
|
+
fontWeight: 400,
|
|
72
|
+
fontSize: 12,
|
|
73
|
+
fontStyle: 'normal',
|
|
74
|
+
color: '#232F46'
|
|
75
|
+
},
|
|
76
|
+
buttonBorder: {
|
|
77
|
+
open: true,
|
|
78
|
+
borderColor: '',
|
|
79
|
+
borderRadius: 0
|
|
80
|
+
},
|
|
81
|
+
spacing: {
|
|
82
|
+
pc: {
|
|
83
|
+
paddingTop: 0,
|
|
84
|
+
paddingBottom: 0,
|
|
85
|
+
paddingLeft: 0,
|
|
86
|
+
paddingRight: 0
|
|
87
|
+
},
|
|
88
|
+
mobile: {
|
|
89
|
+
paddingTop: 0,
|
|
90
|
+
paddingBottom: 0,
|
|
91
|
+
paddingLeft: 0,
|
|
92
|
+
paddingRight: 0
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
buttonIcon: {
|
|
96
|
+
iconUrl: '/get/resource/platform/conf/20220923/picture/Frame24271573200432656932864.png',
|
|
97
|
+
layout: 'left'
|
|
98
|
+
},
|
|
99
|
+
hover: null
|
|
100
|
+
},
|
|
101
|
+
prodIds: '',
|
|
102
|
+
intelligentType: 'Hot',
|
|
103
|
+
intelligentValue: [],
|
|
104
|
+
maxProdNum: 10,
|
|
105
|
+
hover: {
|
|
106
|
+
open: false,
|
|
107
|
+
image: {
|
|
108
|
+
parentId: groupId,
|
|
109
|
+
id: imageId,
|
|
110
|
+
open: false,
|
|
111
|
+
type: 'IMAGE',
|
|
112
|
+
content: {
|
|
113
|
+
h5Name: '',
|
|
114
|
+
pcName: '',
|
|
115
|
+
h5ImgSrc: logo,
|
|
116
|
+
pcImgSrc: logo,
|
|
117
|
+
clickUrl: ''
|
|
118
|
+
},
|
|
119
|
+
hover: {
|
|
120
|
+
open: false,
|
|
121
|
+
backgroundType: 'enlarge',
|
|
122
|
+
magnification: 1.5,
|
|
123
|
+
pcImgHoverUrl: '',
|
|
124
|
+
h5ImgHoverUrl: ''
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
groupName: {
|
|
128
|
+
parentId: groupId,
|
|
129
|
+
id: groupNameId,
|
|
130
|
+
open: false,
|
|
131
|
+
type: 'TEXT',
|
|
132
|
+
specialContent: [],
|
|
133
|
+
text: text,
|
|
134
|
+
content: {
|
|
135
|
+
sizeType: 'Customize font styles',
|
|
136
|
+
fontFamily: 'Open Sans',
|
|
137
|
+
fontWeight: 600,
|
|
138
|
+
fontSize: 14,
|
|
139
|
+
color: '#CE1126'
|
|
140
|
+
},
|
|
141
|
+
underline: {
|
|
142
|
+
open: false,
|
|
143
|
+
textDecorationColor: '',
|
|
144
|
+
textDecorationStyle: 'solid'
|
|
145
|
+
},
|
|
146
|
+
vertical: {}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
exports.recommendGroupSourceJSON = recommendGroupSourceJSON;
|
|
153
|
+
|
|
154
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
155
|
+
var groupId = (0, _uuid.v4)();
|
|
156
|
+
return {
|
|
157
|
+
id: groupId,
|
|
158
|
+
type: 'AFFILIATE_RECOMMEND',
|
|
159
|
+
groupSource: [recommendGroupSourceJSON(groupId, '', 'Tab1'), recommendGroupSourceJSON(groupId, '', 'Tab2')],
|
|
160
|
+
content: {
|
|
161
|
+
productName: {
|
|
162
|
+
id: (0, _uuid.v4)(),
|
|
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: 400,
|
|
171
|
+
fontSize: 10,
|
|
172
|
+
color: '#282828'
|
|
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
|
+
open: true,
|
|
187
|
+
type: 'TEXT',
|
|
188
|
+
specialContent: [],
|
|
189
|
+
text: 'Flash Deal',
|
|
190
|
+
content: {
|
|
191
|
+
sizeType: 'Customize font styles',
|
|
192
|
+
fontFamily: 'Open Sans',
|
|
193
|
+
fontWeight: 800,
|
|
194
|
+
fontSize: 18,
|
|
195
|
+
color: '#333'
|
|
196
|
+
},
|
|
197
|
+
underline: {
|
|
198
|
+
open: false,
|
|
199
|
+
textDecorationColor: '',
|
|
200
|
+
textDecorationStyle: 'solid'
|
|
201
|
+
},
|
|
202
|
+
vertical: {
|
|
203
|
+
open: false,
|
|
204
|
+
lineHeight: 18
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
spacing: {
|
|
209
|
+
pc: {
|
|
210
|
+
paddingTop: 0,
|
|
211
|
+
paddingBottom: 0,
|
|
212
|
+
paddingLeft: 0,
|
|
213
|
+
paddingRight: 0,
|
|
214
|
+
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
215
|
+
},
|
|
216
|
+
mobile: {
|
|
217
|
+
paddingTop: 0,
|
|
218
|
+
paddingBottom: 0,
|
|
219
|
+
paddingLeft: 0,
|
|
220
|
+
paddingRight: 0,
|
|
221
|
+
marginBottom: window.magicDesign.compSpacing
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
customize: {
|
|
225
|
+
layout: {
|
|
226
|
+
pcLayout: 'layout1',
|
|
227
|
+
h5Layout: 'layout1'
|
|
228
|
+
},
|
|
229
|
+
align: 'left',
|
|
230
|
+
pcRowNum: 6,
|
|
231
|
+
pcMaxRowNum: 6,
|
|
232
|
+
pcMinRowNum: 5
|
|
233
|
+
},
|
|
234
|
+
background: {
|
|
235
|
+
opacity: 100,
|
|
236
|
+
color: '#fff',
|
|
237
|
+
image: '',
|
|
238
|
+
bgType: 'color'
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,90 @@
|
|
|
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 _pc = _interopRequireDefault(require("./pc"));
|
|
13
|
+
|
|
14
|
+
var _defaultJSON = require("./defaultJSON");
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
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--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var AffiliateRecommend =
|
|
65
|
+
/** @class */
|
|
66
|
+
function (_super) {
|
|
67
|
+
__extends(AffiliateRecommend, _super);
|
|
68
|
+
|
|
69
|
+
function AffiliateRecommend() {
|
|
70
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
AffiliateRecommend.prototype.render = function () {
|
|
74
|
+
var nodeData = this.props.nodeData;
|
|
75
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
76
|
+
panelProps: nodeData
|
|
77
|
+
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
78
|
+
panelProps: nodeData
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
AffiliateRecommend.defaultProps = {};
|
|
83
|
+
AffiliateRecommend.type = 'AFFILIATE_RECOMMEND';
|
|
84
|
+
AffiliateRecommend.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
85
|
+
AffiliateRecommend = __decorate([_compositeDecorator["default"]], AffiliateRecommend);
|
|
86
|
+
return AffiliateRecommend;
|
|
87
|
+
}(_react.Component);
|
|
88
|
+
|
|
89
|
+
var _default = AffiliateRecommend;
|
|
90
|
+
exports["default"] = _default;
|