pb-sxp-ui 1.4.4 → 1.5.0

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 +163 -125
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +163 -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 +163 -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 +47 -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 +49 -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,89 @@ 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-12 15:50:11
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 || (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) !== 'none';
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 && decInd + 1 < (text === null || text === void 0 ? void 0 : text.length)) {
9272
+ text = text.slice(0, decInd + 1) + ',' + text.slice(decInd + 2);
9273
+ }
9274
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) && (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
9275
+ text = (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) === 'left' ? currency + text : text + currency;
9276
+ }
9277
+ else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
9278
+ text = currency + text;
9279
+ }
9280
+ return text;
9281
+ };
9282
+
9201
9283
  const CommodityDetail$1 = (_a) => {
9202
9284
  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
9285
  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();
9286
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
9205
9287
  const { jumpToWeb, productView } = useEventReport();
9206
9288
  const curTimeRef = React.useRef(null);
9207
9289
  const [showModal, setShowModal] = React.useState(false);
@@ -9246,20 +9328,11 @@ const CommodityDetail$1 = (_a) => {
9246
9328
  window.removeEventListener('pageshow', initTime);
9247
9329
  };
9248
9330
  }, []);
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]);
9331
+ const priceText = getPriceText({
9332
+ product: product,
9333
+ enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
9334
+ globalConfig
9335
+ });
9263
9336
  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
9337
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9265
9338
  const renderContent = ({ isPost }) => {
@@ -9639,38 +9712,6 @@ var settingRender$8 = [
9639
9712
 
9640
9713
  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
9714
 
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
9715
  const Prompt$1 = (_a) => {
9675
9716
  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
9717
  const { popupDetailData } = useSxpDataSource();
@@ -9935,7 +9976,8 @@ var settingRender$7 = [
9935
9976
  label: '价格千分符展示',
9936
9977
  type: 'Switch',
9937
9978
  name: ['enableFormattedPrice'],
9938
- initialValue: true
9979
+ initialValue: true,
9980
+ belong: 'price'
9939
9981
  }
9940
9982
  ]
9941
9983
  }
@@ -10084,7 +10126,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
10084
10126
  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
10127
  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
10128
  React.useState(true);
10087
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
10129
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
10088
10130
  const { jumpToWeb, productView } = useEventReport();
10089
10131
  React.useState(false);
10090
10132
  React.useState(false);
@@ -10132,20 +10174,11 @@ const CommodityDetailDiroNew$1 = (_a) => {
10132
10174
  window.removeEventListener('pageshow', initTime);
10133
10175
  };
10134
10176
  }, []);
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]);
10177
+ const priceText = getPriceText({
10178
+ product,
10179
+ enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
10180
+ globalConfig
10181
+ });
10149
10182
  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
10183
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
10151
10184
  // useEffect(() => {
@@ -10577,7 +10610,8 @@ var settingRender$6 = [
10577
10610
  label: '价格千分符展示',
10578
10611
  type: 'Switch',
10579
10612
  name: ['enableFormattedPrice'],
10580
- initialValue: true
10613
+ initialValue: true,
10614
+ belong: 'price'
10581
10615
  }
10582
10616
  ]
10583
10617
  }
@@ -10732,27 +10766,20 @@ var Img$1 = React.memo(Img);
10732
10766
  const CommodityList$1 = (_a) => {
10733
10767
  var _b, _c, _d;
10734
10768
  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();
10769
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
10736
10770
  const { jumpToWeb } = useEventReport();
10737
10771
  const { popup } = useEditor();
10738
10772
  const recData = isPost ? rec : popupDetailData;
10739
10773
  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
10774
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10741
10775
  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]);
10776
+ var _a;
10777
+ return getPriceText({
10778
+ product,
10779
+ enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
10780
+ globalConfig
10781
+ });
10782
+ }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
10756
10783
  const handleClick = lodash.throttle((item, multiCheckIndex) => {
10757
10784
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10758
10785
  eventSubject: 'clickCta',
@@ -11209,7 +11236,8 @@ var interactionRender$9 = [
11209
11236
  child: [
11210
11237
  {
11211
11238
  type: 'link',
11212
- name: 'onClick'
11239
+ name: 'onClick',
11240
+ hiddenUrl: true
11213
11241
  }
11214
11242
  ]
11215
11243
  }
@@ -11334,7 +11362,8 @@ var interactionRender$8 = [
11334
11362
  child: [
11335
11363
  {
11336
11364
  type: 'link',
11337
- name: 'onClick'
11365
+ name: 'onClick',
11366
+ hiddenUrl: true
11338
11367
  }
11339
11368
  ]
11340
11369
  }
@@ -11552,7 +11581,7 @@ var LinkComponent = React.memo(Link$1);
11552
11581
  * @Author: binruan@chatlabs.com
11553
11582
  * @Date: 2024-08-09 16:59:38
11554
11583
  * @LastEditors: binruan@chatlabs.com
11555
- * @LastEditTime: 2024-08-09 16:59:44
11584
+ * @LastEditTime: 2024-09-09 13:59:50
11556
11585
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11557
11586
  *
11558
11587
  */
@@ -11562,7 +11591,8 @@ var interactionRender$7 = [
11562
11591
  child: [
11563
11592
  {
11564
11593
  type: 'link',
11565
- name: 'onClick'
11594
+ name: 'onClick',
11595
+ hiddenUrl: true
11566
11596
  }
11567
11597
  ]
11568
11598
  }
@@ -11570,7 +11600,7 @@ var interactionRender$7 = [
11570
11600
 
11571
11601
  var _a;
11572
11602
  const Link = createMaterial(LinkComponent, {
11573
- displayName: '跳转指引',
11603
+ displayName: '普通CTA',
11574
11604
  icon: '',
11575
11605
  category: 'template',
11576
11606
  type: 'Link',
@@ -11629,7 +11659,8 @@ var interactionRender$6 = [
11629
11659
  child: [
11630
11660
  {
11631
11661
  type: 'link',
11632
- name: 'onClick'
11662
+ name: 'onClick',
11663
+ hiddenUrl: true
11633
11664
  }
11634
11665
  ]
11635
11666
  }
@@ -11724,7 +11755,8 @@ var interactionRender$5 = [
11724
11755
  child: [
11725
11756
  {
11726
11757
  type: 'link',
11727
- name: 'onClick'
11758
+ name: 'onClick',
11759
+ hiddenUrl: true
11728
11760
  }
11729
11761
  ]
11730
11762
  }
@@ -11820,7 +11852,8 @@ var interactionRender$4 = [
11820
11852
  child: [
11821
11853
  {
11822
11854
  type: 'link',
11823
- name: 'onClick'
11855
+ name: 'onClick',
11856
+ hiddenUrl: true
11824
11857
  }
11825
11858
  ]
11826
11859
  }
@@ -11935,7 +11968,8 @@ var interactionRender$3 = [
11935
11968
  child: [
11936
11969
  {
11937
11970
  type: 'link',
11938
- name: 'onClick'
11971
+ name: 'onClick',
11972
+ hiddenUrl: true
11939
11973
  }
11940
11974
  ]
11941
11975
  }
@@ -12045,13 +12079,22 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
12045
12079
  sort: 3
12046
12080
  });
12047
12081
 
12082
+ /*
12083
+ * @Author: binruan@chatlabs.com
12084
+ * @Date: 2024-03-20 10:27:32
12085
+ * @LastEditors: binruan@chatlabs.com
12086
+ * @LastEditTime: 2024-09-09 13:56:10
12087
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
12088
+ *
12089
+ */
12048
12090
  var interactionRender$2 = [
12049
12091
  {
12050
12092
  title: '点击事件',
12051
12093
  child: [
12052
12094
  {
12053
12095
  type: 'link',
12054
- name: 'onClick'
12096
+ name: 'onClick',
12097
+ hiddenUrl: true
12055
12098
  }
12056
12099
  ]
12057
12100
  }
@@ -12281,7 +12324,8 @@ var settingRender$3 = [
12281
12324
  label: '价格千分符展示',
12282
12325
  type: 'Switch',
12283
12326
  name: ['enableFormattedPrice'],
12284
- initialValue: true
12327
+ initialValue: true,
12328
+ belong: 'price'
12285
12329
  }
12286
12330
  ]
12287
12331
  }
@@ -13704,7 +13748,7 @@ var previewData = {
13704
13748
  const WaterfallFlowItem$1 = (props) => {
13705
13749
  var _a;
13706
13750
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
13707
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13751
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
13708
13752
  const [showVideo, setShowVideo] = React.useState(false);
13709
13753
  React.useState(false);
13710
13754
  React.useState({
@@ -13755,20 +13799,11 @@ const WaterfallFlowItem$1 = (props) => {
13755
13799
  return false;
13756
13800
  }
13757
13801
  }, [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]);
13802
+ const priceText = getPriceText({
13803
+ product: rec === null || rec === void 0 ? void 0 : rec.product,
13804
+ enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
13805
+ globalConfig
13806
+ });
13772
13807
  React.useEffect(() => {
13773
13808
  if (imgDom.current === null || src === '') {
13774
13809
  return;
@@ -14054,7 +14089,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
14054
14089
  const WaterfallFlowItem = (props) => {
14055
14090
  var _a;
14056
14091
  const { rec, index, list, reportTagsView, textStyles, space } = props;
14057
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
14092
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
14058
14093
  const [showVideo, setShowVideo] = React.useState(false);
14059
14094
  const imgDom = React.useRef(null);
14060
14095
  const ref = React.useRef(null);
@@ -14080,20 +14115,11 @@ const WaterfallFlowItem = (props) => {
14080
14115
  var _a, _b;
14081
14116
  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
14117
  }, [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]);
14118
+ const priceText = getPriceText({
14119
+ product: rec === null || rec === void 0 ? void 0 : rec.product,
14120
+ enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
14121
+ globalConfig
14122
+ });
14097
14123
  // useEffect(() => {
14098
14124
  // if (imgDom.current === null || src === '') {
14099
14125
  // return;
@@ -14741,7 +14767,7 @@ var AniLinkComponent = React.memo(AniLink$1);
14741
14767
  * @Author: binruan@chatlabs.com
14742
14768
  * @Date: 2024-07-05 14:08:41
14743
14769
  * @LastEditors: binruan@chatlabs.com
14744
- * @LastEditTime: 2024-08-02 16:22:39
14770
+ * @LastEditTime: 2024-09-09 14:05:04
14745
14771
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
14746
14772
  *
14747
14773
  */
@@ -14751,7 +14777,8 @@ var interactionRender$1 = [
14751
14777
  child: [
14752
14778
  {
14753
14779
  type: 'link',
14754
- name: 'onClick'
14780
+ name: 'onClick',
14781
+ hiddenUrl: true
14755
14782
  }
14756
14783
  ]
14757
14784
  },
@@ -15175,13 +15202,22 @@ const AniLinkPopup$1 = (_a) => {
15175
15202
  };
15176
15203
  var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
15177
15204
 
15205
+ /*
15206
+ * @Author: binruan@chatlabs.com
15207
+ * @Date: 2024-07-24 14:58:40
15208
+ * @LastEditors: binruan@chatlabs.com
15209
+ * @LastEditTime: 2024-09-09 13:54:35
15210
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
15211
+ *
15212
+ */
15178
15213
  var interactionRender = [
15179
15214
  {
15180
15215
  title: '点击事件',
15181
15216
  child: [
15182
15217
  {
15183
15218
  type: 'link',
15184
- name: 'onClick'
15219
+ name: 'onClick',
15220
+ hiddenUrl: true
15185
15221
  }
15186
15222
  ]
15187
15223
  },
@@ -16166,7 +16202,7 @@ var Tagbar$1 = React.memo(Tagbar);
16166
16202
  * @Author: binruan@chatlabs.com
16167
16203
  * @Date: 2024-01-15 19:03:09
16168
16204
  * @LastEditors: binruan@chatlabs.com
16169
- * @LastEditTime: 2024-08-30 11:42:11
16205
+ * @LastEditTime: 2024-09-11 15:36:28
16170
16206
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16171
16207
  *
16172
16208
  */
@@ -16343,6 +16379,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16343
16379
  return null;
16344
16380
  }
16345
16381
  });
16382
+ if (!(list === null || list === void 0 ? void 0 : list.length))
16383
+ return [];
16346
16384
  return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16347
16385
  }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16348
16386
  const renderLogo = React.useMemo(() => {