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/index.js
CHANGED
@@ -725,6 +725,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
725
725
|
}
|
726
726
|
setLoading(false);
|
727
727
|
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 : []);
|
728
|
+
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
|
729
|
+
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result.data), { recList: list })));
|
728
730
|
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));
|
729
731
|
if (isNotNullList) {
|
730
732
|
pageNum = pageNum + 1;
|
@@ -1901,7 +1903,8 @@ var settingRender$9 = [
|
|
1901
1903
|
label: '价格千分符展示',
|
1902
1904
|
type: 'Switch',
|
1903
1905
|
name: ['enableFormattedPrice'],
|
1904
|
-
initialValue: true
|
1906
|
+
initialValue: true,
|
1907
|
+
belong: 'price'
|
1905
1908
|
}
|
1906
1909
|
]
|
1907
1910
|
}
|
@@ -9176,10 +9179,97 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
9176
9179
|
};
|
9177
9180
|
var CommodityGroup$1 = memo(CommodityGroup);
|
9178
9181
|
|
9182
|
+
/*
|
9183
|
+
* @Author: binruan@chatlabs.com
|
9184
|
+
* @Date: 2024-03-20 14:56:16
|
9185
|
+
* @LastEditors: binruan@chatlabs.com
|
9186
|
+
* @LastEditTime: 2024-09-13 15:06:44
|
9187
|
+
* @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
|
9188
|
+
*
|
9189
|
+
*/
|
9190
|
+
/*
|
9191
|
+
* @Author: binruan@chatlabs.com
|
9192
|
+
* @Date: 2023-08-03 16:37:37
|
9193
|
+
* @LastEditors: binruan@chatlabs.com
|
9194
|
+
* @LastEditTime: 2023-08-04 11:02:50
|
9195
|
+
* @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
|
9196
|
+
*
|
9197
|
+
*/
|
9198
|
+
const getMediaValueByMode = (obj) => {
|
9199
|
+
var _a;
|
9200
|
+
if (!obj || typeof obj !== 'object') {
|
9201
|
+
return null;
|
9202
|
+
}
|
9203
|
+
const { mode, link, file, src } = obj;
|
9204
|
+
switch (mode) {
|
9205
|
+
case 2:
|
9206
|
+
return link || null;
|
9207
|
+
case 3:
|
9208
|
+
return src || null;
|
9209
|
+
default:
|
9210
|
+
return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
|
9211
|
+
}
|
9212
|
+
};
|
9213
|
+
const getPriceText = ({ product, enableFormattedPrice, globalConfig }) => {
|
9214
|
+
var _a, _b, _c, _d, _e;
|
9215
|
+
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;
|
9216
|
+
let text = '';
|
9217
|
+
let priceSymbol = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.priceSymbol;
|
9218
|
+
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 : '' : '$';
|
9219
|
+
const isToLocStr = enableFormattedPrice === undefined || enableFormattedPrice;
|
9220
|
+
let decPic = price.toString();
|
9221
|
+
if (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) {
|
9222
|
+
decPic = price === null || price === void 0 ? void 0 : price.toFixed(2);
|
9223
|
+
}
|
9224
|
+
let decInd = (_d = decPic === null || decPic === void 0 ? void 0 : decPic.indexOf('.')) !== null && _d !== void 0 ? _d : -1;
|
9225
|
+
if (isToLocStr) {
|
9226
|
+
text =
|
9227
|
+
(_e = price === null || price === void 0 ? void 0 : price.toLocaleString('zh', {
|
9228
|
+
minimumFractionDigits: (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) ? 2 : 0
|
9229
|
+
})) !== null && _e !== void 0 ? _e : '';
|
9230
|
+
let startIndex = 0;
|
9231
|
+
let endIndex = decInd !== null && decInd !== void 0 ? decInd : text === null || text === void 0 ? void 0 : text.length;
|
9232
|
+
if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) === '.') {
|
9233
|
+
text = text === null || text === void 0 ? void 0 : text.replace(/\,/g, function (match, index) {
|
9234
|
+
if (index >= startIndex && index < endIndex) {
|
9235
|
+
return '.';
|
9236
|
+
}
|
9237
|
+
else {
|
9238
|
+
return match;
|
9239
|
+
}
|
9240
|
+
});
|
9241
|
+
}
|
9242
|
+
else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) === ' ') {
|
9243
|
+
text = text === null || text === void 0 ? void 0 : text.replace(',', ' ');
|
9244
|
+
}
|
9245
|
+
}
|
9246
|
+
else {
|
9247
|
+
text = `${(priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) ? price === null || price === void 0 ? void 0 : price.toFixed(2) : price}`;
|
9248
|
+
}
|
9249
|
+
if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.decimalPoint) === ',' && decInd > 0) {
|
9250
|
+
// text = text.slice(0, decInd) + ',' + text.slice(decInd + 1);
|
9251
|
+
text = text = text === null || text === void 0 ? void 0 : text.replace(/\./g, function (match, index) {
|
9252
|
+
if (index >= decInd && index < (text === null || text === void 0 ? void 0 : text.length)) {
|
9253
|
+
return ',';
|
9254
|
+
}
|
9255
|
+
else {
|
9256
|
+
return match;
|
9257
|
+
}
|
9258
|
+
});
|
9259
|
+
}
|
9260
|
+
if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) && (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
|
9261
|
+
text = (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) === 'left' ? currency + text : text + currency;
|
9262
|
+
}
|
9263
|
+
else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
|
9264
|
+
text = currency + text;
|
9265
|
+
}
|
9266
|
+
return text;
|
9267
|
+
};
|
9268
|
+
|
9179
9269
|
const CommodityDetail$1 = (_a) => {
|
9180
9270
|
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;
|
9181
9271
|
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"]);
|
9182
|
-
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9272
|
+
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
9183
9273
|
const { jumpToWeb, productView } = useEventReport();
|
9184
9274
|
const curTimeRef = useRef(null);
|
9185
9275
|
const [showModal, setShowModal] = useState(false);
|
@@ -9224,20 +9314,11 @@ const CommodityDetail$1 = (_a) => {
|
|
9224
9314
|
window.removeEventListener('pageshow', initTime);
|
9225
9315
|
};
|
9226
9316
|
}, []);
|
9227
|
-
const priceText =
|
9228
|
-
|
9229
|
-
|
9230
|
-
|
9231
|
-
|
9232
|
-
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9233
|
-
minimumFractionDigits: 0
|
9234
|
-
})) !== null && _g !== void 0 ? _g : ''
|
9235
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
9236
|
-
}
|
9237
|
-
else {
|
9238
|
-
return '$7,000';
|
9239
|
-
}
|
9240
|
-
}, [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]);
|
9317
|
+
const priceText = getPriceText({
|
9318
|
+
product: product,
|
9319
|
+
enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
|
9320
|
+
globalConfig
|
9321
|
+
});
|
9241
9322
|
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;
|
9242
9323
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9243
9324
|
const renderContent = ({ isPost }) => {
|
@@ -9617,38 +9698,6 @@ var settingRender$8 = [
|
|
9617
9698
|
|
9618
9699
|
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";
|
9619
9700
|
|
9620
|
-
/*
|
9621
|
-
* @Author: binruan@chatlabs.com
|
9622
|
-
* @Date: 2024-03-20 14:56:16
|
9623
|
-
* @LastEditors: binruan@chatlabs.com
|
9624
|
-
* @LastEditTime: 2024-03-20 14:56:22
|
9625
|
-
* @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
|
9626
|
-
*
|
9627
|
-
*/
|
9628
|
-
/*
|
9629
|
-
* @Author: binruan@chatlabs.com
|
9630
|
-
* @Date: 2023-08-03 16:37:37
|
9631
|
-
* @LastEditors: binruan@chatlabs.com
|
9632
|
-
* @LastEditTime: 2023-08-04 11:02:50
|
9633
|
-
* @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
|
9634
|
-
*
|
9635
|
-
*/
|
9636
|
-
const getMediaValueByMode = (obj) => {
|
9637
|
-
var _a;
|
9638
|
-
if (!obj || typeof obj !== 'object') {
|
9639
|
-
return null;
|
9640
|
-
}
|
9641
|
-
const { mode, link, file, src } = obj;
|
9642
|
-
switch (mode) {
|
9643
|
-
case 2:
|
9644
|
-
return link || null;
|
9645
|
-
case 3:
|
9646
|
-
return src || null;
|
9647
|
-
default:
|
9648
|
-
return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
|
9649
|
-
}
|
9650
|
-
};
|
9651
|
-
|
9652
9701
|
const Prompt$1 = (_a) => {
|
9653
9702
|
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"]);
|
9654
9703
|
const { popupDetailData } = useSxpDataSource();
|
@@ -9913,7 +9962,8 @@ var settingRender$7 = [
|
|
9913
9962
|
label: '价格千分符展示',
|
9914
9963
|
type: 'Switch',
|
9915
9964
|
name: ['enableFormattedPrice'],
|
9916
|
-
initialValue: true
|
9965
|
+
initialValue: true,
|
9966
|
+
belong: 'price'
|
9917
9967
|
}
|
9918
9968
|
]
|
9919
9969
|
}
|
@@ -10062,7 +10112,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10062
10112
|
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;
|
10063
10113
|
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"]);
|
10064
10114
|
useState(true);
|
10065
|
-
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
10115
|
+
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
10066
10116
|
const { jumpToWeb, productView } = useEventReport();
|
10067
10117
|
useState(false);
|
10068
10118
|
useState(false);
|
@@ -10110,20 +10160,11 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10110
10160
|
window.removeEventListener('pageshow', initTime);
|
10111
10161
|
};
|
10112
10162
|
}, []);
|
10113
|
-
const priceText =
|
10114
|
-
|
10115
|
-
|
10116
|
-
|
10117
|
-
|
10118
|
-
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10119
|
-
minimumFractionDigits: 0
|
10120
|
-
})) !== null && _g !== void 0 ? _g : ''
|
10121
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
10122
|
-
}
|
10123
|
-
else {
|
10124
|
-
return '£102,300.00';
|
10125
|
-
}
|
10126
|
-
}, [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]);
|
10163
|
+
const priceText = getPriceText({
|
10164
|
+
product,
|
10165
|
+
enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
|
10166
|
+
globalConfig
|
10167
|
+
});
|
10127
10168
|
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;
|
10128
10169
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
10129
10170
|
// useEffect(() => {
|
@@ -10555,7 +10596,8 @@ var settingRender$6 = [
|
|
10555
10596
|
label: '价格千分符展示',
|
10556
10597
|
type: 'Switch',
|
10557
10598
|
name: ['enableFormattedPrice'],
|
10558
|
-
initialValue: true
|
10599
|
+
initialValue: true,
|
10600
|
+
belong: 'price'
|
10559
10601
|
}
|
10560
10602
|
]
|
10561
10603
|
}
|
@@ -10710,27 +10752,20 @@ var Img$1 = memo(Img);
|
|
10710
10752
|
const CommodityList$1 = (_a) => {
|
10711
10753
|
var _b, _c, _d;
|
10712
10754
|
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"]);
|
10713
|
-
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10755
|
+
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
|
10714
10756
|
const { jumpToWeb } = useEventReport();
|
10715
10757
|
const { popup } = useEditor();
|
10716
10758
|
const recData = isPost ? rec : popupDetailData;
|
10717
10759
|
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];
|
10718
10760
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10719
10761
|
const priceText = useCallback((product) => {
|
10720
|
-
var _a
|
10721
|
-
|
10722
|
-
|
10723
|
-
|
10724
|
-
|
10725
|
-
|
10726
|
-
|
10727
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
10728
|
-
}
|
10729
|
-
else {
|
10730
|
-
const p = 7000;
|
10731
|
-
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10732
|
-
}
|
10733
|
-
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10762
|
+
var _a;
|
10763
|
+
return getPriceText({
|
10764
|
+
product,
|
10765
|
+
enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
10766
|
+
globalConfig
|
10767
|
+
});
|
10768
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
10734
10769
|
const handleClick = throttle((item, multiCheckIndex) => {
|
10735
10770
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10736
10771
|
eventSubject: 'clickCta',
|
@@ -11187,7 +11222,8 @@ var interactionRender$9 = [
|
|
11187
11222
|
child: [
|
11188
11223
|
{
|
11189
11224
|
type: 'link',
|
11190
|
-
name: 'onClick'
|
11225
|
+
name: 'onClick',
|
11226
|
+
hiddenUrl: true
|
11191
11227
|
}
|
11192
11228
|
]
|
11193
11229
|
}
|
@@ -11312,7 +11348,8 @@ var interactionRender$8 = [
|
|
11312
11348
|
child: [
|
11313
11349
|
{
|
11314
11350
|
type: 'link',
|
11315
|
-
name: 'onClick'
|
11351
|
+
name: 'onClick',
|
11352
|
+
hiddenUrl: true
|
11316
11353
|
}
|
11317
11354
|
]
|
11318
11355
|
}
|
@@ -11530,7 +11567,7 @@ var LinkComponent = memo(Link$1);
|
|
11530
11567
|
* @Author: binruan@chatlabs.com
|
11531
11568
|
* @Date: 2024-08-09 16:59:38
|
11532
11569
|
* @LastEditors: binruan@chatlabs.com
|
11533
|
-
* @LastEditTime: 2024-
|
11570
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
11534
11571
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
11535
11572
|
*
|
11536
11573
|
*/
|
@@ -11540,7 +11577,8 @@ var interactionRender$7 = [
|
|
11540
11577
|
child: [
|
11541
11578
|
{
|
11542
11579
|
type: 'link',
|
11543
|
-
name: 'onClick'
|
11580
|
+
name: 'onClick',
|
11581
|
+
hiddenUrl: true
|
11544
11582
|
}
|
11545
11583
|
]
|
11546
11584
|
}
|
@@ -11548,7 +11586,7 @@ var interactionRender$7 = [
|
|
11548
11586
|
|
11549
11587
|
var _a;
|
11550
11588
|
const Link = createMaterial(LinkComponent, {
|
11551
|
-
displayName: '
|
11589
|
+
displayName: '普通CTA',
|
11552
11590
|
icon: '',
|
11553
11591
|
category: 'template',
|
11554
11592
|
type: 'Link',
|
@@ -11607,7 +11645,8 @@ var interactionRender$6 = [
|
|
11607
11645
|
child: [
|
11608
11646
|
{
|
11609
11647
|
type: 'link',
|
11610
|
-
name: 'onClick'
|
11648
|
+
name: 'onClick',
|
11649
|
+
hiddenUrl: true
|
11611
11650
|
}
|
11612
11651
|
]
|
11613
11652
|
}
|
@@ -11702,7 +11741,8 @@ var interactionRender$5 = [
|
|
11702
11741
|
child: [
|
11703
11742
|
{
|
11704
11743
|
type: 'link',
|
11705
|
-
name: 'onClick'
|
11744
|
+
name: 'onClick',
|
11745
|
+
hiddenUrl: true
|
11706
11746
|
}
|
11707
11747
|
]
|
11708
11748
|
}
|
@@ -11798,7 +11838,8 @@ var interactionRender$4 = [
|
|
11798
11838
|
child: [
|
11799
11839
|
{
|
11800
11840
|
type: 'link',
|
11801
|
-
name: 'onClick'
|
11841
|
+
name: 'onClick',
|
11842
|
+
hiddenUrl: true
|
11802
11843
|
}
|
11803
11844
|
]
|
11804
11845
|
}
|
@@ -11913,7 +11954,8 @@ var interactionRender$3 = [
|
|
11913
11954
|
child: [
|
11914
11955
|
{
|
11915
11956
|
type: 'link',
|
11916
|
-
name: 'onClick'
|
11957
|
+
name: 'onClick',
|
11958
|
+
hiddenUrl: true
|
11917
11959
|
}
|
11918
11960
|
]
|
11919
11961
|
}
|
@@ -12023,13 +12065,22 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
12023
12065
|
sort: 3
|
12024
12066
|
});
|
12025
12067
|
|
12068
|
+
/*
|
12069
|
+
* @Author: binruan@chatlabs.com
|
12070
|
+
* @Date: 2024-03-20 10:27:32
|
12071
|
+
* @LastEditors: binruan@chatlabs.com
|
12072
|
+
* @LastEditTime: 2024-09-09 13:56:10
|
12073
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
|
12074
|
+
*
|
12075
|
+
*/
|
12026
12076
|
var interactionRender$2 = [
|
12027
12077
|
{
|
12028
12078
|
title: '点击事件',
|
12029
12079
|
child: [
|
12030
12080
|
{
|
12031
12081
|
type: 'link',
|
12032
|
-
name: 'onClick'
|
12082
|
+
name: 'onClick',
|
12083
|
+
hiddenUrl: true
|
12033
12084
|
}
|
12034
12085
|
]
|
12035
12086
|
}
|
@@ -12259,7 +12310,8 @@ var settingRender$3 = [
|
|
12259
12310
|
label: '价格千分符展示',
|
12260
12311
|
type: 'Switch',
|
12261
12312
|
name: ['enableFormattedPrice'],
|
12262
|
-
initialValue: true
|
12313
|
+
initialValue: true,
|
12314
|
+
belong: 'price'
|
12263
12315
|
}
|
12264
12316
|
]
|
12265
12317
|
}
|
@@ -13682,7 +13734,7 @@ var previewData = {
|
|
13682
13734
|
const WaterfallFlowItem$1 = (props) => {
|
13683
13735
|
var _a;
|
13684
13736
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13685
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13737
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
13686
13738
|
const [showVideo, setShowVideo] = useState(false);
|
13687
13739
|
useState(false);
|
13688
13740
|
useState({
|
@@ -13733,20 +13785,11 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13733
13785
|
return false;
|
13734
13786
|
}
|
13735
13787
|
}, [top, showBorder]);
|
13736
|
-
const priceText =
|
13737
|
-
|
13738
|
-
|
13739
|
-
|
13740
|
-
|
13741
|
-
? (_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', {
|
13742
|
-
minimumFractionDigits: 0
|
13743
|
-
})) !== null && _l !== void 0 ? _l : ''
|
13744
|
-
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13745
|
-
}
|
13746
|
-
else {
|
13747
|
-
return null;
|
13748
|
-
}
|
13749
|
-
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13788
|
+
const priceText = getPriceText({
|
13789
|
+
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
13790
|
+
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
13791
|
+
globalConfig
|
13792
|
+
});
|
13750
13793
|
useEffect(() => {
|
13751
13794
|
if (imgDom.current === null || src === '') {
|
13752
13795
|
return;
|
@@ -14032,7 +14075,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
|
|
14032
14075
|
const WaterfallFlowItem = (props) => {
|
14033
14076
|
var _a;
|
14034
14077
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
14035
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
14078
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
14036
14079
|
const [showVideo, setShowVideo] = useState(false);
|
14037
14080
|
const imgDom = useRef(null);
|
14038
14081
|
const ref = useRef(null);
|
@@ -14058,20 +14101,11 @@ const WaterfallFlowItem = (props) => {
|
|
14058
14101
|
var _a, _b;
|
14059
14102
|
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;
|
14060
14103
|
}, [rec]);
|
14061
|
-
const priceText =
|
14062
|
-
|
14063
|
-
|
14064
|
-
|
14065
|
-
|
14066
|
-
? (_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', {
|
14067
|
-
minimumFractionDigits: 0
|
14068
|
-
})) !== null && _l !== void 0 ? _l : ''
|
14069
|
-
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
14070
|
-
}
|
14071
|
-
else {
|
14072
|
-
return null;
|
14073
|
-
}
|
14074
|
-
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
14104
|
+
const priceText = getPriceText({
|
14105
|
+
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
14106
|
+
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
14107
|
+
globalConfig
|
14108
|
+
});
|
14075
14109
|
// useEffect(() => {
|
14076
14110
|
// if (imgDom.current === null || src === '') {
|
14077
14111
|
// return;
|
@@ -14719,7 +14753,7 @@ var AniLinkComponent = memo(AniLink$1);
|
|
14719
14753
|
* @Author: binruan@chatlabs.com
|
14720
14754
|
* @Date: 2024-07-05 14:08:41
|
14721
14755
|
* @LastEditors: binruan@chatlabs.com
|
14722
|
-
* @LastEditTime: 2024-
|
14756
|
+
* @LastEditTime: 2024-09-09 14:05:04
|
14723
14757
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
14724
14758
|
*
|
14725
14759
|
*/
|
@@ -14729,7 +14763,8 @@ var interactionRender$1 = [
|
|
14729
14763
|
child: [
|
14730
14764
|
{
|
14731
14765
|
type: 'link',
|
14732
|
-
name: 'onClick'
|
14766
|
+
name: 'onClick',
|
14767
|
+
hiddenUrl: true
|
14733
14768
|
}
|
14734
14769
|
]
|
14735
14770
|
},
|
@@ -15153,13 +15188,22 @@ const AniLinkPopup$1 = (_a) => {
|
|
15153
15188
|
};
|
15154
15189
|
var AniLinkPopupComponent = memo(AniLinkPopup$1);
|
15155
15190
|
|
15191
|
+
/*
|
15192
|
+
* @Author: binruan@chatlabs.com
|
15193
|
+
* @Date: 2024-07-24 14:58:40
|
15194
|
+
* @LastEditors: binruan@chatlabs.com
|
15195
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
15196
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
15197
|
+
*
|
15198
|
+
*/
|
15156
15199
|
var interactionRender = [
|
15157
15200
|
{
|
15158
15201
|
title: '点击事件',
|
15159
15202
|
child: [
|
15160
15203
|
{
|
15161
15204
|
type: 'link',
|
15162
|
-
name: 'onClick'
|
15205
|
+
name: 'onClick',
|
15206
|
+
hiddenUrl: true
|
15163
15207
|
}
|
15164
15208
|
]
|
15165
15209
|
},
|
@@ -16144,7 +16188,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
16144
16188
|
* @Author: binruan@chatlabs.com
|
16145
16189
|
* @Date: 2024-01-15 19:03:09
|
16146
16190
|
* @LastEditors: binruan@chatlabs.com
|
16147
|
-
* @LastEditTime: 2024-
|
16191
|
+
* @LastEditTime: 2024-09-11 15:36:28
|
16148
16192
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16149
16193
|
*
|
16150
16194
|
*/
|
@@ -16321,6 +16365,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16321
16365
|
return null;
|
16322
16366
|
}
|
16323
16367
|
});
|
16368
|
+
if (!(list === null || list === void 0 ? void 0 : list.length))
|
16369
|
+
return [];
|
16324
16370
|
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16325
16371
|
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16326
16372
|
const renderLogo = useMemo(() => {
|