pb-sxp-ui 1.4.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +172 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +172 -130
- 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 +172 -130
- 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 +9 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +6 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +8 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +6 -3
- 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 +9 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +6 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +8 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +6 -3
- 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
|
}
|
@@ -2017,12 +2020,14 @@ var settingRender$9 = [
|
|
2017
2020
|
{
|
2018
2021
|
label: '背景色',
|
2019
2022
|
name: ['props', 'swiper', 'dotsBgColor'],
|
2020
|
-
type: 'Color'
|
2023
|
+
type: 'Color',
|
2024
|
+
initialValue: 'rgba(0,0,0,.2)'
|
2021
2025
|
},
|
2022
2026
|
{
|
2023
2027
|
label: '选中色',
|
2024
2028
|
name: ['props', 'swiper', 'dotsActiveColor'],
|
2025
|
-
type: 'Color'
|
2029
|
+
type: 'Color',
|
2030
|
+
initialValue: 'rgba(0,0,0,1)'
|
2026
2031
|
},
|
2027
2032
|
{
|
2028
2033
|
label: '底边距',
|
@@ -9174,10 +9179,89 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
9174
9179
|
};
|
9175
9180
|
var CommodityGroup$1 = memo(CommodityGroup);
|
9176
9181
|
|
9182
|
+
/*
|
9183
|
+
* @Author: binruan@chatlabs.com
|
9184
|
+
* @Date: 2024-03-20 14:56:16
|
9185
|
+
* @LastEditors: binruan@chatlabs.com
|
9186
|
+
* @LastEditTime: 2024-09-12 15:50:11
|
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 || (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.millesimalSymbol) !== 'none';
|
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 && decInd + 1 < (text === null || text === void 0 ? void 0 : text.length)) {
|
9250
|
+
text = text.slice(0, decInd + 1) + ',' + text.slice(decInd + 2);
|
9251
|
+
}
|
9252
|
+
if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) && (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
|
9253
|
+
text = (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) === 'left' ? currency + text : text + currency;
|
9254
|
+
}
|
9255
|
+
else if ((priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.currencyPosition) !== 'none') {
|
9256
|
+
text = currency + text;
|
9257
|
+
}
|
9258
|
+
return text;
|
9259
|
+
};
|
9260
|
+
|
9177
9261
|
const CommodityDetail$1 = (_a) => {
|
9178
9262
|
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;
|
9179
9263
|
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"]);
|
9180
|
-
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9264
|
+
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
9181
9265
|
const { jumpToWeb, productView } = useEventReport();
|
9182
9266
|
const curTimeRef = useRef(null);
|
9183
9267
|
const [showModal, setShowModal] = useState(false);
|
@@ -9222,20 +9306,11 @@ const CommodityDetail$1 = (_a) => {
|
|
9222
9306
|
window.removeEventListener('pageshow', initTime);
|
9223
9307
|
};
|
9224
9308
|
}, []);
|
9225
|
-
const priceText =
|
9226
|
-
|
9227
|
-
|
9228
|
-
|
9229
|
-
|
9230
|
-
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9231
|
-
minimumFractionDigits: 0
|
9232
|
-
})) !== null && _g !== void 0 ? _g : ''
|
9233
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
9234
|
-
}
|
9235
|
-
else {
|
9236
|
-
return '$7,000';
|
9237
|
-
}
|
9238
|
-
}, [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]);
|
9309
|
+
const priceText = getPriceText({
|
9310
|
+
product: product,
|
9311
|
+
enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
|
9312
|
+
globalConfig
|
9313
|
+
});
|
9239
9314
|
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;
|
9240
9315
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9241
9316
|
const renderContent = ({ isPost }) => {
|
@@ -9615,38 +9690,6 @@ var settingRender$8 = [
|
|
9615
9690
|
|
9616
9691
|
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";
|
9617
9692
|
|
9618
|
-
/*
|
9619
|
-
* @Author: binruan@chatlabs.com
|
9620
|
-
* @Date: 2024-03-20 14:56:16
|
9621
|
-
* @LastEditors: binruan@chatlabs.com
|
9622
|
-
* @LastEditTime: 2024-03-20 14:56:22
|
9623
|
-
* @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
|
9624
|
-
*
|
9625
|
-
*/
|
9626
|
-
/*
|
9627
|
-
* @Author: binruan@chatlabs.com
|
9628
|
-
* @Date: 2023-08-03 16:37:37
|
9629
|
-
* @LastEditors: binruan@chatlabs.com
|
9630
|
-
* @LastEditTime: 2023-08-04 11:02:50
|
9631
|
-
* @FilePath: \page-builder-admin\src\libs\core\utils\materials.ts
|
9632
|
-
*
|
9633
|
-
*/
|
9634
|
-
const getMediaValueByMode = (obj) => {
|
9635
|
-
var _a;
|
9636
|
-
if (!obj || typeof obj !== 'object') {
|
9637
|
-
return null;
|
9638
|
-
}
|
9639
|
-
const { mode, link, file, src } = obj;
|
9640
|
-
switch (mode) {
|
9641
|
-
case 2:
|
9642
|
-
return link || null;
|
9643
|
-
case 3:
|
9644
|
-
return src || null;
|
9645
|
-
default:
|
9646
|
-
return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
|
9647
|
-
}
|
9648
|
-
};
|
9649
|
-
|
9650
9693
|
const Prompt$1 = (_a) => {
|
9651
9694
|
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"]);
|
9652
9695
|
const { popupDetailData } = useSxpDataSource();
|
@@ -9705,7 +9748,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
9705
9748
|
* @Author: binruan@chatlabs.com
|
9706
9749
|
* @Date: 2024-03-26 16:50:25
|
9707
9750
|
* @LastEditors: binruan@chatlabs.com
|
9708
|
-
* @LastEditTime: 2024-08-
|
9751
|
+
* @LastEditTime: 2024-08-30 18:08:55
|
9709
9752
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9710
9753
|
*
|
9711
9754
|
*/
|
@@ -9911,7 +9954,8 @@ var settingRender$7 = [
|
|
9911
9954
|
label: '价格千分符展示',
|
9912
9955
|
type: 'Switch',
|
9913
9956
|
name: ['enableFormattedPrice'],
|
9914
|
-
initialValue: true
|
9957
|
+
initialValue: true,
|
9958
|
+
belong: 'price'
|
9915
9959
|
}
|
9916
9960
|
]
|
9917
9961
|
}
|
@@ -10027,12 +10071,14 @@ var settingRender$7 = [
|
|
10027
10071
|
{
|
10028
10072
|
label: '背景色',
|
10029
10073
|
name: ['props', 'swiper', 'dotsBgColor'],
|
10030
|
-
type: 'Color'
|
10074
|
+
type: 'Color',
|
10075
|
+
initialValue: 'rgba(0,0,0,.2)'
|
10031
10076
|
},
|
10032
10077
|
{
|
10033
10078
|
label: '选中色',
|
10034
10079
|
name: ['props', 'swiper', 'dotsActiveColor'],
|
10035
|
-
type: 'Color'
|
10080
|
+
type: 'Color',
|
10081
|
+
initialValue: 'rgba(0,0,0,1)'
|
10036
10082
|
},
|
10037
10083
|
{
|
10038
10084
|
label: '底边距',
|
@@ -10058,7 +10104,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10058
10104
|
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;
|
10059
10105
|
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"]);
|
10060
10106
|
useState(true);
|
10061
|
-
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
10107
|
+
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
10062
10108
|
const { jumpToWeb, productView } = useEventReport();
|
10063
10109
|
useState(false);
|
10064
10110
|
useState(false);
|
@@ -10106,20 +10152,11 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10106
10152
|
window.removeEventListener('pageshow', initTime);
|
10107
10153
|
};
|
10108
10154
|
}, []);
|
10109
|
-
const priceText =
|
10110
|
-
|
10111
|
-
|
10112
|
-
|
10113
|
-
|
10114
|
-
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10115
|
-
minimumFractionDigits: 0
|
10116
|
-
})) !== null && _g !== void 0 ? _g : ''
|
10117
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
10118
|
-
}
|
10119
|
-
else {
|
10120
|
-
return '£102,300.00';
|
10121
|
-
}
|
10122
|
-
}, [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]);
|
10155
|
+
const priceText = getPriceText({
|
10156
|
+
product,
|
10157
|
+
enableFormattedPrice: (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice,
|
10158
|
+
globalConfig
|
10159
|
+
});
|
10123
10160
|
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;
|
10124
10161
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
10125
10162
|
// useEffect(() => {
|
@@ -10551,7 +10588,8 @@ var settingRender$6 = [
|
|
10551
10588
|
label: '价格千分符展示',
|
10552
10589
|
type: 'Switch',
|
10553
10590
|
name: ['enableFormattedPrice'],
|
10554
|
-
initialValue: true
|
10591
|
+
initialValue: true,
|
10592
|
+
belong: 'price'
|
10555
10593
|
}
|
10556
10594
|
]
|
10557
10595
|
}
|
@@ -10706,27 +10744,20 @@ var Img$1 = memo(Img);
|
|
10706
10744
|
const CommodityList$1 = (_a) => {
|
10707
10745
|
var _b, _c, _d;
|
10708
10746
|
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"]);
|
10709
|
-
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10747
|
+
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
|
10710
10748
|
const { jumpToWeb } = useEventReport();
|
10711
10749
|
const { popup } = useEditor();
|
10712
10750
|
const recData = isPost ? rec : popupDetailData;
|
10713
10751
|
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];
|
10714
10752
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10715
10753
|
const priceText = useCallback((product) => {
|
10716
|
-
var _a
|
10717
|
-
|
10718
|
-
|
10719
|
-
|
10720
|
-
|
10721
|
-
|
10722
|
-
|
10723
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
10724
|
-
}
|
10725
|
-
else {
|
10726
|
-
const p = 7000;
|
10727
|
-
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10728
|
-
}
|
10729
|
-
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10754
|
+
var _a;
|
10755
|
+
return getPriceText({
|
10756
|
+
product,
|
10757
|
+
enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
10758
|
+
globalConfig
|
10759
|
+
});
|
10760
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
10730
10761
|
const handleClick = throttle((item, multiCheckIndex) => {
|
10731
10762
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10732
10763
|
eventSubject: 'clickCta',
|
@@ -11183,7 +11214,8 @@ var interactionRender$9 = [
|
|
11183
11214
|
child: [
|
11184
11215
|
{
|
11185
11216
|
type: 'link',
|
11186
|
-
name: 'onClick'
|
11217
|
+
name: 'onClick',
|
11218
|
+
hiddenUrl: true
|
11187
11219
|
}
|
11188
11220
|
]
|
11189
11221
|
}
|
@@ -11308,7 +11340,8 @@ var interactionRender$8 = [
|
|
11308
11340
|
child: [
|
11309
11341
|
{
|
11310
11342
|
type: 'link',
|
11311
|
-
name: 'onClick'
|
11343
|
+
name: 'onClick',
|
11344
|
+
hiddenUrl: true
|
11312
11345
|
}
|
11313
11346
|
]
|
11314
11347
|
}
|
@@ -11526,7 +11559,7 @@ var LinkComponent = memo(Link$1);
|
|
11526
11559
|
* @Author: binruan@chatlabs.com
|
11527
11560
|
* @Date: 2024-08-09 16:59:38
|
11528
11561
|
* @LastEditors: binruan@chatlabs.com
|
11529
|
-
* @LastEditTime: 2024-
|
11562
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
11530
11563
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
11531
11564
|
*
|
11532
11565
|
*/
|
@@ -11536,7 +11569,8 @@ var interactionRender$7 = [
|
|
11536
11569
|
child: [
|
11537
11570
|
{
|
11538
11571
|
type: 'link',
|
11539
|
-
name: 'onClick'
|
11572
|
+
name: 'onClick',
|
11573
|
+
hiddenUrl: true
|
11540
11574
|
}
|
11541
11575
|
]
|
11542
11576
|
}
|
@@ -11544,7 +11578,7 @@ var interactionRender$7 = [
|
|
11544
11578
|
|
11545
11579
|
var _a;
|
11546
11580
|
const Link = createMaterial(LinkComponent, {
|
11547
|
-
displayName: '
|
11581
|
+
displayName: '普通CTA',
|
11548
11582
|
icon: '',
|
11549
11583
|
category: 'template',
|
11550
11584
|
type: 'Link',
|
@@ -11603,7 +11637,8 @@ var interactionRender$6 = [
|
|
11603
11637
|
child: [
|
11604
11638
|
{
|
11605
11639
|
type: 'link',
|
11606
|
-
name: 'onClick'
|
11640
|
+
name: 'onClick',
|
11641
|
+
hiddenUrl: true
|
11607
11642
|
}
|
11608
11643
|
]
|
11609
11644
|
}
|
@@ -11698,7 +11733,8 @@ var interactionRender$5 = [
|
|
11698
11733
|
child: [
|
11699
11734
|
{
|
11700
11735
|
type: 'link',
|
11701
|
-
name: 'onClick'
|
11736
|
+
name: 'onClick',
|
11737
|
+
hiddenUrl: true
|
11702
11738
|
}
|
11703
11739
|
]
|
11704
11740
|
}
|
@@ -11794,7 +11830,8 @@ var interactionRender$4 = [
|
|
11794
11830
|
child: [
|
11795
11831
|
{
|
11796
11832
|
type: 'link',
|
11797
|
-
name: 'onClick'
|
11833
|
+
name: 'onClick',
|
11834
|
+
hiddenUrl: true
|
11798
11835
|
}
|
11799
11836
|
]
|
11800
11837
|
}
|
@@ -11909,7 +11946,8 @@ var interactionRender$3 = [
|
|
11909
11946
|
child: [
|
11910
11947
|
{
|
11911
11948
|
type: 'link',
|
11912
|
-
name: 'onClick'
|
11949
|
+
name: 'onClick',
|
11950
|
+
hiddenUrl: true
|
11913
11951
|
}
|
11914
11952
|
]
|
11915
11953
|
}
|
@@ -12019,13 +12057,22 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
12019
12057
|
sort: 3
|
12020
12058
|
});
|
12021
12059
|
|
12060
|
+
/*
|
12061
|
+
* @Author: binruan@chatlabs.com
|
12062
|
+
* @Date: 2024-03-20 10:27:32
|
12063
|
+
* @LastEditors: binruan@chatlabs.com
|
12064
|
+
* @LastEditTime: 2024-09-09 13:56:10
|
12065
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\interactionRender.tsx
|
12066
|
+
*
|
12067
|
+
*/
|
12022
12068
|
var interactionRender$2 = [
|
12023
12069
|
{
|
12024
12070
|
title: '点击事件',
|
12025
12071
|
child: [
|
12026
12072
|
{
|
12027
12073
|
type: 'link',
|
12028
|
-
name: 'onClick'
|
12074
|
+
name: 'onClick',
|
12075
|
+
hiddenUrl: true
|
12029
12076
|
}
|
12030
12077
|
]
|
12031
12078
|
}
|
@@ -12255,7 +12302,8 @@ var settingRender$3 = [
|
|
12255
12302
|
label: '价格千分符展示',
|
12256
12303
|
type: 'Switch',
|
12257
12304
|
name: ['enableFormattedPrice'],
|
12258
|
-
initialValue: true
|
12305
|
+
initialValue: true,
|
12306
|
+
belong: 'price'
|
12259
12307
|
}
|
12260
12308
|
]
|
12261
12309
|
}
|
@@ -13678,7 +13726,7 @@ var previewData = {
|
|
13678
13726
|
const WaterfallFlowItem$1 = (props) => {
|
13679
13727
|
var _a;
|
13680
13728
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13681
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13729
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
13682
13730
|
const [showVideo, setShowVideo] = useState(false);
|
13683
13731
|
useState(false);
|
13684
13732
|
useState({
|
@@ -13729,20 +13777,11 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13729
13777
|
return false;
|
13730
13778
|
}
|
13731
13779
|
}, [top, showBorder]);
|
13732
|
-
const priceText =
|
13733
|
-
|
13734
|
-
|
13735
|
-
|
13736
|
-
|
13737
|
-
? (_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', {
|
13738
|
-
minimumFractionDigits: 0
|
13739
|
-
})) !== null && _l !== void 0 ? _l : ''
|
13740
|
-
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13741
|
-
}
|
13742
|
-
else {
|
13743
|
-
return null;
|
13744
|
-
}
|
13745
|
-
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13780
|
+
const priceText = getPriceText({
|
13781
|
+
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
13782
|
+
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
13783
|
+
globalConfig
|
13784
|
+
});
|
13746
13785
|
useEffect(() => {
|
13747
13786
|
if (imgDom.current === null || src === '') {
|
13748
13787
|
return;
|
@@ -14028,7 +14067,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
|
|
14028
14067
|
const WaterfallFlowItem = (props) => {
|
14029
14068
|
var _a;
|
14030
14069
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
14031
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
14070
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
14032
14071
|
const [showVideo, setShowVideo] = useState(false);
|
14033
14072
|
const imgDom = useRef(null);
|
14034
14073
|
const ref = useRef(null);
|
@@ -14054,20 +14093,11 @@ const WaterfallFlowItem = (props) => {
|
|
14054
14093
|
var _a, _b;
|
14055
14094
|
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;
|
14056
14095
|
}, [rec]);
|
14057
|
-
const priceText =
|
14058
|
-
|
14059
|
-
|
14060
|
-
|
14061
|
-
|
14062
|
-
? (_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', {
|
14063
|
-
minimumFractionDigits: 0
|
14064
|
-
})) !== null && _l !== void 0 ? _l : ''
|
14065
|
-
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
14066
|
-
}
|
14067
|
-
else {
|
14068
|
-
return null;
|
14069
|
-
}
|
14070
|
-
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
14096
|
+
const priceText = getPriceText({
|
14097
|
+
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
14098
|
+
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
14099
|
+
globalConfig
|
14100
|
+
});
|
14071
14101
|
// useEffect(() => {
|
14072
14102
|
// if (imgDom.current === null || src === '') {
|
14073
14103
|
// return;
|
@@ -14715,7 +14745,7 @@ var AniLinkComponent = memo(AniLink$1);
|
|
14715
14745
|
* @Author: binruan@chatlabs.com
|
14716
14746
|
* @Date: 2024-07-05 14:08:41
|
14717
14747
|
* @LastEditors: binruan@chatlabs.com
|
14718
|
-
* @LastEditTime: 2024-
|
14748
|
+
* @LastEditTime: 2024-09-09 14:05:04
|
14719
14749
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
14720
14750
|
*
|
14721
14751
|
*/
|
@@ -14725,7 +14755,8 @@ var interactionRender$1 = [
|
|
14725
14755
|
child: [
|
14726
14756
|
{
|
14727
14757
|
type: 'link',
|
14728
|
-
name: 'onClick'
|
14758
|
+
name: 'onClick',
|
14759
|
+
hiddenUrl: true
|
14729
14760
|
}
|
14730
14761
|
]
|
14731
14762
|
},
|
@@ -15149,13 +15180,22 @@ const AniLinkPopup$1 = (_a) => {
|
|
15149
15180
|
};
|
15150
15181
|
var AniLinkPopupComponent = memo(AniLinkPopup$1);
|
15151
15182
|
|
15183
|
+
/*
|
15184
|
+
* @Author: binruan@chatlabs.com
|
15185
|
+
* @Date: 2024-07-24 14:58:40
|
15186
|
+
* @LastEditors: binruan@chatlabs.com
|
15187
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
15188
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
15189
|
+
*
|
15190
|
+
*/
|
15152
15191
|
var interactionRender = [
|
15153
15192
|
{
|
15154
15193
|
title: '点击事件',
|
15155
15194
|
child: [
|
15156
15195
|
{
|
15157
15196
|
type: 'link',
|
15158
|
-
name: 'onClick'
|
15197
|
+
name: 'onClick',
|
15198
|
+
hiddenUrl: true
|
15159
15199
|
}
|
15160
15200
|
]
|
15161
15201
|
},
|
@@ -16140,7 +16180,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
16140
16180
|
* @Author: binruan@chatlabs.com
|
16141
16181
|
* @Date: 2024-01-15 19:03:09
|
16142
16182
|
* @LastEditors: binruan@chatlabs.com
|
16143
|
-
* @LastEditTime: 2024-
|
16183
|
+
* @LastEditTime: 2024-09-11 15:36:28
|
16144
16184
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16145
16185
|
*
|
16146
16186
|
*/
|
@@ -16317,6 +16357,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16317
16357
|
return null;
|
16318
16358
|
}
|
16319
16359
|
});
|
16360
|
+
if (!(list === null || list === void 0 ? void 0 : list.length))
|
16361
|
+
return [];
|
16320
16362
|
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16321
16363
|
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16322
16364
|
const renderLogo = useMemo(() => {
|