pb-sxp-ui 1.4.3 → 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 +172 -130
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +172 -130
  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 +172 -130
  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 +9 -0
  28. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +6 -3
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +8 -0
  31. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +6 -3
  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 +9 -0
  67. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +6 -3
  68. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
  69. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +8 -0
  70. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +6 -3
  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
  }
@@ -2039,12 +2042,14 @@ var settingRender$9 = [
2039
2042
  {
2040
2043
  label: '背景色',
2041
2044
  name: ['props', 'swiper', 'dotsBgColor'],
2042
- type: 'Color'
2045
+ type: 'Color',
2046
+ initialValue: 'rgba(0,0,0,.2)'
2043
2047
  },
2044
2048
  {
2045
2049
  label: '选中色',
2046
2050
  name: ['props', 'swiper', 'dotsActiveColor'],
2047
- type: 'Color'
2051
+ type: 'Color',
2052
+ initialValue: 'rgba(0,0,0,1)'
2048
2053
  },
2049
2054
  {
2050
2055
  label: '底边距',
@@ -9196,10 +9201,89 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
9196
9201
  };
9197
9202
  var CommodityGroup$1 = React.memo(CommodityGroup);
9198
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
+
9199
9283
  const CommodityDetail$1 = (_a) => {
9200
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;
9201
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"]);
9202
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
9286
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
9203
9287
  const { jumpToWeb, productView } = useEventReport();
9204
9288
  const curTimeRef = React.useRef(null);
9205
9289
  const [showModal, setShowModal] = React.useState(false);
@@ -9244,20 +9328,11 @@ const CommodityDetail$1 = (_a) => {
9244
9328
  window.removeEventListener('pageshow', initTime);
9245
9329
  };
9246
9330
  }, []);
9247
- const priceText = React.useMemo(() => {
9248
- var _a, _b, _c, _d, _e, _f, _g;
9249
- 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);
9250
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9251
- 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
9252
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9253
- minimumFractionDigits: 0
9254
- })) !== null && _g !== void 0 ? _g : ''
9255
- : product === null || product === void 0 ? void 0 : product.price}`;
9256
- }
9257
- else {
9258
- return '$7,000';
9259
- }
9260
- }, [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
+ });
9261
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;
9262
9337
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9263
9338
  const renderContent = ({ isPost }) => {
@@ -9637,38 +9712,6 @@ var settingRender$8 = [
9637
9712
 
9638
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";
9639
9714
 
9640
- /*
9641
- * @Author: binruan@chatlabs.com
9642
- * @Date: 2024-03-20 14:56:16
9643
- * @LastEditors: binruan@chatlabs.com
9644
- * @LastEditTime: 2024-03-20 14:56:22
9645
- * @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
9646
- *
9647
- */
9648
- /*
9649
- * @Author: binruan@chatlabs.com
9650
- * @Date: 2023-08-03 16:37:37
9651
- * @LastEditors: binruan@chatlabs.com
9652
- * @LastEditTime: 2023-08-04 11:02:50
9653
- * @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
9654
- *
9655
- */
9656
- const getMediaValueByMode = (obj) => {
9657
- var _a;
9658
- if (!obj || typeof obj !== 'object') {
9659
- return null;
9660
- }
9661
- const { mode, link, file, src } = obj;
9662
- switch (mode) {
9663
- case 2:
9664
- return link || null;
9665
- case 3:
9666
- return src || null;
9667
- default:
9668
- return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
9669
- }
9670
- };
9671
-
9672
9715
  const Prompt$1 = (_a) => {
9673
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"]);
9674
9717
  const { popupDetailData } = useSxpDataSource();
@@ -9727,7 +9770,7 @@ const Prompt = createMaterial(PromptComponent, {
9727
9770
  * @Author: binruan@chatlabs.com
9728
9771
  * @Date: 2024-03-26 16:50:25
9729
9772
  * @LastEditors: binruan@chatlabs.com
9730
- * @LastEditTime: 2024-08-29 16:45:54
9773
+ * @LastEditTime: 2024-08-30 18:08:55
9731
9774
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9732
9775
  *
9733
9776
  */
@@ -9933,7 +9976,8 @@ var settingRender$7 = [
9933
9976
  label: '价格千分符展示',
9934
9977
  type: 'Switch',
9935
9978
  name: ['enableFormattedPrice'],
9936
- initialValue: true
9979
+ initialValue: true,
9980
+ belong: 'price'
9937
9981
  }
9938
9982
  ]
9939
9983
  }
@@ -10049,12 +10093,14 @@ var settingRender$7 = [
10049
10093
  {
10050
10094
  label: '背景色',
10051
10095
  name: ['props', 'swiper', 'dotsBgColor'],
10052
- type: 'Color'
10096
+ type: 'Color',
10097
+ initialValue: 'rgba(0,0,0,.2)'
10053
10098
  },
10054
10099
  {
10055
10100
  label: '选中色',
10056
10101
  name: ['props', 'swiper', 'dotsActiveColor'],
10057
- type: 'Color'
10102
+ type: 'Color',
10103
+ initialValue: 'rgba(0,0,0,1)'
10058
10104
  },
10059
10105
  {
10060
10106
  label: '底边距',
@@ -10080,7 +10126,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
10080
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;
10081
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"]);
10082
10128
  React.useState(true);
10083
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
10129
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
10084
10130
  const { jumpToWeb, productView } = useEventReport();
10085
10131
  React.useState(false);
10086
10132
  React.useState(false);
@@ -10128,20 +10174,11 @@ const CommodityDetailDiroNew$1 = (_a) => {
10128
10174
  window.removeEventListener('pageshow', initTime);
10129
10175
  };
10130
10176
  }, []);
10131
- const priceText = React.useMemo(() => {
10132
- var _a, _b, _c, _d, _e, _f, _g;
10133
- 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);
10134
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10135
- 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
10136
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10137
- minimumFractionDigits: 0
10138
- })) !== null && _g !== void 0 ? _g : ''
10139
- : product === null || product === void 0 ? void 0 : product.price}`;
10140
- }
10141
- else {
10142
- return '£102,300.00';
10143
- }
10144
- }, [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
+ });
10145
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;
10146
10183
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
10147
10184
  // useEffect(() => {
@@ -10573,7 +10610,8 @@ var settingRender$6 = [
10573
10610
  label: '价格千分符展示',
10574
10611
  type: 'Switch',
10575
10612
  name: ['enableFormattedPrice'],
10576
- initialValue: true
10613
+ initialValue: true,
10614
+ belong: 'price'
10577
10615
  }
10578
10616
  ]
10579
10617
  }
@@ -10728,27 +10766,20 @@ var Img$1 = React.memo(Img);
10728
10766
  const CommodityList$1 = (_a) => {
10729
10767
  var _b, _c, _d;
10730
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"]);
10731
- const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10769
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
10732
10770
  const { jumpToWeb } = useEventReport();
10733
10771
  const { popup } = useEditor();
10734
10772
  const recData = isPost ? rec : popupDetailData;
10735
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];
10736
10774
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10737
10775
  const priceText = React.useCallback((product) => {
10738
- var _a, _b, _c, _d, _e, _f, _g;
10739
- 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);
10740
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10741
- 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
10742
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10743
- minimumFractionDigits: 0
10744
- })) !== null && _g !== void 0 ? _g : ''
10745
- : product === null || product === void 0 ? void 0 : product.price}`;
10746
- }
10747
- else {
10748
- const p = 7000;
10749
- return `$${isToLocStr ? p.toLocaleString() : p}`;
10750
- }
10751
- }, [(_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]);
10752
10783
  const handleClick = lodash.throttle((item, multiCheckIndex) => {
10753
10784
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10754
10785
  eventSubject: 'clickCta',
@@ -11205,7 +11236,8 @@ var interactionRender$9 = [
11205
11236
  child: [
11206
11237
  {
11207
11238
  type: 'link',
11208
- name: 'onClick'
11239
+ name: 'onClick',
11240
+ hiddenUrl: true
11209
11241
  }
11210
11242
  ]
11211
11243
  }
@@ -11330,7 +11362,8 @@ var interactionRender$8 = [
11330
11362
  child: [
11331
11363
  {
11332
11364
  type: 'link',
11333
- name: 'onClick'
11365
+ name: 'onClick',
11366
+ hiddenUrl: true
11334
11367
  }
11335
11368
  ]
11336
11369
  }
@@ -11548,7 +11581,7 @@ var LinkComponent = React.memo(Link$1);
11548
11581
  * @Author: binruan@chatlabs.com
11549
11582
  * @Date: 2024-08-09 16:59:38
11550
11583
  * @LastEditors: binruan@chatlabs.com
11551
- * @LastEditTime: 2024-08-09 16:59:44
11584
+ * @LastEditTime: 2024-09-09 13:59:50
11552
11585
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11553
11586
  *
11554
11587
  */
@@ -11558,7 +11591,8 @@ var interactionRender$7 = [
11558
11591
  child: [
11559
11592
  {
11560
11593
  type: 'link',
11561
- name: 'onClick'
11594
+ name: 'onClick',
11595
+ hiddenUrl: true
11562
11596
  }
11563
11597
  ]
11564
11598
  }
@@ -11566,7 +11600,7 @@ var interactionRender$7 = [
11566
11600
 
11567
11601
  var _a;
11568
11602
  const Link = createMaterial(LinkComponent, {
11569
- displayName: '跳转指引',
11603
+ displayName: '普通CTA',
11570
11604
  icon: '',
11571
11605
  category: 'template',
11572
11606
  type: 'Link',
@@ -11625,7 +11659,8 @@ var interactionRender$6 = [
11625
11659
  child: [
11626
11660
  {
11627
11661
  type: 'link',
11628
- name: 'onClick'
11662
+ name: 'onClick',
11663
+ hiddenUrl: true
11629
11664
  }
11630
11665
  ]
11631
11666
  }
@@ -11720,7 +11755,8 @@ var interactionRender$5 = [
11720
11755
  child: [
11721
11756
  {
11722
11757
  type: 'link',
11723
- name: 'onClick'
11758
+ name: 'onClick',
11759
+ hiddenUrl: true
11724
11760
  }
11725
11761
  ]
11726
11762
  }
@@ -11816,7 +11852,8 @@ var interactionRender$4 = [
11816
11852
  child: [
11817
11853
  {
11818
11854
  type: 'link',
11819
- name: 'onClick'
11855
+ name: 'onClick',
11856
+ hiddenUrl: true
11820
11857
  }
11821
11858
  ]
11822
11859
  }
@@ -11931,7 +11968,8 @@ var interactionRender$3 = [
11931
11968
  child: [
11932
11969
  {
11933
11970
  type: 'link',
11934
- name: 'onClick'
11971
+ name: 'onClick',
11972
+ hiddenUrl: true
11935
11973
  }
11936
11974
  ]
11937
11975
  }
@@ -12041,13 +12079,22 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
12041
12079
  sort: 3
12042
12080
  });
12043
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
+ */
12044
12090
  var interactionRender$2 = [
12045
12091
  {
12046
12092
  title: '点击事件',
12047
12093
  child: [
12048
12094
  {
12049
12095
  type: 'link',
12050
- name: 'onClick'
12096
+ name: 'onClick',
12097
+ hiddenUrl: true
12051
12098
  }
12052
12099
  ]
12053
12100
  }
@@ -12277,7 +12324,8 @@ var settingRender$3 = [
12277
12324
  label: '价格千分符展示',
12278
12325
  type: 'Switch',
12279
12326
  name: ['enableFormattedPrice'],
12280
- initialValue: true
12327
+ initialValue: true,
12328
+ belong: 'price'
12281
12329
  }
12282
12330
  ]
12283
12331
  }
@@ -13700,7 +13748,7 @@ var previewData = {
13700
13748
  const WaterfallFlowItem$1 = (props) => {
13701
13749
  var _a;
13702
13750
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
13703
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13751
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
13704
13752
  const [showVideo, setShowVideo] = React.useState(false);
13705
13753
  React.useState(false);
13706
13754
  React.useState({
@@ -13751,20 +13799,11 @@ const WaterfallFlowItem$1 = (props) => {
13751
13799
  return false;
13752
13800
  }
13753
13801
  }, [top, showBorder]);
13754
- const priceText = React.useMemo(() => {
13755
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13756
- 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);
13757
- 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)) {
13758
- 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
13759
- ? (_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', {
13760
- minimumFractionDigits: 0
13761
- })) !== null && _l !== void 0 ? _l : ''
13762
- : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
13763
- }
13764
- else {
13765
- return null;
13766
- }
13767
- }, [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
+ });
13768
13807
  React.useEffect(() => {
13769
13808
  if (imgDom.current === null || src === '') {
13770
13809
  return;
@@ -14050,7 +14089,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
14050
14089
  const WaterfallFlowItem = (props) => {
14051
14090
  var _a;
14052
14091
  const { rec, index, list, reportTagsView, textStyles, space } = props;
14053
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
14092
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
14054
14093
  const [showVideo, setShowVideo] = React.useState(false);
14055
14094
  const imgDom = React.useRef(null);
14056
14095
  const ref = React.useRef(null);
@@ -14076,20 +14115,11 @@ const WaterfallFlowItem = (props) => {
14076
14115
  var _a, _b;
14077
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;
14078
14117
  }, [rec]);
14079
- const priceText = React.useMemo(() => {
14080
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
14081
- 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);
14082
- 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)) {
14083
- 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
14084
- ? (_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', {
14085
- minimumFractionDigits: 0
14086
- })) !== null && _l !== void 0 ? _l : ''
14087
- : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
14088
- }
14089
- else {
14090
- return null;
14091
- }
14092
- }, [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
+ });
14093
14123
  // useEffect(() => {
14094
14124
  // if (imgDom.current === null || src === '') {
14095
14125
  // return;
@@ -14737,7 +14767,7 @@ var AniLinkComponent = React.memo(AniLink$1);
14737
14767
  * @Author: binruan@chatlabs.com
14738
14768
  * @Date: 2024-07-05 14:08:41
14739
14769
  * @LastEditors: binruan@chatlabs.com
14740
- * @LastEditTime: 2024-08-02 16:22:39
14770
+ * @LastEditTime: 2024-09-09 14:05:04
14741
14771
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
14742
14772
  *
14743
14773
  */
@@ -14747,7 +14777,8 @@ var interactionRender$1 = [
14747
14777
  child: [
14748
14778
  {
14749
14779
  type: 'link',
14750
- name: 'onClick'
14780
+ name: 'onClick',
14781
+ hiddenUrl: true
14751
14782
  }
14752
14783
  ]
14753
14784
  },
@@ -15171,13 +15202,22 @@ const AniLinkPopup$1 = (_a) => {
15171
15202
  };
15172
15203
  var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
15173
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
+ */
15174
15213
  var interactionRender = [
15175
15214
  {
15176
15215
  title: '点击事件',
15177
15216
  child: [
15178
15217
  {
15179
15218
  type: 'link',
15180
- name: 'onClick'
15219
+ name: 'onClick',
15220
+ hiddenUrl: true
15181
15221
  }
15182
15222
  ]
15183
15223
  },
@@ -16162,7 +16202,7 @@ var Tagbar$1 = React.memo(Tagbar);
16162
16202
  * @Author: binruan@chatlabs.com
16163
16203
  * @Date: 2024-01-15 19:03:09
16164
16204
  * @LastEditors: binruan@chatlabs.com
16165
- * @LastEditTime: 2024-08-30 11:42:11
16205
+ * @LastEditTime: 2024-09-11 15:36:28
16166
16206
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16167
16207
  *
16168
16208
  */
@@ -16339,6 +16379,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16339
16379
  return null;
16340
16380
  }
16341
16381
  });
16382
+ if (!(list === null || list === void 0 ? void 0 : list.length))
16383
+ return [];
16342
16384
  return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16343
16385
  }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16344
16386
  const renderLogo = React.useMemo(() => {