pb-sxp-ui 1.4.4 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +171 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +171 -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 +171 -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 +54 -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 +56 -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,97 @@
|
|
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-13 15:06:44
|
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;
|
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) {
|
9265
|
+
// text = text.slice(0, decInd) + ',' + text.slice(decInd + 1);
|
9266
|
+
text = text = text === null || text === void 0 ? void 0 : text.replace(/\./g, function (match, index) {
|
9267
|
+
if (index >= decInd && index < (text === null || text === void 0 ? void 0 : text.length)) {
|
9268
|
+
return ',';
|
9269
|
+
}
|
9270
|
+
else {
|
9271
|
+
return match;
|
9272
|
+
}
|
9273
|
+
});
|
9274
|
+
}
|
9275
|
+
if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) && (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
|
9276
|
+
text = (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) === 'left' ? currency + text : text + currency;
|
9277
|
+
}
|
9278
|
+
else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
|
9279
|
+
text = currency + text;
|
9280
|
+
}
|
9281
|
+
return text;
|
9282
|
+
};
|
9283
|
+
|
9194
9284
|
const CommodityDetail$1 = (_a) => {
|
9195
9285
|
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
9286
|
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();
|
9287
|
+
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
9198
9288
|
const { jumpToWeb, productView } = useEventReport();
|
9199
9289
|
const curTimeRef = React.useRef(null);
|
9200
9290
|
const [showModal, setShowModal] = React.useState(false);
|
@@ -9239,20 +9329,11 @@
|
|
9239
9329
|
window.removeEventListener('pageshow', initTime);
|
9240
9330
|
};
|
9241
9331
|
}, []);
|
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]);
|
9332
|
+
const priceText = getPriceText({
|
9333
|
+
product: product,
|
9334
|
+
enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
|
9335
|
+
globalConfig
|
9336
|
+
});
|
9256
9337
|
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
9338
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9258
9339
|
const renderContent = ({ isPost }) => {
|
@@ -9632,38 +9713,6 @@
|
|
9632
9713
|
|
9633
9714
|
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
9715
|
|
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
9716
|
const Prompt$1 = (_a) => {
|
9668
9717
|
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
9718
|
const { popupDetailData } = useSxpDataSource();
|
@@ -9928,7 +9977,8 @@
|
|
9928
9977
|
label: '价格千分符展示',
|
9929
9978
|
type: 'Switch',
|
9930
9979
|
name: ['enableFormattedPrice'],
|
9931
|
-
initialValue: true
|
9980
|
+
initialValue: true,
|
9981
|
+
belong: 'price'
|
9932
9982
|
}
|
9933
9983
|
]
|
9934
9984
|
}
|
@@ -10077,7 +10127,7 @@
|
|
10077
10127
|
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
10128
|
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
10129
|
React.useState(true);
|
10080
|
-
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
10130
|
+
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
10081
10131
|
const { jumpToWeb, productView } = useEventReport();
|
10082
10132
|
React.useState(false);
|
10083
10133
|
React.useState(false);
|
@@ -10125,20 +10175,11 @@
|
|
10125
10175
|
window.removeEventListener('pageshow', initTime);
|
10126
10176
|
};
|
10127
10177
|
}, []);
|
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]);
|
10178
|
+
const priceText = getPriceText({
|
10179
|
+
product,
|
10180
|
+
enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
|
10181
|
+
globalConfig
|
10182
|
+
});
|
10142
10183
|
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
10184
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
10144
10185
|
// useEffect(() => {
|
@@ -10570,7 +10611,8 @@ Made in Italy` })));
|
|
10570
10611
|
label: '价格千分符展示',
|
10571
10612
|
type: 'Switch',
|
10572
10613
|
name: ['enableFormattedPrice'],
|
10573
|
-
initialValue: true
|
10614
|
+
initialValue: true,
|
10615
|
+
belong: 'price'
|
10574
10616
|
}
|
10575
10617
|
]
|
10576
10618
|
}
|
@@ -10725,27 +10767,20 @@ Made in Italy` })));
|
|
10725
10767
|
const CommodityList$1 = (_a) => {
|
10726
10768
|
var _b, _c, _d;
|
10727
10769
|
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();
|
10770
|
+
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
|
10729
10771
|
const { jumpToWeb } = useEventReport();
|
10730
10772
|
const { popup } = useEditor();
|
10731
10773
|
const recData = isPost ? rec : popupDetailData;
|
10732
10774
|
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
10775
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10734
10776
|
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]);
|
10777
|
+
var _a;
|
10778
|
+
return getPriceText({
|
10779
|
+
product,
|
10780
|
+
enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
10781
|
+
globalConfig
|
10782
|
+
});
|
10783
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
10749
10784
|
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
10750
10785
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10751
10786
|
eventSubject: 'clickCta',
|
@@ -11202,7 +11237,8 @@ Made in Italy` })));
|
|
11202
11237
|
child: [
|
11203
11238
|
{
|
11204
11239
|
type: 'link',
|
11205
|
-
name: 'onClick'
|
11240
|
+
name: 'onClick',
|
11241
|
+
hiddenUrl: true
|
11206
11242
|
}
|
11207
11243
|
]
|
11208
11244
|
}
|
@@ -11327,7 +11363,8 @@ Made in Italy` })));
|
|
11327
11363
|
child: [
|
11328
11364
|
{
|
11329
11365
|
type: 'link',
|
11330
|
-
name: 'onClick'
|
11366
|
+
name: 'onClick',
|
11367
|
+
hiddenUrl: true
|
11331
11368
|
}
|
11332
11369
|
]
|
11333
11370
|
}
|
@@ -11545,7 +11582,7 @@ Made in Italy` })));
|
|
11545
11582
|
* @Author: binruan@chatlabs.com
|
11546
11583
|
* @Date: 2024-08-09 16:59:38
|
11547
11584
|
* @LastEditors: binruan@chatlabs.com
|
11548
|
-
* @LastEditTime: 2024-
|
11585
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
11549
11586
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
11550
11587
|
*
|
11551
11588
|
*/
|
@@ -11555,7 +11592,8 @@ Made in Italy` })));
|
|
11555
11592
|
child: [
|
11556
11593
|
{
|
11557
11594
|
type: 'link',
|
11558
|
-
name: 'onClick'
|
11595
|
+
name: 'onClick',
|
11596
|
+
hiddenUrl: true
|
11559
11597
|
}
|
11560
11598
|
]
|
11561
11599
|
}
|
@@ -11563,7 +11601,7 @@ Made in Italy` })));
|
|
11563
11601
|
|
11564
11602
|
var _a;
|
11565
11603
|
const Link = createMaterial(LinkComponent, {
|
11566
|
-
displayName: '
|
11604
|
+
displayName: '普通CTA',
|
11567
11605
|
icon: '',
|
11568
11606
|
category: 'template',
|
11569
11607
|
type: 'Link',
|
@@ -11622,7 +11660,8 @@ Made in Italy` })));
|
|
11622
11660
|
child: [
|
11623
11661
|
{
|
11624
11662
|
type: 'link',
|
11625
|
-
name: 'onClick'
|
11663
|
+
name: 'onClick',
|
11664
|
+
hiddenUrl: true
|
11626
11665
|
}
|
11627
11666
|
]
|
11628
11667
|
}
|
@@ -11717,7 +11756,8 @@ Made in Italy` })));
|
|
11717
11756
|
child: [
|
11718
11757
|
{
|
11719
11758
|
type: 'link',
|
11720
|
-
name: 'onClick'
|
11759
|
+
name: 'onClick',
|
11760
|
+
hiddenUrl: true
|
11721
11761
|
}
|
11722
11762
|
]
|
11723
11763
|
}
|
@@ -11813,7 +11853,8 @@ Made in Italy` })));
|
|
11813
11853
|
child: [
|
11814
11854
|
{
|
11815
11855
|
type: 'link',
|
11816
|
-
name: 'onClick'
|
11856
|
+
name: 'onClick',
|
11857
|
+
hiddenUrl: true
|
11817
11858
|
}
|
11818
11859
|
]
|
11819
11860
|
}
|
@@ -11928,7 +11969,8 @@ Made in Italy` })));
|
|
11928
11969
|
child: [
|
11929
11970
|
{
|
11930
11971
|
type: 'link',
|
11931
|
-
name: 'onClick'
|
11972
|
+
name: 'onClick',
|
11973
|
+
hiddenUrl: true
|
11932
11974
|
}
|
11933
11975
|
]
|
11934
11976
|
}
|
@@ -12038,13 +12080,22 @@ Made in Italy` })));
|
|
12038
12080
|
sort: 3
|
12039
12081
|
});
|
12040
12082
|
|
12083
|
+
/*
|
12084
|
+
* @Author: binruan@chatlabs.com
|
12085
|
+
* @Date: 2024-03-20 10:27:32
|
12086
|
+
* @LastEditors: binruan@chatlabs.com
|
12087
|
+
* @LastEditTime: 2024-09-09 13:56:10
|
12088
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
|
12089
|
+
*
|
12090
|
+
*/
|
12041
12091
|
var interactionRender$2 = [
|
12042
12092
|
{
|
12043
12093
|
title: '点击事件',
|
12044
12094
|
child: [
|
12045
12095
|
{
|
12046
12096
|
type: 'link',
|
12047
|
-
name: 'onClick'
|
12097
|
+
name: 'onClick',
|
12098
|
+
hiddenUrl: true
|
12048
12099
|
}
|
12049
12100
|
]
|
12050
12101
|
}
|
@@ -12274,7 +12325,8 @@ Made in Italy` })));
|
|
12274
12325
|
label: '价格千分符展示',
|
12275
12326
|
type: 'Switch',
|
12276
12327
|
name: ['enableFormattedPrice'],
|
12277
|
-
initialValue: true
|
12328
|
+
initialValue: true,
|
12329
|
+
belong: 'price'
|
12278
12330
|
}
|
12279
12331
|
]
|
12280
12332
|
}
|
@@ -13697,7 +13749,7 @@ Made in Italy` })));
|
|
13697
13749
|
const WaterfallFlowItem$1 = (props) => {
|
13698
13750
|
var _a;
|
13699
13751
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13700
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13752
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
13701
13753
|
const [showVideo, setShowVideo] = React.useState(false);
|
13702
13754
|
React.useState(false);
|
13703
13755
|
React.useState({
|
@@ -13748,20 +13800,11 @@ Made in Italy` })));
|
|
13748
13800
|
return false;
|
13749
13801
|
}
|
13750
13802
|
}, [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]);
|
13803
|
+
const priceText = getPriceText({
|
13804
|
+
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
13805
|
+
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
13806
|
+
globalConfig
|
13807
|
+
});
|
13765
13808
|
React.useEffect(() => {
|
13766
13809
|
if (imgDom.current === null || src === '') {
|
13767
13810
|
return;
|
@@ -14047,7 +14090,7 @@ Made in Italy` })));
|
|
14047
14090
|
const WaterfallFlowItem = (props) => {
|
14048
14091
|
var _a;
|
14049
14092
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
14050
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
14093
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
14051
14094
|
const [showVideo, setShowVideo] = React.useState(false);
|
14052
14095
|
const imgDom = React.useRef(null);
|
14053
14096
|
const ref = React.useRef(null);
|
@@ -14073,20 +14116,11 @@ Made in Italy` })));
|
|
14073
14116
|
var _a, _b;
|
14074
14117
|
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
14118
|
}, [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]);
|
14119
|
+
const priceText = getPriceText({
|
14120
|
+
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
14121
|
+
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
14122
|
+
globalConfig
|
14123
|
+
});
|
14090
14124
|
// useEffect(() => {
|
14091
14125
|
// if (imgDom.current === null || src === '') {
|
14092
14126
|
// return;
|
@@ -14734,7 +14768,7 @@ Made in Italy` })));
|
|
14734
14768
|
* @Author: binruan@chatlabs.com
|
14735
14769
|
* @Date: 2024-07-05 14:08:41
|
14736
14770
|
* @LastEditors: binruan@chatlabs.com
|
14737
|
-
* @LastEditTime: 2024-
|
14771
|
+
* @LastEditTime: 2024-09-09 14:05:04
|
14738
14772
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
14739
14773
|
*
|
14740
14774
|
*/
|
@@ -14744,7 +14778,8 @@ Made in Italy` })));
|
|
14744
14778
|
child: [
|
14745
14779
|
{
|
14746
14780
|
type: 'link',
|
14747
|
-
name: 'onClick'
|
14781
|
+
name: 'onClick',
|
14782
|
+
hiddenUrl: true
|
14748
14783
|
}
|
14749
14784
|
]
|
14750
14785
|
},
|
@@ -15168,13 +15203,22 @@ Made in Italy` })));
|
|
15168
15203
|
};
|
15169
15204
|
var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
|
15170
15205
|
|
15206
|
+
/*
|
15207
|
+
* @Author: binruan@chatlabs.com
|
15208
|
+
* @Date: 2024-07-24 14:58:40
|
15209
|
+
* @LastEditors: binruan@chatlabs.com
|
15210
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
15211
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
15212
|
+
*
|
15213
|
+
*/
|
15171
15214
|
var interactionRender = [
|
15172
15215
|
{
|
15173
15216
|
title: '点击事件',
|
15174
15217
|
child: [
|
15175
15218
|
{
|
15176
15219
|
type: 'link',
|
15177
|
-
name: 'onClick'
|
15220
|
+
name: 'onClick',
|
15221
|
+
hiddenUrl: true
|
15178
15222
|
}
|
15179
15223
|
]
|
15180
15224
|
},
|
@@ -16159,7 +16203,7 @@ Made in Italy` })));
|
|
16159
16203
|
* @Author: binruan@chatlabs.com
|
16160
16204
|
* @Date: 2024-01-15 19:03:09
|
16161
16205
|
* @LastEditors: binruan@chatlabs.com
|
16162
|
-
* @LastEditTime: 2024-
|
16206
|
+
* @LastEditTime: 2024-09-11 15:36:28
|
16163
16207
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16164
16208
|
*
|
16165
16209
|
*/
|
@@ -16336,6 +16380,8 @@ Made in Italy` })));
|
|
16336
16380
|
return null;
|
16337
16381
|
}
|
16338
16382
|
});
|
16383
|
+
if (!(list === null || list === void 0 ? void 0 : list.length))
|
16384
|
+
return [];
|
16339
16385
|
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16340
16386
|
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16341
16387
|
const renderLogo = React.useMemo(() => {
|