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/pb-ui.js CHANGED
@@ -740,6 +740,8 @@
740
740
  }
741
741
  setLoading(false);
742
742
  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 : []);
743
+ setRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
744
+ setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
743
745
  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));
744
746
  if (isNotNullList) {
745
747
  pageNum = pageNum + 1;
@@ -1916,7 +1918,8 @@
1916
1918
  label: '价格千分符展示',
1917
1919
  type: 'Switch',
1918
1920
  name: ['enableFormattedPrice'],
1919
- initialValue: true
1921
+ initialValue: true,
1922
+ belong: 'price'
1920
1923
  }
1921
1924
  ]
1922
1925
  }
@@ -2032,12 +2035,14 @@
2032
2035
  {
2033
2036
  label: '背景色',
2034
2037
  name: ['props', 'swiper', 'dotsBgColor'],
2035
- type: 'Color'
2038
+ type: 'Color',
2039
+ initialValue: 'rgba(0,0,0,.2)'
2036
2040
  },
2037
2041
  {
2038
2042
  label: '选中色',
2039
2043
  name: ['props', 'swiper', 'dotsActiveColor'],
2040
- type: 'Color'
2044
+ type: 'Color',
2045
+ initialValue: 'rgba(0,0,0,1)'
2041
2046
  },
2042
2047
  {
2043
2048
  label: '底边距',
@@ -9189,10 +9194,89 @@
9189
9194
  };
9190
9195
  var CommodityGroup$1 = React.memo(CommodityGroup);
9191
9196
 
9197
+ /*
9198
+ * @Author: binruan@chatlabs.com
9199
+ * @Date: 2024-03-20 14:56:16
9200
+ * @LastEditors: binruan@chatlabs.com
9201
+ * @LastEditTime: 2024-09-12 15:50:11
9202
+ * @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
9203
+ *
9204
+ */
9205
+ /*
9206
+ * @Author: binruan@chatlabs.com
9207
+ * @Date: 2023-08-03 16:37:37
9208
+ * @LastEditors: binruan@chatlabs.com
9209
+ * @LastEditTime: 2023-08-04 11:02:50
9210
+ * @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
9211
+ *
9212
+ */
9213
+ const getMediaValueByMode = (obj) => {
9214
+ var _a;
9215
+ if (!obj || typeof obj !== 'object') {
9216
+ return null;
9217
+ }
9218
+ const { mode, link, file, src } = obj;
9219
+ switch (mode) {
9220
+ case 2:
9221
+ return link || null;
9222
+ case 3:
9223
+ return src || null;
9224
+ default:
9225
+ return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
9226
+ }
9227
+ };
9228
+ const getPriceText = ({ product, enableFormattedPrice, globalConfig }) => {
9229
+ var _a, _b, _c, _d, _e;
9230
+ 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;
9231
+ let text = '';
9232
+ let priceSymbol = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.priceSymbol;
9233
+ 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 : '' : '$';
9234
+ const isToLocStr = enableFormattedPrice === undefined || enableFormattedPrice || (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) !== 'none';
9235
+ let decPic = price.toString();
9236
+ if (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) {
9237
+ decPic = price === null || price === void 0 ? void 0 : price.toFixed(2);
9238
+ }
9239
+ let decInd = (_d = decPic === null || decPic === void 0 ? void 0 : decPic.indexOf('.')) !== null && _d !== void 0 ? _d : -1;
9240
+ if (isToLocStr) {
9241
+ text =
9242
+ (_e = price === null || price === void 0 ? void 0 : price.toLocaleString('zh', {
9243
+ minimumFractionDigits: (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) ? 2 : 0
9244
+ })) !== null && _e !== void 0 ? _e : '';
9245
+ let startIndex = 0;
9246
+ let endIndex = decInd !== null && decInd !== void 0 ? decInd : text === null || text === void 0 ? void 0 : text.length;
9247
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) === '.') {
9248
+ text = text === null || text === void 0 ? void 0 : text.replace(/,/g, function (match, index) {
9249
+ if (index >= startIndex && index < endIndex) {
9250
+ return '.';
9251
+ }
9252
+ else {
9253
+ return match;
9254
+ }
9255
+ });
9256
+ }
9257
+ else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) === ' ') {
9258
+ text = text === null || text === void 0 ? void 0 : text.replace(',', ' ');
9259
+ }
9260
+ }
9261
+ else {
9262
+ text = `${(priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) ? price === null || price === void 0 ? void 0 : price.toFixed(2) : price}`;
9263
+ }
9264
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.decimalPoint) === ',' && decInd > 0 && decInd + 1 < (text === null || text === void 0 ? void 0 : text.length)) {
9265
+ text = text.slice(0, decInd + 1) + ',' + text.slice(decInd + 2);
9266
+ }
9267
+ if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) && (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
9268
+ text = (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) === 'left' ? currency + text : text + currency;
9269
+ }
9270
+ else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
9271
+ text = currency + text;
9272
+ }
9273
+ return text;
9274
+ };
9275
+
9192
9276
  const CommodityDetail$1 = (_a) => {
9193
9277
  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;
9194
9278
  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"]);
9195
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
9279
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
9196
9280
  const { jumpToWeb, productView } = useEventReport();
9197
9281
  const curTimeRef = React.useRef(null);
9198
9282
  const [showModal, setShowModal] = React.useState(false);
@@ -9237,20 +9321,11 @@
9237
9321
  window.removeEventListener('pageshow', initTime);
9238
9322
  };
9239
9323
  }, []);
9240
- const priceText = React.useMemo(() => {
9241
- var _a, _b, _c, _d, _e, _f, _g;
9242
- 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);
9243
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9244
- 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
9245
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9246
- minimumFractionDigits: 0
9247
- })) !== null && _g !== void 0 ? _g : ''
9248
- : product === null || product === void 0 ? void 0 : product.price}`;
9249
- }
9250
- else {
9251
- return '$7,000';
9252
- }
9253
- }, [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]);
9324
+ const priceText = getPriceText({
9325
+ product: product,
9326
+ enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
9327
+ globalConfig
9328
+ });
9254
9329
  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;
9255
9330
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9256
9331
  const renderContent = ({ isPost }) => {
@@ -9630,38 +9705,6 @@
9630
9705
 
9631
9706
  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";
9632
9707
 
9633
- /*
9634
- * @Author: binruan@chatlabs.com
9635
- * @Date: 2024-03-20 14:56:16
9636
- * @LastEditors: binruan@chatlabs.com
9637
- * @LastEditTime: 2024-03-20 14:56:22
9638
- * @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
9639
- *
9640
- */
9641
- /*
9642
- * @Author: binruan@chatlabs.com
9643
- * @Date: 2023-08-03 16:37:37
9644
- * @LastEditors: binruan@chatlabs.com
9645
- * @LastEditTime: 2023-08-04 11:02:50
9646
- * @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
9647
- *
9648
- */
9649
- const getMediaValueByMode = (obj) => {
9650
- var _a;
9651
- if (!obj || typeof obj !== 'object') {
9652
- return null;
9653
- }
9654
- const { mode, link, file, src } = obj;
9655
- switch (mode) {
9656
- case 2:
9657
- return link || null;
9658
- case 3:
9659
- return src || null;
9660
- default:
9661
- return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
9662
- }
9663
- };
9664
-
9665
9708
  const Prompt$1 = (_a) => {
9666
9709
  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"]);
9667
9710
  const { popupDetailData } = useSxpDataSource();
@@ -9720,7 +9763,7 @@
9720
9763
  * @Author: binruan@chatlabs.com
9721
9764
  * @Date: 2024-03-26 16:50:25
9722
9765
  * @LastEditors: binruan@chatlabs.com
9723
- * @LastEditTime: 2024-08-29 16:45:54
9766
+ * @LastEditTime: 2024-08-30 18:08:55
9724
9767
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9725
9768
  *
9726
9769
  */
@@ -9926,7 +9969,8 @@
9926
9969
  label: '价格千分符展示',
9927
9970
  type: 'Switch',
9928
9971
  name: ['enableFormattedPrice'],
9929
- initialValue: true
9972
+ initialValue: true,
9973
+ belong: 'price'
9930
9974
  }
9931
9975
  ]
9932
9976
  }
@@ -10042,12 +10086,14 @@
10042
10086
  {
10043
10087
  label: '背景色',
10044
10088
  name: ['props', 'swiper', 'dotsBgColor'],
10045
- type: 'Color'
10089
+ type: 'Color',
10090
+ initialValue: 'rgba(0,0,0,.2)'
10046
10091
  },
10047
10092
  {
10048
10093
  label: '选中色',
10049
10094
  name: ['props', 'swiper', 'dotsActiveColor'],
10050
- type: 'Color'
10095
+ type: 'Color',
10096
+ initialValue: 'rgba(0,0,0,1)'
10051
10097
  },
10052
10098
  {
10053
10099
  label: '底边距',
@@ -10073,7 +10119,7 @@
10073
10119
  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;
10074
10120
  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"]);
10075
10121
  React.useState(true);
10076
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
10122
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
10077
10123
  const { jumpToWeb, productView } = useEventReport();
10078
10124
  React.useState(false);
10079
10125
  React.useState(false);
@@ -10121,20 +10167,11 @@
10121
10167
  window.removeEventListener('pageshow', initTime);
10122
10168
  };
10123
10169
  }, []);
10124
- const priceText = React.useMemo(() => {
10125
- var _a, _b, _c, _d, _e, _f, _g;
10126
- 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);
10127
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10128
- 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
10129
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10130
- minimumFractionDigits: 0
10131
- })) !== null && _g !== void 0 ? _g : ''
10132
- : product === null || product === void 0 ? void 0 : product.price}`;
10133
- }
10134
- else {
10135
- return '£102,300.00';
10136
- }
10137
- }, [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]);
10170
+ const priceText = getPriceText({
10171
+ product,
10172
+ enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
10173
+ globalConfig
10174
+ });
10138
10175
  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;
10139
10176
  const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
10140
10177
  // useEffect(() => {
@@ -10566,7 +10603,8 @@ Made in Italy` })));
10566
10603
  label: '价格千分符展示',
10567
10604
  type: 'Switch',
10568
10605
  name: ['enableFormattedPrice'],
10569
- initialValue: true
10606
+ initialValue: true,
10607
+ belong: 'price'
10570
10608
  }
10571
10609
  ]
10572
10610
  }
@@ -10721,27 +10759,20 @@ Made in Italy` })));
10721
10759
  const CommodityList$1 = (_a) => {
10722
10760
  var _b, _c, _d;
10723
10761
  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"]);
10724
- const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10762
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
10725
10763
  const { jumpToWeb } = useEventReport();
10726
10764
  const { popup } = useEditor();
10727
10765
  const recData = isPost ? rec : popupDetailData;
10728
10766
  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];
10729
10767
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10730
10768
  const priceText = React.useCallback((product) => {
10731
- var _a, _b, _c, _d, _e, _f, _g;
10732
- 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);
10733
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10734
- 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
10735
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10736
- minimumFractionDigits: 0
10737
- })) !== null && _g !== void 0 ? _g : ''
10738
- : product === null || product === void 0 ? void 0 : product.price}`;
10739
- }
10740
- else {
10741
- const p = 7000;
10742
- return `$${isToLocStr ? p.toLocaleString() : p}`;
10743
- }
10744
- }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
10769
+ var _a;
10770
+ return getPriceText({
10771
+ product,
10772
+ enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
10773
+ globalConfig
10774
+ });
10775
+ }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
10745
10776
  const handleClick = lodash.throttle((item, multiCheckIndex) => {
10746
10777
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10747
10778
  eventSubject: 'clickCta',
@@ -11198,7 +11229,8 @@ Made in Italy` })));
11198
11229
  child: [
11199
11230
  {
11200
11231
  type: 'link',
11201
- name: 'onClick'
11232
+ name: 'onClick',
11233
+ hiddenUrl: true
11202
11234
  }
11203
11235
  ]
11204
11236
  }
@@ -11323,7 +11355,8 @@ Made in Italy` })));
11323
11355
  child: [
11324
11356
  {
11325
11357
  type: 'link',
11326
- name: 'onClick'
11358
+ name: 'onClick',
11359
+ hiddenUrl: true
11327
11360
  }
11328
11361
  ]
11329
11362
  }
@@ -11541,7 +11574,7 @@ Made in Italy` })));
11541
11574
  * @Author: binruan@chatlabs.com
11542
11575
  * @Date: 2024-08-09 16:59:38
11543
11576
  * @LastEditors: binruan@chatlabs.com
11544
- * @LastEditTime: 2024-08-09 16:59:44
11577
+ * @LastEditTime: 2024-09-09 13:59:50
11545
11578
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11546
11579
  *
11547
11580
  */
@@ -11551,7 +11584,8 @@ Made in Italy` })));
11551
11584
  child: [
11552
11585
  {
11553
11586
  type: 'link',
11554
- name: 'onClick'
11587
+ name: 'onClick',
11588
+ hiddenUrl: true
11555
11589
  }
11556
11590
  ]
11557
11591
  }
@@ -11559,7 +11593,7 @@ Made in Italy` })));
11559
11593
 
11560
11594
  var _a;
11561
11595
  const Link = createMaterial(LinkComponent, {
11562
- displayName: '跳转指引',
11596
+ displayName: '普通CTA',
11563
11597
  icon: '',
11564
11598
  category: 'template',
11565
11599
  type: 'Link',
@@ -11618,7 +11652,8 @@ Made in Italy` })));
11618
11652
  child: [
11619
11653
  {
11620
11654
  type: 'link',
11621
- name: 'onClick'
11655
+ name: 'onClick',
11656
+ hiddenUrl: true
11622
11657
  }
11623
11658
  ]
11624
11659
  }
@@ -11713,7 +11748,8 @@ Made in Italy` })));
11713
11748
  child: [
11714
11749
  {
11715
11750
  type: 'link',
11716
- name: 'onClick'
11751
+ name: 'onClick',
11752
+ hiddenUrl: true
11717
11753
  }
11718
11754
  ]
11719
11755
  }
@@ -11809,7 +11845,8 @@ Made in Italy` })));
11809
11845
  child: [
11810
11846
  {
11811
11847
  type: 'link',
11812
- name: 'onClick'
11848
+ name: 'onClick',
11849
+ hiddenUrl: true
11813
11850
  }
11814
11851
  ]
11815
11852
  }
@@ -11924,7 +11961,8 @@ Made in Italy` })));
11924
11961
  child: [
11925
11962
  {
11926
11963
  type: 'link',
11927
- name: 'onClick'
11964
+ name: 'onClick',
11965
+ hiddenUrl: true
11928
11966
  }
11929
11967
  ]
11930
11968
  }
@@ -12034,13 +12072,22 @@ Made in Italy` })));
12034
12072
  sort: 3
12035
12073
  });
12036
12074
 
12075
+ /*
12076
+ * @Author: binruan@chatlabs.com
12077
+ * @Date: 2024-03-20 10:27:32
12078
+ * @LastEditors: binruan@chatlabs.com
12079
+ * @LastEditTime: 2024-09-09 13:56:10
12080
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
12081
+ *
12082
+ */
12037
12083
  var interactionRender$2 = [
12038
12084
  {
12039
12085
  title: '点击事件',
12040
12086
  child: [
12041
12087
  {
12042
12088
  type: 'link',
12043
- name: 'onClick'
12089
+ name: 'onClick',
12090
+ hiddenUrl: true
12044
12091
  }
12045
12092
  ]
12046
12093
  }
@@ -12270,7 +12317,8 @@ Made in Italy` })));
12270
12317
  label: '价格千分符展示',
12271
12318
  type: 'Switch',
12272
12319
  name: ['enableFormattedPrice'],
12273
- initialValue: true
12320
+ initialValue: true,
12321
+ belong: 'price'
12274
12322
  }
12275
12323
  ]
12276
12324
  }
@@ -13693,7 +13741,7 @@ Made in Italy` })));
13693
13741
  const WaterfallFlowItem$1 = (props) => {
13694
13742
  var _a;
13695
13743
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
13696
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13744
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
13697
13745
  const [showVideo, setShowVideo] = React.useState(false);
13698
13746
  React.useState(false);
13699
13747
  React.useState({
@@ -13744,20 +13792,11 @@ Made in Italy` })));
13744
13792
  return false;
13745
13793
  }
13746
13794
  }, [top, showBorder]);
13747
- const priceText = React.useMemo(() => {
13748
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13749
- 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);
13750
- 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)) {
13751
- 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
13752
- ? (_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', {
13753
- minimumFractionDigits: 0
13754
- })) !== null && _l !== void 0 ? _l : ''
13755
- : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
13756
- }
13757
- else {
13758
- return null;
13759
- }
13760
- }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
13795
+ const priceText = getPriceText({
13796
+ product: rec === null || rec === void 0 ? void 0 : rec.product,
13797
+ enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
13798
+ globalConfig
13799
+ });
13761
13800
  React.useEffect(() => {
13762
13801
  if (imgDom.current === null || src === '') {
13763
13802
  return;
@@ -14043,7 +14082,7 @@ Made in Italy` })));
14043
14082
  const WaterfallFlowItem = (props) => {
14044
14083
  var _a;
14045
14084
  const { rec, index, list, reportTagsView, textStyles, space } = props;
14046
- const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
14085
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
14047
14086
  const [showVideo, setShowVideo] = React.useState(false);
14048
14087
  const imgDom = React.useRef(null);
14049
14088
  const ref = React.useRef(null);
@@ -14069,20 +14108,11 @@ Made in Italy` })));
14069
14108
  var _a, _b;
14070
14109
  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;
14071
14110
  }, [rec]);
14072
- const priceText = React.useMemo(() => {
14073
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
14074
- 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);
14075
- 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)) {
14076
- 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
14077
- ? (_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', {
14078
- minimumFractionDigits: 0
14079
- })) !== null && _l !== void 0 ? _l : ''
14080
- : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
14081
- }
14082
- else {
14083
- return null;
14084
- }
14085
- }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
14111
+ const priceText = getPriceText({
14112
+ product: rec === null || rec === void 0 ? void 0 : rec.product,
14113
+ enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
14114
+ globalConfig
14115
+ });
14086
14116
  // useEffect(() => {
14087
14117
  // if (imgDom.current === null || src === '') {
14088
14118
  // return;
@@ -14730,7 +14760,7 @@ Made in Italy` })));
14730
14760
  * @Author: binruan@chatlabs.com
14731
14761
  * @Date: 2024-07-05 14:08:41
14732
14762
  * @LastEditors: binruan@chatlabs.com
14733
- * @LastEditTime: 2024-08-02 16:22:39
14763
+ * @LastEditTime: 2024-09-09 14:05:04
14734
14764
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
14735
14765
  *
14736
14766
  */
@@ -14740,7 +14770,8 @@ Made in Italy` })));
14740
14770
  child: [
14741
14771
  {
14742
14772
  type: 'link',
14743
- name: 'onClick'
14773
+ name: 'onClick',
14774
+ hiddenUrl: true
14744
14775
  }
14745
14776
  ]
14746
14777
  },
@@ -15164,13 +15195,22 @@ Made in Italy` })));
15164
15195
  };
15165
15196
  var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
15166
15197
 
15198
+ /*
15199
+ * @Author: binruan@chatlabs.com
15200
+ * @Date: 2024-07-24 14:58:40
15201
+ * @LastEditors: binruan@chatlabs.com
15202
+ * @LastEditTime: 2024-09-09 13:54:35
15203
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
15204
+ *
15205
+ */
15167
15206
  var interactionRender = [
15168
15207
  {
15169
15208
  title: '点击事件',
15170
15209
  child: [
15171
15210
  {
15172
15211
  type: 'link',
15173
- name: 'onClick'
15212
+ name: 'onClick',
15213
+ hiddenUrl: true
15174
15214
  }
15175
15215
  ]
15176
15216
  },
@@ -16155,7 +16195,7 @@ Made in Italy` })));
16155
16195
  * @Author: binruan@chatlabs.com
16156
16196
  * @Date: 2024-01-15 19:03:09
16157
16197
  * @LastEditors: binruan@chatlabs.com
16158
- * @LastEditTime: 2024-08-30 11:42:11
16198
+ * @LastEditTime: 2024-09-11 15:36:28
16159
16199
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16160
16200
  *
16161
16201
  */
@@ -16332,6 +16372,8 @@ Made in Italy` })));
16332
16372
  return null;
16333
16373
  }
16334
16374
  });
16375
+ if (!(list === null || list === void 0 ? void 0 : list.length))
16376
+ return [];
16335
16377
  return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16336
16378
  }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16337
16379
  const renderLogo = React.useMemo(() => {