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.
- package/dist/index.cjs +163 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +163 -125
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +163 -125
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +7 -15
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
- package/es/core/components/SxpPageRender/index.d.ts +6 -0
- package/es/core/components/SxpPageRender/index.js +2 -0
- package/es/core/context/SxpDataSourceProvider.js +2 -0
- package/es/core/utils/materials.d.ts +7 -0
- package/es/core/utils/materials.js +47 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +5 -0
- package/es/materials/sxp/HashTag/settingRender.js +2 -1
- package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.js +2 -1
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
- package/es/materials/sxp/popup/CommodityList/index.js +9 -15
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +2 -1
- package/es/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Appoint/interactionRender.js +2 -1
- package/es/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/interactionRender.js +2 -1
- package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
- package/es/materials/sxp/template/Link/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Link/interactionRender.js +2 -1
- package/es/materials/sxp/template/Link/material.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +7 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
- package/lib/core/components/SxpPageRender/index.d.ts +6 -0
- package/lib/core/components/SxpPageRender/index.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +2 -0
- package/lib/core/utils/materials.d.ts +7 -0
- package/lib/core/utils/materials.js +49 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +5 -0
- package/lib/materials/sxp/HashTag/settingRender.js +2 -1
- package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.js +2 -1
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +9 -15
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +2 -1
- package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Appoint/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/interactionRender.js +2 -1
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Link/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Link/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Link/material.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
- 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
|
}
|
@@ -9191,10 +9194,89 @@
|
|
9191
9194
|
};
|
9192
9195
|
var CommodityGroup$1 = React.memo(CommodityGroup);
|
9193
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
|
+
|
9194
9276
|
const CommodityDetail$1 = (_a) => {
|
9195
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;
|
9196
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"]);
|
9197
|
-
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9279
|
+
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
9198
9280
|
const { jumpToWeb, productView } = useEventReport();
|
9199
9281
|
const curTimeRef = React.useRef(null);
|
9200
9282
|
const [showModal, setShowModal] = React.useState(false);
|
@@ -9239,20 +9321,11 @@
|
|
9239
9321
|
window.removeEventListener('pageshow', initTime);
|
9240
9322
|
};
|
9241
9323
|
}, []);
|
9242
|
-
const priceText =
|
9243
|
-
|
9244
|
-
|
9245
|
-
|
9246
|
-
|
9247
|
-
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9248
|
-
minimumFractionDigits: 0
|
9249
|
-
})) !== null && _g !== void 0 ? _g : ''
|
9250
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
9251
|
-
}
|
9252
|
-
else {
|
9253
|
-
return '$7,000';
|
9254
|
-
}
|
9255
|
-
}, [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
|
+
});
|
9256
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;
|
9257
9330
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9258
9331
|
const renderContent = ({ isPost }) => {
|
@@ -9632,38 +9705,6 @@
|
|
9632
9705
|
|
9633
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";
|
9634
9707
|
|
9635
|
-
/*
|
9636
|
-
* @Author: binruan@chatlabs.com
|
9637
|
-
* @Date: 2024-03-20 14:56:16
|
9638
|
-
* @LastEditors: binruan@chatlabs.com
|
9639
|
-
* @LastEditTime: 2024-03-20 14:56:22
|
9640
|
-
* @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
|
9641
|
-
*
|
9642
|
-
*/
|
9643
|
-
/*
|
9644
|
-
* @Author: binruan@chatlabs.com
|
9645
|
-
* @Date: 2023-08-03 16:37:37
|
9646
|
-
* @LastEditors: binruan@chatlabs.com
|
9647
|
-
* @LastEditTime: 2023-08-04 11:02:50
|
9648
|
-
* @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
|
9649
|
-
*
|
9650
|
-
*/
|
9651
|
-
const getMediaValueByMode = (obj) => {
|
9652
|
-
var _a;
|
9653
|
-
if (!obj || typeof obj !== 'object') {
|
9654
|
-
return null;
|
9655
|
-
}
|
9656
|
-
const { mode, link, file, src } = obj;
|
9657
|
-
switch (mode) {
|
9658
|
-
case 2:
|
9659
|
-
return link || null;
|
9660
|
-
case 3:
|
9661
|
-
return src || null;
|
9662
|
-
default:
|
9663
|
-
return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
|
9664
|
-
}
|
9665
|
-
};
|
9666
|
-
|
9667
9708
|
const Prompt$1 = (_a) => {
|
9668
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"]);
|
9669
9710
|
const { popupDetailData } = useSxpDataSource();
|
@@ -9928,7 +9969,8 @@
|
|
9928
9969
|
label: '价格千分符展示',
|
9929
9970
|
type: 'Switch',
|
9930
9971
|
name: ['enableFormattedPrice'],
|
9931
|
-
initialValue: true
|
9972
|
+
initialValue: true,
|
9973
|
+
belong: 'price'
|
9932
9974
|
}
|
9933
9975
|
]
|
9934
9976
|
}
|
@@ -10077,7 +10119,7 @@
|
|
10077
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;
|
10078
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"]);
|
10079
10121
|
React.useState(true);
|
10080
|
-
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
10122
|
+
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
10081
10123
|
const { jumpToWeb, productView } = useEventReport();
|
10082
10124
|
React.useState(false);
|
10083
10125
|
React.useState(false);
|
@@ -10125,20 +10167,11 @@
|
|
10125
10167
|
window.removeEventListener('pageshow', initTime);
|
10126
10168
|
};
|
10127
10169
|
}, []);
|
10128
|
-
const priceText =
|
10129
|
-
|
10130
|
-
|
10131
|
-
|
10132
|
-
|
10133
|
-
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10134
|
-
minimumFractionDigits: 0
|
10135
|
-
})) !== null && _g !== void 0 ? _g : ''
|
10136
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
10137
|
-
}
|
10138
|
-
else {
|
10139
|
-
return '£102,300.00';
|
10140
|
-
}
|
10141
|
-
}, [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
|
+
});
|
10142
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;
|
10143
10176
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
10144
10177
|
// useEffect(() => {
|
@@ -10570,7 +10603,8 @@ Made in Italy` })));
|
|
10570
10603
|
label: '价格千分符展示',
|
10571
10604
|
type: 'Switch',
|
10572
10605
|
name: ['enableFormattedPrice'],
|
10573
|
-
initialValue: true
|
10606
|
+
initialValue: true,
|
10607
|
+
belong: 'price'
|
10574
10608
|
}
|
10575
10609
|
]
|
10576
10610
|
}
|
@@ -10725,27 +10759,20 @@ Made in Italy` })));
|
|
10725
10759
|
const CommodityList$1 = (_a) => {
|
10726
10760
|
var _b, _c, _d;
|
10727
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"]);
|
10728
|
-
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10762
|
+
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
|
10729
10763
|
const { jumpToWeb } = useEventReport();
|
10730
10764
|
const { popup } = useEditor();
|
10731
10765
|
const recData = isPost ? rec : popupDetailData;
|
10732
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];
|
10733
10767
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10734
10768
|
const priceText = React.useCallback((product) => {
|
10735
|
-
var _a
|
10736
|
-
|
10737
|
-
|
10738
|
-
|
10739
|
-
|
10740
|
-
|
10741
|
-
|
10742
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
10743
|
-
}
|
10744
|
-
else {
|
10745
|
-
const p = 7000;
|
10746
|
-
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10747
|
-
}
|
10748
|
-
}, [(_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]);
|
10749
10776
|
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
10750
10777
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10751
10778
|
eventSubject: 'clickCta',
|
@@ -11202,7 +11229,8 @@ Made in Italy` })));
|
|
11202
11229
|
child: [
|
11203
11230
|
{
|
11204
11231
|
type: 'link',
|
11205
|
-
name: 'onClick'
|
11232
|
+
name: 'onClick',
|
11233
|
+
hiddenUrl: true
|
11206
11234
|
}
|
11207
11235
|
]
|
11208
11236
|
}
|
@@ -11327,7 +11355,8 @@ Made in Italy` })));
|
|
11327
11355
|
child: [
|
11328
11356
|
{
|
11329
11357
|
type: 'link',
|
11330
|
-
name: 'onClick'
|
11358
|
+
name: 'onClick',
|
11359
|
+
hiddenUrl: true
|
11331
11360
|
}
|
11332
11361
|
]
|
11333
11362
|
}
|
@@ -11545,7 +11574,7 @@ Made in Italy` })));
|
|
11545
11574
|
* @Author: binruan@chatlabs.com
|
11546
11575
|
* @Date: 2024-08-09 16:59:38
|
11547
11576
|
* @LastEditors: binruan@chatlabs.com
|
11548
|
-
* @LastEditTime: 2024-
|
11577
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
11549
11578
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
11550
11579
|
*
|
11551
11580
|
*/
|
@@ -11555,7 +11584,8 @@ Made in Italy` })));
|
|
11555
11584
|
child: [
|
11556
11585
|
{
|
11557
11586
|
type: 'link',
|
11558
|
-
name: 'onClick'
|
11587
|
+
name: 'onClick',
|
11588
|
+
hiddenUrl: true
|
11559
11589
|
}
|
11560
11590
|
]
|
11561
11591
|
}
|
@@ -11563,7 +11593,7 @@ Made in Italy` })));
|
|
11563
11593
|
|
11564
11594
|
var _a;
|
11565
11595
|
const Link = createMaterial(LinkComponent, {
|
11566
|
-
displayName: '
|
11596
|
+
displayName: '普通CTA',
|
11567
11597
|
icon: '',
|
11568
11598
|
category: 'template',
|
11569
11599
|
type: 'Link',
|
@@ -11622,7 +11652,8 @@ Made in Italy` })));
|
|
11622
11652
|
child: [
|
11623
11653
|
{
|
11624
11654
|
type: 'link',
|
11625
|
-
name: 'onClick'
|
11655
|
+
name: 'onClick',
|
11656
|
+
hiddenUrl: true
|
11626
11657
|
}
|
11627
11658
|
]
|
11628
11659
|
}
|
@@ -11717,7 +11748,8 @@ Made in Italy` })));
|
|
11717
11748
|
child: [
|
11718
11749
|
{
|
11719
11750
|
type: 'link',
|
11720
|
-
name: 'onClick'
|
11751
|
+
name: 'onClick',
|
11752
|
+
hiddenUrl: true
|
11721
11753
|
}
|
11722
11754
|
]
|
11723
11755
|
}
|
@@ -11813,7 +11845,8 @@ Made in Italy` })));
|
|
11813
11845
|
child: [
|
11814
11846
|
{
|
11815
11847
|
type: 'link',
|
11816
|
-
name: 'onClick'
|
11848
|
+
name: 'onClick',
|
11849
|
+
hiddenUrl: true
|
11817
11850
|
}
|
11818
11851
|
]
|
11819
11852
|
}
|
@@ -11928,7 +11961,8 @@ Made in Italy` })));
|
|
11928
11961
|
child: [
|
11929
11962
|
{
|
11930
11963
|
type: 'link',
|
11931
|
-
name: 'onClick'
|
11964
|
+
name: 'onClick',
|
11965
|
+
hiddenUrl: true
|
11932
11966
|
}
|
11933
11967
|
]
|
11934
11968
|
}
|
@@ -12038,13 +12072,22 @@ Made in Italy` })));
|
|
12038
12072
|
sort: 3
|
12039
12073
|
});
|
12040
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
|
+
*/
|
12041
12083
|
var interactionRender$2 = [
|
12042
12084
|
{
|
12043
12085
|
title: '点击事件',
|
12044
12086
|
child: [
|
12045
12087
|
{
|
12046
12088
|
type: 'link',
|
12047
|
-
name: 'onClick'
|
12089
|
+
name: 'onClick',
|
12090
|
+
hiddenUrl: true
|
12048
12091
|
}
|
12049
12092
|
]
|
12050
12093
|
}
|
@@ -12274,7 +12317,8 @@ Made in Italy` })));
|
|
12274
12317
|
label: '价格千分符展示',
|
12275
12318
|
type: 'Switch',
|
12276
12319
|
name: ['enableFormattedPrice'],
|
12277
|
-
initialValue: true
|
12320
|
+
initialValue: true,
|
12321
|
+
belong: 'price'
|
12278
12322
|
}
|
12279
12323
|
]
|
12280
12324
|
}
|
@@ -13697,7 +13741,7 @@ Made in Italy` })));
|
|
13697
13741
|
const WaterfallFlowItem$1 = (props) => {
|
13698
13742
|
var _a;
|
13699
13743
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13700
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13744
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
13701
13745
|
const [showVideo, setShowVideo] = React.useState(false);
|
13702
13746
|
React.useState(false);
|
13703
13747
|
React.useState({
|
@@ -13748,20 +13792,11 @@ Made in Italy` })));
|
|
13748
13792
|
return false;
|
13749
13793
|
}
|
13750
13794
|
}, [top, showBorder]);
|
13751
|
-
const priceText =
|
13752
|
-
|
13753
|
-
|
13754
|
-
|
13755
|
-
|
13756
|
-
? (_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', {
|
13757
|
-
minimumFractionDigits: 0
|
13758
|
-
})) !== null && _l !== void 0 ? _l : ''
|
13759
|
-
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13760
|
-
}
|
13761
|
-
else {
|
13762
|
-
return null;
|
13763
|
-
}
|
13764
|
-
}, [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
|
+
});
|
13765
13800
|
React.useEffect(() => {
|
13766
13801
|
if (imgDom.current === null || src === '') {
|
13767
13802
|
return;
|
@@ -14047,7 +14082,7 @@ Made in Italy` })));
|
|
14047
14082
|
const WaterfallFlowItem = (props) => {
|
14048
14083
|
var _a;
|
14049
14084
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
14050
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
14085
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
14051
14086
|
const [showVideo, setShowVideo] = React.useState(false);
|
14052
14087
|
const imgDom = React.useRef(null);
|
14053
14088
|
const ref = React.useRef(null);
|
@@ -14073,20 +14108,11 @@ Made in Italy` })));
|
|
14073
14108
|
var _a, _b;
|
14074
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;
|
14075
14110
|
}, [rec]);
|
14076
|
-
const priceText =
|
14077
|
-
|
14078
|
-
|
14079
|
-
|
14080
|
-
|
14081
|
-
? (_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', {
|
14082
|
-
minimumFractionDigits: 0
|
14083
|
-
})) !== null && _l !== void 0 ? _l : ''
|
14084
|
-
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
14085
|
-
}
|
14086
|
-
else {
|
14087
|
-
return null;
|
14088
|
-
}
|
14089
|
-
}, [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
|
+
});
|
14090
14116
|
// useEffect(() => {
|
14091
14117
|
// if (imgDom.current === null || src === '') {
|
14092
14118
|
// return;
|
@@ -14734,7 +14760,7 @@ Made in Italy` })));
|
|
14734
14760
|
* @Author: binruan@chatlabs.com
|
14735
14761
|
* @Date: 2024-07-05 14:08:41
|
14736
14762
|
* @LastEditors: binruan@chatlabs.com
|
14737
|
-
* @LastEditTime: 2024-
|
14763
|
+
* @LastEditTime: 2024-09-09 14:05:04
|
14738
14764
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
14739
14765
|
*
|
14740
14766
|
*/
|
@@ -14744,7 +14770,8 @@ Made in Italy` })));
|
|
14744
14770
|
child: [
|
14745
14771
|
{
|
14746
14772
|
type: 'link',
|
14747
|
-
name: 'onClick'
|
14773
|
+
name: 'onClick',
|
14774
|
+
hiddenUrl: true
|
14748
14775
|
}
|
14749
14776
|
]
|
14750
14777
|
},
|
@@ -15168,13 +15195,22 @@ Made in Italy` })));
|
|
15168
15195
|
};
|
15169
15196
|
var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
|
15170
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
|
+
*/
|
15171
15206
|
var interactionRender = [
|
15172
15207
|
{
|
15173
15208
|
title: '点击事件',
|
15174
15209
|
child: [
|
15175
15210
|
{
|
15176
15211
|
type: 'link',
|
15177
|
-
name: 'onClick'
|
15212
|
+
name: 'onClick',
|
15213
|
+
hiddenUrl: true
|
15178
15214
|
}
|
15179
15215
|
]
|
15180
15216
|
},
|
@@ -16159,7 +16195,7 @@ Made in Italy` })));
|
|
16159
16195
|
* @Author: binruan@chatlabs.com
|
16160
16196
|
* @Date: 2024-01-15 19:03:09
|
16161
16197
|
* @LastEditors: binruan@chatlabs.com
|
16162
|
-
* @LastEditTime: 2024-
|
16198
|
+
* @LastEditTime: 2024-09-11 15:36:28
|
16163
16199
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16164
16200
|
*
|
16165
16201
|
*/
|
@@ -16336,6 +16372,8 @@ Made in Italy` })));
|
|
16336
16372
|
return null;
|
16337
16373
|
}
|
16338
16374
|
});
|
16375
|
+
if (!(list === null || list === void 0 ? void 0 : list.length))
|
16376
|
+
return [];
|
16339
16377
|
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16340
16378
|
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16341
16379
|
const renderLogo = React.useMemo(() => {
|