pb-sxp-ui 1.4.4 → 1.5.1

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 (91) hide show
  1. package/dist/index.cjs +171 -125
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +171 -125
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +171 -125
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/WaterFall/List.js +7 -15
  14. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
  15. package/es/core/components/SxpPageRender/index.d.ts +6 -0
  16. package/es/core/components/SxpPageRender/index.js +2 -0
  17. package/es/core/context/SxpDataSourceProvider.js +2 -0
  18. package/es/core/utils/materials.d.ts +7 -0
  19. package/es/core/utils/materials.js +54 -0
  20. package/es/materials/sxp/HashTag/settingRender.d.ts +5 -0
  21. package/es/materials/sxp/HashTag/settingRender.js +2 -1
  22. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
  23. package/es/materials/sxp/cta/AniLink/interactionRender.js +2 -1
  24. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
  25. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
  26. package/es/materials/sxp/popup/CommodityDetail/index.js +7 -15
  27. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
  28. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
  31. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
  32. package/es/materials/sxp/popup/CommodityList/index.js +9 -15
  33. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
  34. package/es/materials/sxp/popup/CommodityList/settingRender.js +2 -1
  35. package/es/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
  36. package/es/materials/sxp/template/Appoint/interactionRender.js +2 -1
  37. package/es/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
  38. package/es/materials/sxp/template/Commodity/interactionRender.js +2 -1
  39. package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
  40. package/es/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
  41. package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
  42. package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
  43. package/es/materials/sxp/template/Link/interactionRender.d.ts +1 -0
  44. package/es/materials/sxp/template/Link/interactionRender.js +2 -1
  45. package/es/materials/sxp/template/Link/material.js +1 -1
  46. package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
  47. package/es/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
  48. package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
  49. package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
  50. package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
  51. package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
  52. package/lib/core/components/SxpPageRender/WaterFall/List.js +7 -15
  53. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
  54. package/lib/core/components/SxpPageRender/index.d.ts +6 -0
  55. package/lib/core/components/SxpPageRender/index.js +2 -0
  56. package/lib/core/context/SxpDataSourceProvider.js +2 -0
  57. package/lib/core/utils/materials.d.ts +7 -0
  58. package/lib/core/utils/materials.js +56 -1
  59. package/lib/materials/sxp/HashTag/settingRender.d.ts +5 -0
  60. package/lib/materials/sxp/HashTag/settingRender.js +2 -1
  61. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
  62. package/lib/materials/sxp/cta/AniLink/interactionRender.js +2 -1
  63. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
  64. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
  65. package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -15
  66. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
  67. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
  68. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
  69. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
  70. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
  71. package/lib/materials/sxp/popup/CommodityList/index.js +9 -15
  72. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
  73. package/lib/materials/sxp/popup/CommodityList/settingRender.js +2 -1
  74. package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
  75. package/lib/materials/sxp/template/Appoint/interactionRender.js +2 -1
  76. package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
  77. package/lib/materials/sxp/template/Commodity/interactionRender.js +2 -1
  78. package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
  79. package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
  80. package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
  81. package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
  82. package/lib/materials/sxp/template/Link/interactionRender.d.ts +1 -0
  83. package/lib/materials/sxp/template/Link/interactionRender.js +2 -1
  84. package/lib/materials/sxp/template/Link/material.js +1 -1
  85. package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
  86. package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
  87. package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
  88. package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
  89. package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
  90. package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
  91. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -747,6 +747,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
747
747
  }
748
748
  setLoading(false);
749
749
  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 : []);
750
+ setRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
751
+ setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
750
752
  const isNotNullList = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
751
753
  if (isNotNullList) {
752
754
  pageNum = pageNum + 1;
@@ -1923,7 +1925,8 @@ var settingRender$9 = [
1923
1925
  label: '价格千分符展示',
1924
1926
  type: 'Switch',
1925
1927
  name: ['enableFormattedPrice'],
1926
- initialValue: true
1928
+ initialValue: true,
1929
+ belong: 'price'
1927
1930
  }
1928
1931
  ]
1929
1932
  }
@@ -9198,10 +9201,97 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
9198
9201
  };
9199
9202
  var CommodityGroup$1 = React.memo(CommodityGroup);
9200
9203
 
9204
+ /*
9205
+ * @Author: binruan@chatlabs.com
9206
+ * @Date: 2024-03-20 14:56:16
9207
+ * @LastEditors: binruan@chatlabs.com
9208
+ * @LastEditTime: 2024-09-13 15:06:44
9209
+ * @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
9210
+ *
9211
+ */
9212
+ /*
9213
+ * @Author: binruan@chatlabs.com
9214
+ * @Date: 2023-08-03 16:37:37
9215
+ * @LastEditors: binruan@chatlabs.com
9216
+ * @LastEditTime: 2023-08-04 11:02:50
9217
+ * @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
9218
+ *
9219
+ */
9220
+ const getMediaValueByMode = (obj) => {
9221
+ var _a;
9222
+ if (!obj || typeof obj !== 'object') {
9223
+ return null;
9224
+ }
9225
+ const { mode, link, file, src } = obj;
9226
+ switch (mode) {
9227
+ case 2:
9228
+ return link || null;
9229
+ case 3:
9230
+ return src || null;
9231
+ default:
9232
+ return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
9233
+ }
9234
+ };
9235
+ const getPriceText = ({ product, enableFormattedPrice, globalConfig }) => {
9236
+ var _a, _b, _c, _d, _e;
9237
+ let price = (product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price) ? product === null || product === void 0 ? void 0 : product.price : 7000;
9238
+ let text = '';
9239
+ let priceSymbol = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.priceSymbol;
9240
+ let currency = (product === null || product === void 0 ? void 0 : product.currency) ? (_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 : '' : '$';
9241
+ const isToLocStr = enableFormattedPrice === undefined || enableFormattedPrice;
9242
+ let decPic = price.toString();
9243
+ if (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) {
9244
+ decPic = price === null || price === void 0 ? void 0 : price.toFixed(2);
9245
+ }
9246
+ let decInd = (_d = decPic === null || decPic === void 0 ? void 0 : decPic.indexOf('.')) !== null && _d !== void 0 ? _d : -1;
9247
+ if (isToLocStr) {
9248
+ text =
9249
+ (_e = price === null || price === void 0 ? void 0 : price.toLocaleString('zh', {
9250
+ minimumFractionDigits: (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) ? 2 : 0
9251
+ })) !== null && _e !== void 0 ? _e : '';
9252
+ let startIndex = 0;
9253
+ let endIndex = decInd !== null && decInd !== void 0 ? decInd : text === null || text === void 0 ? void 0 : text.length;
9254
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) === '.') {
9255
+ text = text === null || text === void 0 ? void 0 : text.replace(/\,/g, function (match, index) {
9256
+ if (index >= startIndex && index < endIndex) {
9257
+ return '.';
9258
+ }
9259
+ else {
9260
+ return match;
9261
+ }
9262
+ });
9263
+ }
9264
+ else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) === ' ') {
9265
+ text = text === null || text === void 0 ? void 0 : text.replace(',', ' ');
9266
+ }
9267
+ }
9268
+ else {
9269
+ text = `${(priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) ? price === null || price === void 0 ? void 0 : price.toFixed(2) : price}`;
9270
+ }
9271
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.decimalPoint) === ',' && decInd > 0) {
9272
+ // text = text.slice(0, decInd) + ',' + text.slice(decInd + 1);
9273
+ text = text = text === null || text === void 0 ? void 0 : text.replace(/\./g, function (match, index) {
9274
+ if (index >= decInd && index < (text === null || text === void 0 ? void 0 : text.length)) {
9275
+ return ',';
9276
+ }
9277
+ else {
9278
+ return match;
9279
+ }
9280
+ });
9281
+ }
9282
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) && (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
9283
+ text = (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) === 'left' ? currency + text : text + currency;
9284
+ }
9285
+ else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
9286
+ text = currency + text;
9287
+ }
9288
+ return text;
9289
+ };
9290
+
9201
9291
  const CommodityDetail$1 = (_a) => {
9202
9292
  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;
9203
9293
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor } = _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", "iframeBgColor"]);
9204
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
9294
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
9205
9295
  const { jumpToWeb, productView } = useEventReport();
9206
9296
  const curTimeRef = React.useRef(null);
9207
9297
  const [showModal, setShowModal] = React.useState(false);
@@ -9246,20 +9336,11 @@ const CommodityDetail$1 = (_a) => {
9246
9336
  window.removeEventListener('pageshow', initTime);
9247
9337
  };
9248
9338
  }, []);
9249
- const priceText = React.useMemo(() => {
9250
- var _a, _b, _c, _d, _e, _f, _g;
9251
- 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);
9252
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9253
- 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
9254
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9255
- minimumFractionDigits: 0
9256
- })) !== null && _g !== void 0 ? _g : ''
9257
- : product === null || product === void 0 ? void 0 : product.price}`;
9258
- }
9259
- else {
9260
- return '$7,000';
9261
- }
9262
- }, [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]);
9339
+ const priceText = getPriceText({
9340
+ product: product,
9341
+ enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
9342
+ globalConfig
9343
+ });
9263
9344
  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;
9264
9345
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9265
9346
  const renderContent = ({ isPost }) => {
@@ -9639,38 +9720,6 @@ var settingRender$8 = [
9639
9720
 
9640
9721
  var img$3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABHBJREFUeF7lmzuoFkcYhp/TihdIl0JBESubSCCCih4NXgJeUphCjyKmEEVtLRSjooWtShILRRJtgpCoeLzgLUZBQbTwAoooqLWoCWIXeZdd3bP++8/st7OX33+ac2Dn8r3Pvzv7zcy7A9RT5gDjgQnx3/T/iuA58Cz+m/7/StXhDVQ0gATOBhYCi4GxxnHeAKeAs8DfMSBjV52bhQTwBbApFj4YNMqPnV0GrgL7gJchxggFQMI3A5NDBOXRx+MYwn6Pul2rlAWwMv7VvykbiLH9TUAQjhnbYwUwA9gKLLIOHLjdGWAPcL1ovxYAG4G9wKiig1Vc/y2wBThQZJyiAA4Ba4sM0EDdw8CPvuMWAXAb+Mq344br3QGm+cTgC+B/n85aWMepz1kBOBknMy3U5wxJSdSSbrVcAPR+V9LRy0X5SW6+0A3AMuDPXlaeiv174K9OWvIAfA1cAMZ9JgBeA98Ct7J68gAMtyjJCfUbKFn6zgeA0tujoUZtWT9D2bS50x1wA2gqt6+al9YO09ODZAF8DrO+C+KIt0IagNbzIlTXktYVaKfr9+PNkSklchMtpXWHR/sJaQA7gJ8sUdXURuJ/AB7E4/0BLDeOvROQ3hEA/gFmGjusullWfDKeFcI1YFYawETgSdUqjP3niS8LYRLwNHkE1gM/GwOssplLfBkIG4BfEgBKE5dWqcTQt694da1td22YFikngGUJgH+B0UVaV1y3iHiFYpnA/wPGCICFXpX66xCfxD8oAKuA3wIpegToHW0tdYpXjKsFQLu7u60Rx+3exSCPG29HdVO3eI25TQB+BdaVAKCMSneRVpBJKfpMNiFesR4UgNOdlomeQF4AWj3quCpbfCE0JV7xDgvAXWCqp+B0tYfACkC7xXnFBaFJ8Yr5ngC8Mu78KHnS4+MqeRCaFq+4X5cB8MnmQoE7oQ3iPwCwPgJWEdZ2rjvNcj16BMpMghYxWsElS1pX0K45xNXedT2aBMu+BotCcAVlfZX69puuF70GQyRCoSFU/csnEKJEKFQqHApCXeIFIUqFQy6GykKoU7wARIuh6HVQwsmVffasEOoWLwfauASADkKU0oYqRSHULV465SsaSgAoqfk9lPq4H18ITYhXiJr7jiYAZGyUUzN0cUFoSrx0yrX6PH0ucEmTQmgCXdb5TYrX/uFcaa3rYCR7JzQpXro1vg5HRgCo+mhMEOT3/RKQYaGpkns0poD6+nA0+UX6+nhcEPreICEIfW2REQCZoc+30A9snTjlI57fyUzdzSYnU3RpP7414sDtNLl3NFG7jJK9YI52sepqnnYBUOe9ZJLOwnCapn0AqNO+NksnVHvJNO00SSeifO+ApH4vZIpdzdHZZ6QoALWXifqI8TTJNWGVua5drTV5pui8ji0A1JfM1Lta5CeWD3h7JzO0i6gVQNJv3342lwXbtx9OpkFoP0ET0LwKDZcyOF5s46ez2TtCxkt9OL0gBmJ1oMnJJcHnYo/wU9czXfR62TnAd7zWfj7/HrAAAKDnDZ8VAAAAAElFTkSuQmCC";
9641
9722
 
9642
- /*
9643
- * @Author: binruan@chatlabs.com
9644
- * @Date: 2024-03-20 14:56:16
9645
- * @LastEditors: binruan@chatlabs.com
9646
- * @LastEditTime: 2024-03-20 14:56:22
9647
- * @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
9648
- *
9649
- */
9650
- /*
9651
- * @Author: binruan@chatlabs.com
9652
- * @Date: 2023-08-03 16:37:37
9653
- * @LastEditors: binruan@chatlabs.com
9654
- * @LastEditTime: 2023-08-04 11:02:50
9655
- * @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
9656
- *
9657
- */
9658
- const getMediaValueByMode = (obj) => {
9659
- var _a;
9660
- if (!obj || typeof obj !== 'object') {
9661
- return null;
9662
- }
9663
- const { mode, link, file, src } = obj;
9664
- switch (mode) {
9665
- case 2:
9666
- return link || null;
9667
- case 3:
9668
- return src || null;
9669
- default:
9670
- return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
9671
- }
9672
- };
9673
-
9674
9723
  const Prompt$1 = (_a) => {
9675
9724
  var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle"]);
9676
9725
  const { popupDetailData } = useSxpDataSource();
@@ -9935,7 +9984,8 @@ var settingRender$7 = [
9935
9984
  label: '价格千分符展示',
9936
9985
  type: 'Switch',
9937
9986
  name: ['enableFormattedPrice'],
9938
- initialValue: true
9987
+ initialValue: true,
9988
+ belong: 'price'
9939
9989
  }
9940
9990
  ]
9941
9991
  }
@@ -10084,7 +10134,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
10084
10134
  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;
10085
10135
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor"]);
10086
10136
  React.useState(true);
10087
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
10137
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
10088
10138
  const { jumpToWeb, productView } = useEventReport();
10089
10139
  React.useState(false);
10090
10140
  React.useState(false);
@@ -10132,20 +10182,11 @@ const CommodityDetailDiroNew$1 = (_a) => {
10132
10182
  window.removeEventListener('pageshow', initTime);
10133
10183
  };
10134
10184
  }, []);
10135
- const priceText = React.useMemo(() => {
10136
- var _a, _b, _c, _d, _e, _f, _g;
10137
- 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);
10138
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10139
- 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
10140
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10141
- minimumFractionDigits: 0
10142
- })) !== null && _g !== void 0 ? _g : ''
10143
- : product === null || product === void 0 ? void 0 : product.price}`;
10144
- }
10145
- else {
10146
- return '£102,300.00';
10147
- }
10148
- }, [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]);
10185
+ const priceText = getPriceText({
10186
+ product,
10187
+ enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
10188
+ globalConfig
10189
+ });
10149
10190
  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;
10150
10191
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
10151
10192
  // useEffect(() => {
@@ -10577,7 +10618,8 @@ var settingRender$6 = [
10577
10618
  label: '价格千分符展示',
10578
10619
  type: 'Switch',
10579
10620
  name: ['enableFormattedPrice'],
10580
- initialValue: true
10621
+ initialValue: true,
10622
+ belong: 'price'
10581
10623
  }
10582
10624
  ]
10583
10625
  }
@@ -10732,27 +10774,20 @@ var Img$1 = React.memo(Img);
10732
10774
  const CommodityList$1 = (_a) => {
10733
10775
  var _b, _c, _d;
10734
10776
  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"]);
10735
- const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10777
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
10736
10778
  const { jumpToWeb } = useEventReport();
10737
10779
  const { popup } = useEditor();
10738
10780
  const recData = isPost ? rec : popupDetailData;
10739
10781
  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];
10740
10782
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10741
10783
  const priceText = React.useCallback((product) => {
10742
- var _a, _b, _c, _d, _e, _f, _g;
10743
- 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);
10744
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10745
- 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
10746
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10747
- minimumFractionDigits: 0
10748
- })) !== null && _g !== void 0 ? _g : ''
10749
- : product === null || product === void 0 ? void 0 : product.price}`;
10750
- }
10751
- else {
10752
- const p = 7000;
10753
- return `$${isToLocStr ? p.toLocaleString() : p}`;
10754
- }
10755
- }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
10784
+ var _a;
10785
+ return getPriceText({
10786
+ product,
10787
+ enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
10788
+ globalConfig
10789
+ });
10790
+ }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
10756
10791
  const handleClick = lodash.throttle((item, multiCheckIndex) => {
10757
10792
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10758
10793
  eventSubject: 'clickCta',
@@ -11209,7 +11244,8 @@ var interactionRender$9 = [
11209
11244
  child: [
11210
11245
  {
11211
11246
  type: 'link',
11212
- name: 'onClick'
11247
+ name: 'onClick',
11248
+ hiddenUrl: true
11213
11249
  }
11214
11250
  ]
11215
11251
  }
@@ -11334,7 +11370,8 @@ var interactionRender$8 = [
11334
11370
  child: [
11335
11371
  {
11336
11372
  type: 'link',
11337
- name: 'onClick'
11373
+ name: 'onClick',
11374
+ hiddenUrl: true
11338
11375
  }
11339
11376
  ]
11340
11377
  }
@@ -11552,7 +11589,7 @@ var LinkComponent = React.memo(Link$1);
11552
11589
  * @Author: binruan@chatlabs.com
11553
11590
  * @Date: 2024-08-09 16:59:38
11554
11591
  * @LastEditors: binruan@chatlabs.com
11555
- * @LastEditTime: 2024-08-09 16:59:44
11592
+ * @LastEditTime: 2024-09-09 13:59:50
11556
11593
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11557
11594
  *
11558
11595
  */
@@ -11562,7 +11599,8 @@ var interactionRender$7 = [
11562
11599
  child: [
11563
11600
  {
11564
11601
  type: 'link',
11565
- name: 'onClick'
11602
+ name: 'onClick',
11603
+ hiddenUrl: true
11566
11604
  }
11567
11605
  ]
11568
11606
  }
@@ -11570,7 +11608,7 @@ var interactionRender$7 = [
11570
11608
 
11571
11609
  var _a;
11572
11610
  const Link = createMaterial(LinkComponent, {
11573
- displayName: '跳转指引',
11611
+ displayName: '普通CTA',
11574
11612
  icon: '',
11575
11613
  category: 'template',
11576
11614
  type: 'Link',
@@ -11629,7 +11667,8 @@ var interactionRender$6 = [
11629
11667
  child: [
11630
11668
  {
11631
11669
  type: 'link',
11632
- name: 'onClick'
11670
+ name: 'onClick',
11671
+ hiddenUrl: true
11633
11672
  }
11634
11673
  ]
11635
11674
  }
@@ -11724,7 +11763,8 @@ var interactionRender$5 = [
11724
11763
  child: [
11725
11764
  {
11726
11765
  type: 'link',
11727
- name: 'onClick'
11766
+ name: 'onClick',
11767
+ hiddenUrl: true
11728
11768
  }
11729
11769
  ]
11730
11770
  }
@@ -11820,7 +11860,8 @@ var interactionRender$4 = [
11820
11860
  child: [
11821
11861
  {
11822
11862
  type: 'link',
11823
- name: 'onClick'
11863
+ name: 'onClick',
11864
+ hiddenUrl: true
11824
11865
  }
11825
11866
  ]
11826
11867
  }
@@ -11935,7 +11976,8 @@ var interactionRender$3 = [
11935
11976
  child: [
11936
11977
  {
11937
11978
  type: 'link',
11938
- name: 'onClick'
11979
+ name: 'onClick',
11980
+ hiddenUrl: true
11939
11981
  }
11940
11982
  ]
11941
11983
  }
@@ -12045,13 +12087,22 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
12045
12087
  sort: 3
12046
12088
  });
12047
12089
 
12090
+ /*
12091
+ * @Author: binruan@chatlabs.com
12092
+ * @Date: 2024-03-20 10:27:32
12093
+ * @LastEditors: binruan@chatlabs.com
12094
+ * @LastEditTime: 2024-09-09 13:56:10
12095
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
12096
+ *
12097
+ */
12048
12098
  var interactionRender$2 = [
12049
12099
  {
12050
12100
  title: '点击事件',
12051
12101
  child: [
12052
12102
  {
12053
12103
  type: 'link',
12054
- name: 'onClick'
12104
+ name: 'onClick',
12105
+ hiddenUrl: true
12055
12106
  }
12056
12107
  ]
12057
12108
  }
@@ -12281,7 +12332,8 @@ var settingRender$3 = [
12281
12332
  label: '价格千分符展示',
12282
12333
  type: 'Switch',
12283
12334
  name: ['enableFormattedPrice'],
12284
- initialValue: true
12335
+ initialValue: true,
12336
+ belong: 'price'
12285
12337
  }
12286
12338
  ]
12287
12339
  }
@@ -13704,7 +13756,7 @@ var previewData = {
13704
13756
  const WaterfallFlowItem$1 = (props) => {
13705
13757
  var _a;
13706
13758
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
13707
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13759
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
13708
13760
  const [showVideo, setShowVideo] = React.useState(false);
13709
13761
  React.useState(false);
13710
13762
  React.useState({
@@ -13755,20 +13807,11 @@ const WaterfallFlowItem$1 = (props) => {
13755
13807
  return false;
13756
13808
  }
13757
13809
  }, [top, showBorder]);
13758
- const priceText = React.useMemo(() => {
13759
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13760
- const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
13761
- if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
13762
- return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
13763
- ? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
13764
- minimumFractionDigits: 0
13765
- })) !== null && _l !== void 0 ? _l : ''
13766
- : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
13767
- }
13768
- else {
13769
- return null;
13770
- }
13771
- }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
13810
+ const priceText = getPriceText({
13811
+ product: rec === null || rec === void 0 ? void 0 : rec.product,
13812
+ enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
13813
+ globalConfig
13814
+ });
13772
13815
  React.useEffect(() => {
13773
13816
  if (imgDom.current === null || src === '') {
13774
13817
  return;
@@ -14054,7 +14097,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
14054
14097
  const WaterfallFlowItem = (props) => {
14055
14098
  var _a;
14056
14099
  const { rec, index, list, reportTagsView, textStyles, space } = props;
14057
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
14100
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
14058
14101
  const [showVideo, setShowVideo] = React.useState(false);
14059
14102
  const imgDom = React.useRef(null);
14060
14103
  const ref = React.useRef(null);
@@ -14080,20 +14123,11 @@ const WaterfallFlowItem = (props) => {
14080
14123
  var _a, _b;
14081
14124
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.title) || ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) || null;
14082
14125
  }, [rec]);
14083
- const priceText = React.useMemo(() => {
14084
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
14085
- const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
14086
- if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
14087
- return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
14088
- ? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
14089
- minimumFractionDigits: 0
14090
- })) !== null && _l !== void 0 ? _l : ''
14091
- : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
14092
- }
14093
- else {
14094
- return null;
14095
- }
14096
- }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
14126
+ const priceText = getPriceText({
14127
+ product: rec === null || rec === void 0 ? void 0 : rec.product,
14128
+ enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
14129
+ globalConfig
14130
+ });
14097
14131
  // useEffect(() => {
14098
14132
  // if (imgDom.current === null || src === '') {
14099
14133
  // return;
@@ -14741,7 +14775,7 @@ var AniLinkComponent = React.memo(AniLink$1);
14741
14775
  * @Author: binruan@chatlabs.com
14742
14776
  * @Date: 2024-07-05 14:08:41
14743
14777
  * @LastEditors: binruan@chatlabs.com
14744
- * @LastEditTime: 2024-08-02 16:22:39
14778
+ * @LastEditTime: 2024-09-09 14:05:04
14745
14779
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
14746
14780
  *
14747
14781
  */
@@ -14751,7 +14785,8 @@ var interactionRender$1 = [
14751
14785
  child: [
14752
14786
  {
14753
14787
  type: 'link',
14754
- name: 'onClick'
14788
+ name: 'onClick',
14789
+ hiddenUrl: true
14755
14790
  }
14756
14791
  ]
14757
14792
  },
@@ -15175,13 +15210,22 @@ const AniLinkPopup$1 = (_a) => {
15175
15210
  };
15176
15211
  var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
15177
15212
 
15213
+ /*
15214
+ * @Author: binruan@chatlabs.com
15215
+ * @Date: 2024-07-24 14:58:40
15216
+ * @LastEditors: binruan@chatlabs.com
15217
+ * @LastEditTime: 2024-09-09 13:54:35
15218
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
15219
+ *
15220
+ */
15178
15221
  var interactionRender = [
15179
15222
  {
15180
15223
  title: '点击事件',
15181
15224
  child: [
15182
15225
  {
15183
15226
  type: 'link',
15184
- name: 'onClick'
15227
+ name: 'onClick',
15228
+ hiddenUrl: true
15185
15229
  }
15186
15230
  ]
15187
15231
  },
@@ -16166,7 +16210,7 @@ var Tagbar$1 = React.memo(Tagbar);
16166
16210
  * @Author: binruan@chatlabs.com
16167
16211
  * @Date: 2024-01-15 19:03:09
16168
16212
  * @LastEditors: binruan@chatlabs.com
16169
- * @LastEditTime: 2024-08-30 11:42:11
16213
+ * @LastEditTime: 2024-09-11 15:36:28
16170
16214
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16171
16215
  *
16172
16216
  */
@@ -16343,6 +16387,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16343
16387
  return null;
16344
16388
  }
16345
16389
  });
16390
+ if (!(list === null || list === void 0 ? void 0 : list.length))
16391
+ return [];
16346
16392
  return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16347
16393
  }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16348
16394
  const renderLogo = React.useMemo(() => {