pb-sxp-ui 1.3.0 → 1.3.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.
- package/dist/index.cjs +371 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +371 -198
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +371 -198
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +3 -2
- package/es/core/components/SxpPageRender/RenderCard.d.ts +3 -3
- package/es/core/components/SxpPageRender/RenderCard.js +17 -27
- package/es/core/components/SxpPageRender/WaterFall/List.js +28 -15
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
- package/es/core/components/SxpPageRender/index.js +41 -29
- package/es/core/context/EditorContext.js +2 -0
- package/es/core/context/EditorDataProvider.d.ts +3 -0
- package/es/core/context/EditorDataProvider.js +2 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +58 -23
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +2 -2
- package/es/core/utils/tool.d.ts +3 -3
- package/es/core/utils/tool.js +6 -6
- package/es/materials/sxp/HashTag/index.d.ts +3 -1
- package/es/materials/sxp/HashTag/settingRender.d.ts +13 -7
- package/es/materials/sxp/HashTag/settingRender.js +15 -0
- package/es/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
- package/es/materials/sxp/cta/AniLink/settingRender.js +4 -0
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
- package/es/materials/sxp/popup/AppointForm/settingRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +34 -27
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityList/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityList/index.js +11 -7
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +10 -0
- package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/es/materials/sxp/popup/Iframe/index.js +8 -7
- package/es/materials/sxp/popup/Prompt/settingRender.js +10 -0
- package/es/materials/sxp/template/Link/settingRender.js +5 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +3 -2
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +3 -3
- package/lib/core/components/SxpPageRender/RenderCard.js +16 -26
- package/lib/core/components/SxpPageRender/WaterFall/List.js +28 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
- package/lib/core/components/SxpPageRender/index.js +40 -28
- package/lib/core/context/EditorContext.js +2 -0
- package/lib/core/context/EditorDataProvider.d.ts +3 -0
- package/lib/core/context/EditorDataProvider.js +2 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +58 -23
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +2 -2
- package/lib/core/utils/tool.d.ts +3 -3
- package/lib/core/utils/tool.js +6 -6
- package/lib/materials/sxp/HashTag/index.d.ts +3 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +13 -7
- package/lib/materials/sxp/HashTag/settingRender.js +15 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.js +4 -0
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +12 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +34 -27
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityList/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +11 -7
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +10 -0
- package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/lib/materials/sxp/popup/Iframe/index.js +8 -7
- package/lib/materials/sxp/popup/Prompt/settingRender.js +10 -0
- package/lib/materials/sxp/template/Link/settingRender.js +5 -0
- package/package.json +1 -1
@@ -93,8 +93,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
93
93
|
.catch((err) => Promise.reject(err));
|
94
94
|
}, [bffDataSource]);
|
95
95
|
const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
96
|
-
var _d, _e, _f, _g, _h;
|
97
|
-
query = Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` }));
|
96
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
97
|
+
query = Object.assign(Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
|
98
98
|
if (utmVal) {
|
99
99
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
100
100
|
var _a, _b;
|
@@ -103,8 +103,35 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
103
103
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
104
104
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
105
105
|
}
|
106
|
-
if (
|
107
|
-
query = Object.assign(Object.assign(
|
106
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
107
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_j = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _j !== void 0 ? _j : 1 });
|
108
|
+
}
|
109
|
+
if (isEditor) {
|
110
|
+
let pageNum = 1;
|
111
|
+
query = Object.assign(Object.assign({}, query), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
112
|
+
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current)
|
113
|
+
return;
|
114
|
+
isInit.current = true;
|
115
|
+
let list = [];
|
116
|
+
let result = null;
|
117
|
+
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
118
|
+
var _r, _s, _t, _u, _v, _w;
|
119
|
+
query.pageNum = pageNum;
|
120
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
121
|
+
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
122
|
+
return undefined;
|
123
|
+
}
|
124
|
+
const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.every((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
125
|
+
list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
|
126
|
+
if (isNotNullList) {
|
127
|
+
pageNum = pageNum + 1;
|
128
|
+
yield recurveRecList(query);
|
129
|
+
}
|
130
|
+
});
|
131
|
+
yield recurveRecList(query);
|
132
|
+
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
133
|
+
setCurReqInfo({ rtc: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.rtc, requestId: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.requestId });
|
134
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
108
135
|
}
|
109
136
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
110
137
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
@@ -112,15 +139,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
112
139
|
}
|
113
140
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
114
141
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
142
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
143
|
+
let list = [];
|
144
|
+
list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
|
145
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
146
|
+
}
|
115
147
|
return result === null || result === void 0 ? void 0 : result.data;
|
116
|
-
}), [bffFetch, utmVal, maxSize, defaultSize,
|
117
|
-
const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
118
|
-
var
|
148
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
149
|
+
const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
150
|
+
var _x, _y, _z, _0;
|
119
151
|
if (rtcList.length <= 0) {
|
120
152
|
return;
|
121
153
|
}
|
122
154
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
123
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
155
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_x = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _x === void 0 ? void 0 : _x.itemId) && { productFilter: (_y = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _y === void 0 ? void 0 : _y.itemId })), (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _z === void 0 ? void 0 : _z.itemId) && { contentFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _0 === void 0 ? void 0 : _0.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
124
156
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
125
157
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
126
158
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -132,7 +164,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
132
164
|
userInfo = {};
|
133
165
|
}
|
134
166
|
const sessionID = storeAndLoadFeSessionId();
|
135
|
-
const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
|
167
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice() && { sxpDevice: getDevice() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() }));
|
136
168
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
137
169
|
const realEventInfo = Object.entries(ef)
|
138
170
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -148,24 +180,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
148
180
|
});
|
149
181
|
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
150
182
|
const bffFbReport = useCallback((_a) => {
|
151
|
-
var _b, _c;
|
183
|
+
var _b, _c, _d;
|
152
184
|
var { eventName, actionSource = 'website', eventSourceUrl = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href, externalId } = _a;
|
153
185
|
if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
154
186
|
return;
|
155
187
|
}
|
156
188
|
const fakeUserId = storeAndLoadFeUserId();
|
189
|
+
const urlParams = new URLSearchParams(window.location.search);
|
190
|
+
const fbclid = urlParams.get('fbclid');
|
157
191
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
158
192
|
method: 'POST',
|
159
193
|
body: {
|
160
194
|
eventName,
|
161
195
|
actionSource,
|
162
196
|
eventSourceUrl,
|
163
|
-
userData: {
|
164
|
-
externalId: fakeUserId,
|
165
|
-
fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
|
166
|
-
fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
|
167
|
-
client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
|
168
|
-
}
|
197
|
+
userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), (getCookie('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` })), { client_user_agent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
|
169
198
|
},
|
170
199
|
type: 'beacon'
|
171
200
|
});
|
@@ -183,17 +212,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
183
212
|
return res === null || res === void 0 ? void 0 : res.success;
|
184
213
|
}), [bffFetch]);
|
185
214
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
186
|
-
var
|
215
|
+
var _1, _2, _3, _4, _5;
|
187
216
|
if (!utmVal || !isShowTag)
|
188
217
|
return;
|
189
218
|
try {
|
190
|
-
const val = (
|
219
|
+
const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
|
191
220
|
var _a, _b;
|
192
221
|
const key = val.split('=')[0];
|
193
222
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
194
|
-
})) === null ||
|
223
|
+
})) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
|
195
224
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
196
|
-
setTagList((
|
225
|
+
setTagList((_5 = (_4 = result === null || result === void 0 ? void 0 : result.data) === null || _4 === void 0 ? void 0 : _4.tags) !== null && _5 !== void 0 ? _5 : []);
|
197
226
|
}
|
198
227
|
catch (e) {
|
199
228
|
console.log('e', e);
|
@@ -266,11 +295,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
266
295
|
}
|
267
296
|
});
|
268
297
|
setLoading(false);
|
269
|
-
isInit.current = true;
|
270
298
|
});
|
271
299
|
}, [isShowConsent]);
|
272
300
|
useEffect(() => {
|
273
|
-
if (!
|
301
|
+
if (!isPreview)
|
274
302
|
return;
|
275
303
|
setLoading(true);
|
276
304
|
bffGetTagList();
|
@@ -280,6 +308,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
280
308
|
setCacheRtcList(getFilterRecList(data));
|
281
309
|
})
|
282
310
|
.finally(() => {
|
311
|
+
bffEventReport({
|
312
|
+
eventInfo: {
|
313
|
+
eventSubject: 'apiRequest',
|
314
|
+
eventDescription: 'api request succeed'
|
315
|
+
}
|
316
|
+
});
|
283
317
|
setLoading(false);
|
284
318
|
});
|
285
319
|
}, [getRecommendVideos, bffGetTagList]);
|
@@ -330,7 +364,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
330
364
|
setSelectTag,
|
331
365
|
globalConfig,
|
332
366
|
popupCurTimeRef,
|
333
|
-
checkCommodityIndexRef
|
367
|
+
checkCommodityIndexRef,
|
368
|
+
isEditor
|
334
369
|
} }, isShowConsent ? (React.createElement(Consent, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
|
335
370
|
rtcList,
|
336
371
|
mutateLike: bffMutateLike,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RecItemType } from '../components/SxpPageRender/typing';
|
2
2
|
export declare function useEventReport(): {
|
3
|
-
jumpToWeb: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], position?: number) => void;
|
3
|
+
jumpToWeb: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], position?: number, traceInfo?: string) => void;
|
4
4
|
productView: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], viewTime?: any, position?: number) => void;
|
5
5
|
backMainFeed: (lastFeed: 'theme' | 'branch' | 'external', selectTag?: string, themeTag?: string, hashTag?: string) => void;
|
6
6
|
};
|
@@ -3,7 +3,7 @@ import { useSxpDataSource } from './useSxpDataSource';
|
|
3
3
|
import { DEFAULT_TAG } from '../context/SxpDataSourceProvider';
|
4
4
|
export function useEventReport() {
|
5
5
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
6
|
-
const jumpToWeb = useCallback((data, product, cta, position) => {
|
6
|
+
const jumpToWeb = useCallback((data, product, cta, position, traceInfo) => {
|
7
7
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
8
8
|
let fromKName = '';
|
9
9
|
if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
@@ -36,7 +36,7 @@ export function useEventReport() {
|
|
36
36
|
position: position + '',
|
37
37
|
contentId: (_v = (_u = data === null || data === void 0 ? void 0 : data.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
|
38
38
|
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
39
|
-
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
39
|
+
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
40
40
|
}
|
41
41
|
});
|
42
42
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
package/es/core/utils/tool.d.ts
CHANGED
@@ -7,8 +7,8 @@ interface IfontType {
|
|
7
7
|
'fontFamily-en': string;
|
8
8
|
}
|
9
9
|
export declare const setFontForText: (textContent?: string | null, style?: IfontType | any) => string;
|
10
|
-
declare function getBrowserInfo(): string;
|
11
|
-
declare function getSystem(): string;
|
12
|
-
declare function getDevice(): string;
|
10
|
+
declare function getBrowserInfo(): string | null;
|
11
|
+
declare function getSystem(): string | null;
|
12
|
+
declare function getDevice(): string | null;
|
13
13
|
declare function getCookie(val: string): string;
|
14
14
|
export { uuid, getIndexByblockType, getBrowserInfo, getDevice, getSystem, getCookie };
|
package/es/core/utils/tool.js
CHANGED
@@ -92,7 +92,7 @@ function getBrowserInfo() {
|
|
92
92
|
var _a, _b, _c, _d, _e, _f, _g;
|
93
93
|
let userAgent = self.navigator.userAgent;
|
94
94
|
if (!userAgent)
|
95
|
-
return
|
95
|
+
return null;
|
96
96
|
if (/edge\/([\d\.]+)/i.exec(userAgent))
|
97
97
|
return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
98
98
|
if (/edg\/([\d\.]+)/i.exec(userAgent))
|
@@ -107,13 +107,13 @@ function getBrowserInfo() {
|
|
107
107
|
return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
|
108
108
|
if (/safari/i.test(userAgent))
|
109
109
|
return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
|
110
|
-
return
|
110
|
+
return null;
|
111
111
|
}
|
112
112
|
function getSystem() {
|
113
113
|
var _a, _b, _c;
|
114
114
|
let userAgent = self.navigator.userAgent;
|
115
115
|
if (!userAgent)
|
116
|
-
return
|
116
|
+
return null;
|
117
117
|
if (/iphone/i.test(userAgent))
|
118
118
|
return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
119
119
|
if (/android/i.test(userAgent))
|
@@ -122,12 +122,12 @@ function getSystem() {
|
|
122
122
|
return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
|
123
123
|
if (/mac/i.test(userAgent))
|
124
124
|
return `Mac OS`;
|
125
|
-
return
|
125
|
+
return null;
|
126
126
|
}
|
127
127
|
function getDevice() {
|
128
128
|
let userAgent = self.navigator.userAgent;
|
129
129
|
if (!userAgent)
|
130
|
-
return
|
130
|
+
return null;
|
131
131
|
if (/iphone/i.test(userAgent))
|
132
132
|
return `iPhone`;
|
133
133
|
if (/android/i.test(userAgent)) {
|
@@ -142,7 +142,7 @@ function getDevice() {
|
|
142
142
|
return `Windows`;
|
143
143
|
if (/mac/i.test(userAgent))
|
144
144
|
return `Mac`;
|
145
|
-
return
|
145
|
+
return null;
|
146
146
|
}
|
147
147
|
function getCookie(val) {
|
148
148
|
const cookies = document.cookie;
|
@@ -8,7 +8,9 @@ export interface IHashTagProps {
|
|
8
8
|
hashTagDesc: CSSProperties;
|
9
9
|
hashTagLink: CSSProperties;
|
10
10
|
title: CSSProperties;
|
11
|
-
price: CSSProperties
|
11
|
+
price: CSSProperties & {
|
12
|
+
enableFormattedPrice?: boolean;
|
13
|
+
};
|
12
14
|
};
|
13
15
|
buttonBgStyle: CSSProperties;
|
14
16
|
showBanner?: boolean;
|
@@ -1,11 +1,4 @@
|
|
1
1
|
declare const _default: ({
|
2
|
-
title: string;
|
3
|
-
child: {
|
4
|
-
type: string;
|
5
|
-
label: string;
|
6
|
-
name: string[];
|
7
|
-
}[];
|
8
|
-
} | {
|
9
2
|
title: string;
|
10
3
|
child: ({
|
11
4
|
type: string;
|
@@ -68,6 +61,13 @@ declare const _default: ({
|
|
68
61
|
name?: undefined;
|
69
62
|
initialValue?: undefined;
|
70
63
|
child?: undefined;
|
64
|
+
} | {
|
65
|
+
label: string;
|
66
|
+
type: string;
|
67
|
+
name: string[];
|
68
|
+
initialValue: boolean;
|
69
|
+
options?: undefined;
|
70
|
+
child?: undefined;
|
71
71
|
})[];
|
72
72
|
}[];
|
73
73
|
} | {
|
@@ -126,6 +126,12 @@ declare const _default: ({
|
|
126
126
|
})[];
|
127
127
|
name?: undefined;
|
128
128
|
initialValue?: undefined;
|
129
|
+
} | {
|
130
|
+
label: string;
|
131
|
+
type: string;
|
132
|
+
name: string[];
|
133
|
+
initialValue?: undefined;
|
134
|
+
child?: undefined;
|
129
135
|
})[];
|
130
136
|
})[];
|
131
137
|
export default _default;
|
@@ -99,6 +99,16 @@ export default [
|
|
99
99
|
{
|
100
100
|
label: '标题对齐',
|
101
101
|
type: 'TextAlign'
|
102
|
+
},
|
103
|
+
{
|
104
|
+
label: '间距',
|
105
|
+
type: 'TextSpace'
|
106
|
+
},
|
107
|
+
{
|
108
|
+
label: '价格千分符展示',
|
109
|
+
type: 'Switch',
|
110
|
+
name: ['enableFormattedPrice'],
|
111
|
+
initialValue: true
|
102
112
|
}
|
103
113
|
]
|
104
114
|
}
|
@@ -184,6 +194,11 @@ export default [
|
|
184
194
|
{
|
185
195
|
type: 'TextAlign',
|
186
196
|
name: ['props', 'buttonStyle']
|
197
|
+
},
|
198
|
+
{
|
199
|
+
label: '间距',
|
200
|
+
type: 'TextSpace',
|
201
|
+
name: ['props', 'buttonStyle']
|
187
202
|
}
|
188
203
|
]
|
189
204
|
},
|
@@ -64,13 +64,16 @@ declare const _default: ({
|
|
64
64
|
})[];
|
65
65
|
name?: undefined;
|
66
66
|
options?: undefined;
|
67
|
-
}
|
67
|
+
})[];
|
68
|
+
type?: undefined;
|
69
|
+
label?: undefined;
|
70
|
+
name?: undefined;
|
71
|
+
} | {
|
72
|
+
title: string;
|
73
|
+
child: {
|
68
74
|
type: string;
|
69
75
|
name: string[];
|
70
|
-
|
71
|
-
child?: undefined;
|
72
|
-
options?: undefined;
|
73
|
-
})[];
|
76
|
+
}[];
|
74
77
|
type?: undefined;
|
75
78
|
label?: undefined;
|
76
79
|
name?: undefined;
|
@@ -68,6 +68,11 @@ export default [
|
|
68
68
|
type: 'TextAlign',
|
69
69
|
name: ['textStyle']
|
70
70
|
},
|
71
|
+
{
|
72
|
+
label: '标题间距',
|
73
|
+
type: 'TextSpace',
|
74
|
+
name: ['textStyle']
|
75
|
+
},
|
71
76
|
{
|
72
77
|
label: '表单布局',
|
73
78
|
type: 'Radius',
|
@@ -126,10 +131,12 @@ export default [
|
|
126
131
|
]
|
127
132
|
},
|
128
133
|
{
|
134
|
+
label: '提交按钮文本样式',
|
129
135
|
type: 'TextStyle',
|
130
136
|
name: ['props', 'submitButtonStyle']
|
131
137
|
},
|
132
138
|
{
|
139
|
+
label: '提交按钮对齐',
|
133
140
|
type: 'TextAlign',
|
134
141
|
name: ['props', 'submitButtonStyle']
|
135
142
|
},
|
@@ -137,6 +144,11 @@ export default [
|
|
137
144
|
label: '提交按钮颜色',
|
138
145
|
type: 'Color',
|
139
146
|
name: ['props', 'submitBgColor']
|
147
|
+
},
|
148
|
+
{
|
149
|
+
label: '提交按钮间距',
|
150
|
+
type: 'TextSpace',
|
151
|
+
name: ['props', 'submitButtonStyle']
|
140
152
|
}
|
141
153
|
]
|
142
154
|
},
|
@@ -25,7 +25,9 @@ export interface ICommodityDetailProps {
|
|
25
25
|
commodityStyles?: {
|
26
26
|
title: CSSProperties;
|
27
27
|
collection: CSSProperties;
|
28
|
-
price: CSSProperties
|
28
|
+
price: CSSProperties & {
|
29
|
+
enableFormattedPrice?: boolean;
|
30
|
+
};
|
29
31
|
info: CSSProperties;
|
30
32
|
taxInfo: CSSProperties;
|
31
33
|
};
|
@@ -12,7 +12,7 @@ import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
|
12
12
|
import { setFontForText } from '../../../../core/utils/tool';
|
13
13
|
import CommodityGroup from '../../template/components/CommodityGroup';
|
14
14
|
const CommodityDetail = (_a) => {
|
15
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
15
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
16
16
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
|
17
17
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
18
18
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -20,6 +20,7 @@ const CommodityDetail = (_a) => {
|
|
20
20
|
const [showModal, setShowModal] = useState(false);
|
21
21
|
const [show3DModal, setShow3DModal] = useState(false);
|
22
22
|
const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
23
|
+
const ref = useRef();
|
23
24
|
const data = isPost ? rec : popupDetailData;
|
24
25
|
let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
|
25
26
|
let cta = isPost
|
@@ -59,17 +60,20 @@ const CommodityDetail = (_a) => {
|
|
59
60
|
};
|
60
61
|
}, []);
|
61
62
|
const priceText = useMemo(() => {
|
62
|
-
var _a, _b, _c, _d, _e;
|
63
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
64
|
+
const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
63
65
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
64
|
-
return `${(
|
65
|
-
|
66
|
-
|
66
|
+
return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
|
67
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
68
|
+
minimumFractionDigits: 0
|
69
|
+
})) !== null && _g !== void 0 ? _g : ''
|
70
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
67
71
|
}
|
68
72
|
else {
|
69
73
|
return '$7,000';
|
70
74
|
}
|
71
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
72
|
-
const width = (isPreview ? 375 : (
|
75
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
|
76
|
+
const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
|
73
77
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
74
78
|
const renderContent = ({ isPost }) => {
|
75
79
|
var _a, _b, _c, _d;
|
@@ -110,6 +114,10 @@ const CommodityDetail = (_a) => {
|
|
110
114
|
popupCurTimeRef.current = new Date();
|
111
115
|
setCheckCommodityIndex(index);
|
112
116
|
checkCommodityIndexRef.current = index;
|
117
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
118
|
+
ref.current.swiper.slideTo(0);
|
119
|
+
ref.current.swiper.autoplay.start();
|
120
|
+
}
|
113
121
|
}, []);
|
114
122
|
const renderCommodityGroup = useCallback(() => {
|
115
123
|
var _a, _b, _c;
|
@@ -125,18 +133,18 @@ const CommodityDetail = (_a) => {
|
|
125
133
|
};
|
126
134
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
127
135
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
128
|
-
const iframeUrl = ((
|
136
|
+
const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
|
129
137
|
return (React.createElement(React.Fragment, null,
|
130
138
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
131
139
|
React.createElement("div", { style: { position: 'relative' } },
|
132
|
-
product && ((
|
140
|
+
product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
133
141
|
clickable: true,
|
134
142
|
bulletActiveClass: 'swipe-item-active-bullet',
|
135
143
|
clickableClass: getDotsAlign
|
136
144
|
}, loop: true, autoplay: {
|
137
145
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
138
|
-
} },
|
139
|
-
React.createElement(React.Fragment, null, (
|
146
|
+
}, ref: ref },
|
147
|
+
React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
140
148
|
var _a;
|
141
149
|
return (React.createElement(SwiperSlide, { key: src },
|
142
150
|
React.createElement("div", { style: {
|
@@ -152,7 +160,7 @@ const CommodityDetail = (_a) => {
|
|
152
160
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
153
161
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
154
162
|
})))),
|
155
|
-
!((
|
163
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
|
156
164
|
height,
|
157
165
|
width
|
158
166
|
}) },
|
@@ -160,21 +168,20 @@ const CommodityDetail = (_a) => {
|
|
160
168
|
objectFit: 'cover',
|
161
169
|
width: '100%',
|
162
170
|
height: '100%'
|
163
|
-
}), src: (
|
164
|
-
(iframeUrl && iframeIcon
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
171
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
172
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
173
|
+
padding: '5px 10px',
|
174
|
+
display: 'flex',
|
175
|
+
alignItems: 'center',
|
176
|
+
position: 'absolute',
|
177
|
+
right: '10px',
|
178
|
+
bottom: '10px',
|
179
|
+
zIndex: 1,
|
180
|
+
background: '#fff',
|
181
|
+
borderRadius: '3px'
|
182
|
+
}, onClick: () => setShow3DModal(true) },
|
183
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
184
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
178
185
|
renderCommodityGroup(),
|
179
186
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
180
187
|
renderBtn(),
|
@@ -147,6 +147,13 @@ declare const _default: ({
|
|
147
147
|
options?: undefined;
|
148
148
|
initialValue?: undefined;
|
149
149
|
child?: undefined;
|
150
|
+
} | {
|
151
|
+
label: string;
|
152
|
+
type: string;
|
153
|
+
name: string[];
|
154
|
+
initialValue: boolean;
|
155
|
+
options?: undefined;
|
156
|
+
child?: undefined;
|
150
157
|
})[];
|
151
158
|
}[];
|
152
159
|
} | {
|
@@ -205,6 +212,12 @@ declare const _default: ({
|
|
205
212
|
})[];
|
206
213
|
name?: undefined;
|
207
214
|
initialValue?: undefined;
|
215
|
+
} | {
|
216
|
+
label: string;
|
217
|
+
type: string;
|
218
|
+
name: string[];
|
219
|
+
initialValue?: undefined;
|
220
|
+
child?: undefined;
|
208
221
|
})[];
|
209
222
|
} | {
|
210
223
|
title: string;
|
@@ -208,6 +208,16 @@ export default [
|
|
208
208
|
label: '默认行数',
|
209
209
|
type: 'Number',
|
210
210
|
name: ['lineClamp']
|
211
|
+
},
|
212
|
+
{
|
213
|
+
label: '间距',
|
214
|
+
type: 'TextSpace'
|
215
|
+
},
|
216
|
+
{
|
217
|
+
label: '价格千分符展示',
|
218
|
+
type: 'Switch',
|
219
|
+
name: ['enableFormattedPrice'],
|
220
|
+
initialValue: true
|
211
221
|
}
|
212
222
|
]
|
213
223
|
}
|
@@ -293,6 +303,11 @@ export default [
|
|
293
303
|
{
|
294
304
|
type: 'TextAlign',
|
295
305
|
name: ['props', 'buttonStyle']
|
306
|
+
},
|
307
|
+
{
|
308
|
+
label: '间距',
|
309
|
+
type: 'TextSpace',
|
310
|
+
name: ['props', 'buttonStyle']
|
296
311
|
}
|
297
312
|
]
|
298
313
|
},
|