pb-sxp-ui 1.3.1 → 1.3.3

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 (64) hide show
  1. package/dist/index.cjs +238 -184
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +238 -184
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +238 -184
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/Modal/index.js +3 -3
  15. package/es/core/components/SxpPageRender/RenderCard.d.ts +3 -3
  16. package/es/core/components/SxpPageRender/RenderCard.js +17 -27
  17. package/es/core/components/SxpPageRender/WaterFall/List.js +20 -11
  18. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +20 -11
  19. package/es/core/components/SxpPageRender/index.js +21 -13
  20. package/es/core/context/EditorDataProvider.d.ts +3 -0
  21. package/es/core/context/EditorDataProvider.js +2 -1
  22. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  23. package/es/core/context/SxpDataSourceProvider.js +53 -35
  24. package/es/core/utils/tool.d.ts +3 -3
  25. package/es/core/utils/tool.js +6 -6
  26. package/es/materials/sxp/HashTag/index.d.ts +3 -1
  27. package/es/materials/sxp/HashTag/settingRender.d.ts +7 -0
  28. package/es/materials/sxp/HashTag/settingRender.js +6 -0
  29. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  30. package/es/materials/sxp/popup/CommodityDetail/index.js +26 -27
  31. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  32. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +30 -31
  33. package/es/materials/sxp/popup/CommodityList/index.d.ts +3 -1
  34. package/es/materials/sxp/popup/CommodityList/index.js +11 -7
  35. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
  36. package/es/materials/sxp/popup/CommodityList/settingRender.js +6 -0
  37. package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
  38. package/es/materials/sxp/popup/Iframe/index.js +8 -7
  39. package/lib/core/components/SxpPageRender/Modal/index.js +3 -3
  40. package/lib/core/components/SxpPageRender/RenderCard.d.ts +3 -3
  41. package/lib/core/components/SxpPageRender/RenderCard.js +16 -26
  42. package/lib/core/components/SxpPageRender/WaterFall/List.js +20 -11
  43. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +20 -11
  44. package/lib/core/components/SxpPageRender/index.js +21 -13
  45. package/lib/core/context/EditorDataProvider.d.ts +3 -0
  46. package/lib/core/context/EditorDataProvider.js +2 -1
  47. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  48. package/lib/core/context/SxpDataSourceProvider.js +53 -35
  49. package/lib/core/utils/tool.d.ts +3 -3
  50. package/lib/core/utils/tool.js +6 -6
  51. package/lib/materials/sxp/HashTag/index.d.ts +3 -1
  52. package/lib/materials/sxp/HashTag/settingRender.d.ts +7 -0
  53. package/lib/materials/sxp/HashTag/settingRender.js +6 -0
  54. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  55. package/lib/materials/sxp/popup/CommodityDetail/index.js +26 -27
  56. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  57. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +30 -31
  58. package/lib/materials/sxp/popup/CommodityList/index.d.ts +3 -1
  59. package/lib/materials/sxp/popup/CommodityList/index.js +11 -7
  60. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
  61. package/lib/materials/sxp/popup/CommodityList/settingRender.js +6 -0
  62. package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
  63. package/lib/materials/sxp/popup/Iframe/index.js +8 -7
  64. 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, _j, _k;
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,30 +103,36 @@ 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 ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
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;
107
111
  query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
108
- if (!(query === null || query === void 0 ? void 0 : query.channel))
109
- return;
112
+ if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
113
+ return undefined;
114
+ }
115
+ isInit.current = true;
110
116
  let list = [];
111
117
  let result = null;
112
- let pageNum = 1;
113
118
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
114
- var _l, _m, _o, _p;
119
+ var _r, _s, _t, _u, _v, _w;
115
120
  query.pageNum = pageNum;
116
121
  result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
117
122
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
118
123
  return undefined;
119
124
  }
120
- const rec = (_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.recList) === null || _m === void 0 ? void 0 : _m[0];
121
- list = list.concat((_p = (_o = result === null || result === void 0 ? void 0 : result.data) === null || _o === void 0 ? void 0 : _o.recList) !== null && _p !== void 0 ? _p : []);
122
- if ((rec === null || rec === void 0 ? void 0 : rec.product) || (rec === null || rec === void 0 ? void 0 : rec.video)) {
125
+ setLoading(false);
126
+ 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));
127
+ 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 : []);
128
+ if (isNotNullList) {
123
129
  pageNum = pageNum + 1;
124
130
  yield recurveRecList(query);
125
131
  }
126
132
  });
127
133
  yield recurveRecList(query);
128
134
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
129
- setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
135
+ 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 });
130
136
  return Object.assign(Object.assign({}, result.data), { recList: list });
131
137
  }
132
138
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -135,15 +141,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
135
141
  }
136
142
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
137
143
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
144
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
145
+ let list = [];
146
+ 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 : []);
147
+ return Object.assign(Object.assign({}, result.data), { recList: list });
148
+ }
138
149
  return result === null || result === void 0 ? void 0 : result.data;
139
- }), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
140
- const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
141
- var _q, _r, _s, _t;
150
+ }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
151
+ const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
152
+ var _x, _y, _z, _0;
142
153
  if (rtcList.length <= 0) {
143
154
  return;
144
155
  }
145
156
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
146
- const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_q = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _q === void 0 ? void 0 : _q.itemId) && { productFilter: (_r = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _r === void 0 ? void 0 : _r.itemId })), (((_s = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _s === void 0 ? void 0 : _s.itemId) && { contentFilter: (_t = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _t === void 0 ? void 0 : _t.itemId })), { themeTag: themeTag.current }));
157
+ 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 })));
147
158
  setRtcList(rtcList.concat(getFilterRecList(data)));
148
159
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
149
160
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
@@ -155,7 +166,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
155
166
  userInfo = {};
156
167
  }
157
168
  const sessionID = storeAndLoadFeSessionId();
158
- const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
169
+ 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() }));
159
170
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
160
171
  const realEventInfo = Object.entries(ef)
161
172
  .map(([k, v]) => v && { name: k, value: v })
@@ -171,24 +182,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
171
182
  });
172
183
  }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
173
184
  const bffFbReport = useCallback((_a) => {
174
- var _b, _c;
185
+ var _b, _c, _d;
175
186
  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;
176
187
  if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
177
188
  return;
178
189
  }
179
190
  const fakeUserId = storeAndLoadFeUserId();
191
+ const urlParams = new URLSearchParams(window.location.search);
192
+ const fbclid = urlParams.get('fbclid');
180
193
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
181
194
  method: 'POST',
182
195
  body: {
183
196
  eventName,
184
197
  actionSource,
185
198
  eventSourceUrl,
186
- userData: {
187
- externalId: fakeUserId,
188
- fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
189
- fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
190
- client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
191
- }
199
+ 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 : '' })
192
200
  },
193
201
  type: 'beacon'
194
202
  });
@@ -206,17 +214,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
206
214
  return res === null || res === void 0 ? void 0 : res.success;
207
215
  }), [bffFetch]);
208
216
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
209
- var _u, _v, _w, _x, _y;
217
+ var _1, _2, _3, _4, _5;
210
218
  if (!utmVal || !isShowTag)
211
219
  return;
212
220
  try {
213
- const val = (_w = (_v = (_u = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _u === void 0 ? void 0 : _u.filter((val) => {
221
+ const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
214
222
  var _a, _b;
215
223
  const key = val.split('=')[0];
216
224
  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);
217
- })) === null || _v === void 0 ? void 0 : _v.join('&')) !== null && _w !== void 0 ? _w : '';
225
+ })) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
218
226
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
219
- setTagList((_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.tags) !== null && _y !== void 0 ? _y : []);
227
+ 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 : []);
220
228
  }
221
229
  catch (e) {
222
230
  console.log('e', e);
@@ -278,8 +286,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
278
286
  bffGetTagList();
279
287
  getRecommendVideos()
280
288
  .then((data) => {
281
- setRtcList(getFilterRecList(data));
282
- setCacheRtcList(getFilterRecList(data));
289
+ if (data) {
290
+ setRtcList(getFilterRecList(data));
291
+ setCacheRtcList(getFilterRecList(data));
292
+ }
283
293
  })
284
294
  .finally(() => {
285
295
  bffEventReport({
@@ -289,23 +299,30 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
289
299
  }
290
300
  });
291
301
  setLoading(false);
292
- isInit.current = true;
293
302
  });
294
303
  }, [isShowConsent]);
295
304
  useEffect(() => {
296
- if (!isInit.current && !isEditor)
305
+ if (!isPreview)
297
306
  return;
298
307
  setLoading(true);
299
308
  bffGetTagList();
300
309
  getRecommendVideos()
301
310
  .then((data) => {
302
- setRtcList(getFilterRecList(data));
303
- setCacheRtcList(getFilterRecList(data));
311
+ if (data) {
312
+ setRtcList(getFilterRecList(data));
313
+ setCacheRtcList(getFilterRecList(data));
314
+ }
304
315
  })
305
316
  .finally(() => {
317
+ bffEventReport({
318
+ eventInfo: {
319
+ eventSubject: 'apiRequest',
320
+ eventDescription: 'api request succeed'
321
+ }
322
+ });
306
323
  setLoading(false);
307
324
  });
308
- }, [bffGetTagList, isEditor, getRecommendVideos]);
325
+ }, [getRecommendVideos, bffGetTagList]);
309
326
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
310
327
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
311
328
  rtcList,
@@ -353,7 +370,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
353
370
  setSelectTag,
354
371
  globalConfig,
355
372
  popupCurTimeRef,
356
- checkCommodityIndexRef
373
+ checkCommodityIndexRef,
374
+ isEditor
357
375
  } }, 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({
358
376
  rtcList,
359
377
  mutateLike: bffMutateLike,
@@ -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 };
@@ -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 'Unknown';
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 'Unknown';
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 'Unknown';
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 'Unknown';
125
+ return null;
126
126
  }
127
127
  function getDevice() {
128
128
  let userAgent = self.navigator.userAgent;
129
129
  if (!userAgent)
130
- return 'Unknown';
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 'Unknown';
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;
@@ -61,6 +61,13 @@ declare const _default: ({
61
61
  name?: undefined;
62
62
  initialValue?: undefined;
63
63
  child?: undefined;
64
+ } | {
65
+ label: string;
66
+ type: string;
67
+ name: string[];
68
+ initialValue: boolean;
69
+ options?: undefined;
70
+ child?: undefined;
64
71
  })[];
65
72
  }[];
66
73
  } | {
@@ -103,6 +103,12 @@ export default [
103
103
  {
104
104
  label: '间距',
105
105
  type: 'TextSpace'
106
+ },
107
+ {
108
+ label: '价格千分符展示',
109
+ type: 'Switch',
110
+ name: ['enableFormattedPrice'],
111
+ initialValue: true
106
112
  }
107
113
  ]
108
114
  }
@@ -47,6 +47,7 @@ export interface ICommodityDetailProps {
47
47
  w: number;
48
48
  h: number;
49
49
  };
50
+ isTel?: boolean;
50
51
  }
51
52
  declare const _default: React.NamedExoticComponent<ICommodityDetailProps>;
52
53
  export default _default;
@@ -12,8 +12,8 @@ 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, _5;
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"]);
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;
16
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
17
17
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
18
18
  const { jumpToWeb, productView } = useEventReport();
19
19
  const curTimeRef = useRef(null);
@@ -133,18 +133,18 @@ const CommodityDetail = (_a) => {
133
133
  };
134
134
  return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
135
135
  }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
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);
136
+ const iframeUrl = isPost ? (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.remark : (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProduct) === null || _y === void 0 ? void 0 : _y.remark;
137
137
  return (React.createElement(React.Fragment, null,
138
138
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
139
139
  React.createElement("div", { style: { position: 'relative' } },
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: {
140
+ product && ((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
141
141
  clickable: true,
142
142
  bulletActiveClass: 'swipe-item-active-bullet',
143
143
  clickableClass: getDotsAlign
144
144
  }, loop: true, autoplay: {
145
145
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
146
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) => {
147
+ React.createElement(React.Fragment, null, (_0 = product === null || product === void 0 ? void 0 : product.homePage) === null || _0 === void 0 ? void 0 : _0.map((src) => {
148
148
  var _a;
149
149
  return (React.createElement(SwiperSlide, { key: src },
150
150
  React.createElement("div", { style: {
@@ -160,7 +160,7 @@ const CommodityDetail = (_a) => {
160
160
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
161
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 }))));
162
162
  })))),
163
- !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
163
+ !((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) && (React.createElement("div", { className: css({
164
164
  height,
165
165
  width
166
166
  }) },
@@ -168,21 +168,19 @@ const CommodityDetail = (_a) => {
168
168
  objectFit: 'cover',
169
169
  width: '100%',
170
170
  height: '100%'
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 && iframeIcon) ||
173
- (!product && iframeIcon && (React.createElement("div", { style: {
174
- padding: '5px 10px',
175
- display: 'flex',
176
- alignItems: 'center',
177
- position: 'absolute',
178
- right: '10px',
179
- bottom: '10px',
180
- zIndex: 1,
181
- background: '#fff',
182
- borderRadius: '3px'
183
- }, onClick: () => setShow3DModal(true) },
184
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
185
- React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
171
+ }), src: (_2 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _2 !== void 0 ? _2 : 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' } })))),
186
184
  renderCommodityGroup(),
187
185
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
188
186
  renderBtn(),
@@ -190,11 +188,12 @@ const CommodityDetail = (_a) => {
190
188
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
191
189
  renderBtn()),
192
190
  React.createElement(Modal, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
193
- React.createElement("iframe", { src: iframeUrl, style: {
194
- width: '100%',
195
- height: 'calc(100% - 50px)',
196
- marginTop: '40px',
197
- border: 'none'
198
- } }))));
191
+ React.createElement("div", { style: { height: '100vh' } },
192
+ React.createElement("iframe", { src: iframeUrl, style: {
193
+ width: '100%',
194
+ height: isTel ? `${664 - 40}px` : `calc(100vh - 40px)`,
195
+ marginTop: '40px',
196
+ border: 'none'
197
+ } })))));
199
198
  };
200
199
  export default memo(CommodityDetail);
@@ -47,6 +47,7 @@ export interface ICommodityDetailDiroNewProps {
47
47
  w: number;
48
48
  h: number;
49
49
  };
50
+ isTel?: boolean;
50
51
  }
51
52
  declare const _default: React.NamedExoticComponent<ICommodityDetailDiroNewProps>;
52
53
  export default _default;
@@ -12,8 +12,8 @@ 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 CommodityDetailDiroNew = (_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, _5, _6, _7, _8, _9;
16
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
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, _6;
16
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
17
17
  const [spread, setSpread] = useState(true);
18
18
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
19
19
  const { jumpToWeb, productView } = useEventReport();
@@ -117,17 +117,17 @@ Made in Italy` })));
117
117
  };
118
118
  return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
119
119
  }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
120
- 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);
120
+ const iframeUrl = isPost ? (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.remark : (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProduct) === null || _y === void 0 ? void 0 : _y.remark;
121
121
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
122
122
  React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
123
123
  React.createElement("div", { style: { position: 'relative' } },
124
- 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: {
124
+ product && ((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
125
125
  clickable: true,
126
126
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
127
127
  clickableClass: getDotsAlign
128
128
  }, loop: true, autoplay: {
129
129
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
130
- }, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
130
+ }, ref: ref }, (_0 = product === null || product === void 0 ? void 0 : product.homePage) === null || _0 === void 0 ? void 0 : _0.map((src) => {
131
131
  var _a;
132
132
  return (React.createElement(SwiperSlide, { key: src },
133
133
  React.createElement("div", { style: {
@@ -143,7 +143,7 @@ Made in Italy` })));
143
143
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
144
144
  }, 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 }))));
145
145
  }))),
146
- !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
146
+ !((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) && (React.createElement("div", { className: css({
147
147
  height,
148
148
  width
149
149
  }) },
@@ -151,27 +151,25 @@ Made in Italy` })));
151
151
  objectFit: 'cover',
152
152
  width: '100%',
153
153
  height: '100%'
154
- }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
155
- (iframeUrl && iframeIcon) ||
156
- (!product && iframeIcon && (React.createElement("div", { style: {
157
- padding: '5px 10px',
158
- display: 'flex',
159
- alignItems: 'center',
160
- position: 'absolute',
161
- right: '10px',
162
- bottom: '10px',
163
- zIndex: 1,
164
- background: '#fff',
165
- borderRadius: '3px'
166
- }, onClick: () => setShow3DModal(true) },
167
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
168
- React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
154
+ }), src: (_2 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _2 !== void 0 ? _2 : bottom_image, alt: 'pdp image' }))),
155
+ (iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
156
+ padding: '5px 10px',
157
+ display: 'flex',
158
+ alignItems: 'center',
159
+ position: 'absolute',
160
+ right: '10px',
161
+ bottom: '10px',
162
+ zIndex: 1,
163
+ background: '#fff',
164
+ borderRadius: '3px'
165
+ }, onClick: () => setShow3DModal(true) },
166
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } })))),
169
167
  renderCommodityGroup(),
170
168
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
171
169
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
172
170
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
173
171
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
174
- __html: setFontForText((_6 = product === null || product === void 0 ? void 0 : product.title) !== null && _6 !== void 0 ? _6 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
172
+ __html: setFontForText((_3 = product === null || product === void 0 ? void 0 : product.title) !== null && _3 !== void 0 ? _3 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
175
173
  } }),
176
174
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
177
175
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -181,20 +179,21 @@ Made in Italy` })));
181
179
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
182
180
  } }),
183
181
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
184
- __html: setFontForText((_7 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _7 !== void 0 ? _7 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
182
+ __html: setFontForText((_4 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _4 !== void 0 ? _4 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
185
183
  } }))),
186
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_8 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _8 !== void 0 ? _8 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
184
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_5 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _5 !== void 0 ? _5 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
187
185
  React.createElement("span", { dangerouslySetInnerHTML: {
188
- __html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
186
+ __html: setFontForText((_6 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _6 !== void 0 ? _6 : 'Shop now', buttonStyle)
189
187
  } }))),
190
188
  productInfoText({ isPost }))),
191
189
  React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
192
190
  React.createElement(Modal, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
193
- React.createElement("iframe", { src: iframeUrl, style: {
194
- width: '100%',
195
- height: 'calc(100% - 50px)',
196
- marginTop: '40px',
197
- border: 'none'
198
- } }))));
191
+ React.createElement("div", { style: { height: '100vh' } },
192
+ React.createElement("iframe", { src: iframeUrl, style: {
193
+ width: '100%',
194
+ height: isTel ? `${664 - 40}px` : `calc(100vh - 40px)`,
195
+ marginTop: '40px',
196
+ border: 'none'
197
+ } })))));
199
198
  };
200
199
  export default memo(CommodityDetailDiroNew);
@@ -16,7 +16,9 @@ export interface ICommodityListProps {
16
16
  commodityStyles?: {
17
17
  title: CSSProperties;
18
18
  collection: CSSProperties;
19
- price: CSSProperties;
19
+ price: CSSProperties & {
20
+ enableFormattedPrice?: boolean;
21
+ };
20
22
  };
21
23
  buttonStyle?: CSSProperties;
22
24
  translateY?: number;
@@ -8,7 +8,7 @@ import { setFontForText } from '../../../../core/utils/tool';
8
8
  import Img from '../../template/components/Img';
9
9
  import { throttle } from 'lodash';
10
10
  const CommodityList = (_a) => {
11
- var _b, _c;
11
+ var _b, _c, _d;
12
12
  var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
13
13
  const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
14
14
  const { jumpToWeb } = useEventReport();
@@ -17,16 +17,20 @@ const CommodityList = (_a) => {
17
17
  const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
18
18
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
19
19
  const priceText = useCallback((product) => {
20
- var _a, _b, _c, _d, _e;
20
+ var _a, _b, _c, _d, _e, _f, _g;
21
+ 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);
21
22
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
22
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
23
- minimumFractionDigits: 0
24
- })) !== null && _e !== void 0 ? _e : ''}`;
23
+ 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
24
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
25
+ minimumFractionDigits: 0
26
+ })) !== null && _g !== void 0 ? _g : ''
27
+ : product === null || product === void 0 ? void 0 : product.price}`;
25
28
  }
26
29
  else {
27
- return '$7,000';
30
+ const p = 7000;
31
+ return `$${isToLocStr ? p === null || p === void 0 ? void 0 : p.toLocaleString() : p}`;
28
32
  }
29
- }, []);
33
+ }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
30
34
  const handleClick = throttle((item, multiCheckIndex) => {
31
35
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
32
36
  eventSubject: 'clickCta',