pb-sxp-ui 1.4.4 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +163 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +163 -125
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +163 -125
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +7 -15
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
- package/es/core/components/SxpPageRender/index.d.ts +6 -0
- package/es/core/components/SxpPageRender/index.js +2 -0
- package/es/core/context/SxpDataSourceProvider.js +2 -0
- package/es/core/utils/materials.d.ts +7 -0
- package/es/core/utils/materials.js +47 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +5 -0
- package/es/materials/sxp/HashTag/settingRender.js +2 -1
- package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.js +2 -1
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
- package/es/materials/sxp/popup/CommodityList/index.js +9 -15
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +2 -1
- package/es/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Appoint/interactionRender.js +2 -1
- package/es/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/interactionRender.js +2 -1
- package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
- package/es/materials/sxp/template/Link/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Link/interactionRender.js +2 -1
- package/es/materials/sxp/template/Link/material.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +7 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
- package/lib/core/components/SxpPageRender/index.d.ts +6 -0
- package/lib/core/components/SxpPageRender/index.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +2 -0
- package/lib/core/utils/materials.d.ts +7 -0
- package/lib/core/utils/materials.js +49 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +5 -0
- package/lib/materials/sxp/HashTag/settingRender.js +2 -1
- package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.js +2 -1
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +9 -15
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +2 -1
- package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Appoint/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/interactionRender.js +2 -1
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Link/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Link/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Link/material.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
- package/package.json +1 -1
package/dist/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,89 @@ 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-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
|
+
|
9179
9261
|
const CommodityDetail$1 = (_a) => {
|
9180
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;
|
9181
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"]);
|
9182
|
-
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9264
|
+
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
9183
9265
|
const { jumpToWeb, productView } = useEventReport();
|
9184
9266
|
const curTimeRef = useRef(null);
|
9185
9267
|
const [showModal, setShowModal] = useState(false);
|
@@ -9224,20 +9306,11 @@ const CommodityDetail$1 = (_a) => {
|
|
9224
9306
|
window.removeEventListener('pageshow', initTime);
|
9225
9307
|
};
|
9226
9308
|
}, []);
|
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]);
|
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
|
+
});
|
9241
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;
|
9242
9315
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9243
9316
|
const renderContent = ({ isPost }) => {
|
@@ -9617,38 +9690,6 @@ var settingRender$8 = [
|
|
9617
9690
|
|
9618
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";
|
9619
9692
|
|
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
9693
|
const Prompt$1 = (_a) => {
|
9653
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"]);
|
9654
9695
|
const { popupDetailData } = useSxpDataSource();
|
@@ -9913,7 +9954,8 @@ var settingRender$7 = [
|
|
9913
9954
|
label: '价格千分符展示',
|
9914
9955
|
type: 'Switch',
|
9915
9956
|
name: ['enableFormattedPrice'],
|
9916
|
-
initialValue: true
|
9957
|
+
initialValue: true,
|
9958
|
+
belong: 'price'
|
9917
9959
|
}
|
9918
9960
|
]
|
9919
9961
|
}
|
@@ -10062,7 +10104,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10062
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;
|
10063
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"]);
|
10064
10106
|
useState(true);
|
10065
|
-
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
10107
|
+
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
|
10066
10108
|
const { jumpToWeb, productView } = useEventReport();
|
10067
10109
|
useState(false);
|
10068
10110
|
useState(false);
|
@@ -10110,20 +10152,11 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10110
10152
|
window.removeEventListener('pageshow', initTime);
|
10111
10153
|
};
|
10112
10154
|
}, []);
|
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]);
|
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
|
+
});
|
10127
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;
|
10128
10161
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
10129
10162
|
// useEffect(() => {
|
@@ -10555,7 +10588,8 @@ var settingRender$6 = [
|
|
10555
10588
|
label: '价格千分符展示',
|
10556
10589
|
type: 'Switch',
|
10557
10590
|
name: ['enableFormattedPrice'],
|
10558
|
-
initialValue: true
|
10591
|
+
initialValue: true,
|
10592
|
+
belong: 'price'
|
10559
10593
|
}
|
10560
10594
|
]
|
10561
10595
|
}
|
@@ -10710,27 +10744,20 @@ var Img$1 = memo(Img);
|
|
10710
10744
|
const CommodityList$1 = (_a) => {
|
10711
10745
|
var _b, _c, _d;
|
10712
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"]);
|
10713
|
-
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10747
|
+
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
|
10714
10748
|
const { jumpToWeb } = useEventReport();
|
10715
10749
|
const { popup } = useEditor();
|
10716
10750
|
const recData = isPost ? rec : popupDetailData;
|
10717
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];
|
10718
10752
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10719
10753
|
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]);
|
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]);
|
10734
10761
|
const handleClick = throttle((item, multiCheckIndex) => {
|
10735
10762
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10736
10763
|
eventSubject: 'clickCta',
|
@@ -11187,7 +11214,8 @@ var interactionRender$9 = [
|
|
11187
11214
|
child: [
|
11188
11215
|
{
|
11189
11216
|
type: 'link',
|
11190
|
-
name: 'onClick'
|
11217
|
+
name: 'onClick',
|
11218
|
+
hiddenUrl: true
|
11191
11219
|
}
|
11192
11220
|
]
|
11193
11221
|
}
|
@@ -11312,7 +11340,8 @@ var interactionRender$8 = [
|
|
11312
11340
|
child: [
|
11313
11341
|
{
|
11314
11342
|
type: 'link',
|
11315
|
-
name: 'onClick'
|
11343
|
+
name: 'onClick',
|
11344
|
+
hiddenUrl: true
|
11316
11345
|
}
|
11317
11346
|
]
|
11318
11347
|
}
|
@@ -11530,7 +11559,7 @@ var LinkComponent = memo(Link$1);
|
|
11530
11559
|
* @Author: binruan@chatlabs.com
|
11531
11560
|
* @Date: 2024-08-09 16:59:38
|
11532
11561
|
* @LastEditors: binruan@chatlabs.com
|
11533
|
-
* @LastEditTime: 2024-
|
11562
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
11534
11563
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
11535
11564
|
*
|
11536
11565
|
*/
|
@@ -11540,7 +11569,8 @@ var interactionRender$7 = [
|
|
11540
11569
|
child: [
|
11541
11570
|
{
|
11542
11571
|
type: 'link',
|
11543
|
-
name: 'onClick'
|
11572
|
+
name: 'onClick',
|
11573
|
+
hiddenUrl: true
|
11544
11574
|
}
|
11545
11575
|
]
|
11546
11576
|
}
|
@@ -11548,7 +11578,7 @@ var interactionRender$7 = [
|
|
11548
11578
|
|
11549
11579
|
var _a;
|
11550
11580
|
const Link = createMaterial(LinkComponent, {
|
11551
|
-
displayName: '
|
11581
|
+
displayName: '普通CTA',
|
11552
11582
|
icon: '',
|
11553
11583
|
category: 'template',
|
11554
11584
|
type: 'Link',
|
@@ -11607,7 +11637,8 @@ var interactionRender$6 = [
|
|
11607
11637
|
child: [
|
11608
11638
|
{
|
11609
11639
|
type: 'link',
|
11610
|
-
name: 'onClick'
|
11640
|
+
name: 'onClick',
|
11641
|
+
hiddenUrl: true
|
11611
11642
|
}
|
11612
11643
|
]
|
11613
11644
|
}
|
@@ -11702,7 +11733,8 @@ var interactionRender$5 = [
|
|
11702
11733
|
child: [
|
11703
11734
|
{
|
11704
11735
|
type: 'link',
|
11705
|
-
name: 'onClick'
|
11736
|
+
name: 'onClick',
|
11737
|
+
hiddenUrl: true
|
11706
11738
|
}
|
11707
11739
|
]
|
11708
11740
|
}
|
@@ -11798,7 +11830,8 @@ var interactionRender$4 = [
|
|
11798
11830
|
child: [
|
11799
11831
|
{
|
11800
11832
|
type: 'link',
|
11801
|
-
name: 'onClick'
|
11833
|
+
name: 'onClick',
|
11834
|
+
hiddenUrl: true
|
11802
11835
|
}
|
11803
11836
|
]
|
11804
11837
|
}
|
@@ -11913,7 +11946,8 @@ var interactionRender$3 = [
|
|
11913
11946
|
child: [
|
11914
11947
|
{
|
11915
11948
|
type: 'link',
|
11916
|
-
name: 'onClick'
|
11949
|
+
name: 'onClick',
|
11950
|
+
hiddenUrl: true
|
11917
11951
|
}
|
11918
11952
|
]
|
11919
11953
|
}
|
@@ -12023,13 +12057,22 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
12023
12057
|
sort: 3
|
12024
12058
|
});
|
12025
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
|
+
*/
|
12026
12068
|
var interactionRender$2 = [
|
12027
12069
|
{
|
12028
12070
|
title: '点击事件',
|
12029
12071
|
child: [
|
12030
12072
|
{
|
12031
12073
|
type: 'link',
|
12032
|
-
name: 'onClick'
|
12074
|
+
name: 'onClick',
|
12075
|
+
hiddenUrl: true
|
12033
12076
|
}
|
12034
12077
|
]
|
12035
12078
|
}
|
@@ -12259,7 +12302,8 @@ var settingRender$3 = [
|
|
12259
12302
|
label: '价格千分符展示',
|
12260
12303
|
type: 'Switch',
|
12261
12304
|
name: ['enableFormattedPrice'],
|
12262
|
-
initialValue: true
|
12305
|
+
initialValue: true,
|
12306
|
+
belong: 'price'
|
12263
12307
|
}
|
12264
12308
|
]
|
12265
12309
|
}
|
@@ -13682,7 +13726,7 @@ var previewData = {
|
|
13682
13726
|
const WaterfallFlowItem$1 = (props) => {
|
13683
13727
|
var _a;
|
13684
13728
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13685
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13729
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
13686
13730
|
const [showVideo, setShowVideo] = useState(false);
|
13687
13731
|
useState(false);
|
13688
13732
|
useState({
|
@@ -13733,20 +13777,11 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13733
13777
|
return false;
|
13734
13778
|
}
|
13735
13779
|
}, [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]);
|
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
|
+
});
|
13750
13785
|
useEffect(() => {
|
13751
13786
|
if (imgDom.current === null || src === '') {
|
13752
13787
|
return;
|
@@ -14032,7 +14067,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
|
|
14032
14067
|
const WaterfallFlowItem = (props) => {
|
14033
14068
|
var _a;
|
14034
14069
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
14035
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
14070
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
14036
14071
|
const [showVideo, setShowVideo] = useState(false);
|
14037
14072
|
const imgDom = useRef(null);
|
14038
14073
|
const ref = useRef(null);
|
@@ -14058,20 +14093,11 @@ const WaterfallFlowItem = (props) => {
|
|
14058
14093
|
var _a, _b;
|
14059
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;
|
14060
14095
|
}, [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]);
|
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
|
+
});
|
14075
14101
|
// useEffect(() => {
|
14076
14102
|
// if (imgDom.current === null || src === '') {
|
14077
14103
|
// return;
|
@@ -14719,7 +14745,7 @@ var AniLinkComponent = memo(AniLink$1);
|
|
14719
14745
|
* @Author: binruan@chatlabs.com
|
14720
14746
|
* @Date: 2024-07-05 14:08:41
|
14721
14747
|
* @LastEditors: binruan@chatlabs.com
|
14722
|
-
* @LastEditTime: 2024-
|
14748
|
+
* @LastEditTime: 2024-09-09 14:05:04
|
14723
14749
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
14724
14750
|
*
|
14725
14751
|
*/
|
@@ -14729,7 +14755,8 @@ var interactionRender$1 = [
|
|
14729
14755
|
child: [
|
14730
14756
|
{
|
14731
14757
|
type: 'link',
|
14732
|
-
name: 'onClick'
|
14758
|
+
name: 'onClick',
|
14759
|
+
hiddenUrl: true
|
14733
14760
|
}
|
14734
14761
|
]
|
14735
14762
|
},
|
@@ -15153,13 +15180,22 @@ const AniLinkPopup$1 = (_a) => {
|
|
15153
15180
|
};
|
15154
15181
|
var AniLinkPopupComponent = memo(AniLinkPopup$1);
|
15155
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
|
+
*/
|
15156
15191
|
var interactionRender = [
|
15157
15192
|
{
|
15158
15193
|
title: '点击事件',
|
15159
15194
|
child: [
|
15160
15195
|
{
|
15161
15196
|
type: 'link',
|
15162
|
-
name: 'onClick'
|
15197
|
+
name: 'onClick',
|
15198
|
+
hiddenUrl: true
|
15163
15199
|
}
|
15164
15200
|
]
|
15165
15201
|
},
|
@@ -16144,7 +16180,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
16144
16180
|
* @Author: binruan@chatlabs.com
|
16145
16181
|
* @Date: 2024-01-15 19:03:09
|
16146
16182
|
* @LastEditors: binruan@chatlabs.com
|
16147
|
-
* @LastEditTime: 2024-
|
16183
|
+
* @LastEditTime: 2024-09-11 15:36:28
|
16148
16184
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16149
16185
|
*
|
16150
16186
|
*/
|
@@ -16321,6 +16357,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16321
16357
|
return null;
|
16322
16358
|
}
|
16323
16359
|
});
|
16360
|
+
if (!(list === null || list === void 0 ? void 0 : list.length))
|
16361
|
+
return [];
|
16324
16362
|
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16325
16363
|
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16326
16364
|
const renderLogo = useMemo(() => {
|