pb-sxp-ui 1.5.1 → 1.5.2
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 +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -4
- 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 +8 -4
- 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 +2 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -1
- package/es/core/utils/materials.d.ts +3 -2
- package/es/core/utils/materials.js +3 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -1
- package/lib/core/utils/materials.d.ts +3 -2
- package/lib/core/utils/materials.js +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -9183,7 +9183,7 @@ var CommodityGroup$1 = memo(CommodityGroup);
|
|
9183
9183
|
* @Author: binruan@chatlabs.com
|
9184
9184
|
* @Date: 2024-03-20 14:56:16
|
9185
9185
|
* @LastEditors: binruan@chatlabs.com
|
9186
|
-
* @LastEditTime: 2024-09-
|
9186
|
+
* @LastEditTime: 2024-09-14 10:07:47
|
9187
9187
|
* @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
|
9188
9188
|
*
|
9189
9189
|
*/
|
@@ -9210,8 +9210,10 @@ const getMediaValueByMode = (obj) => {
|
|
9210
9210
|
return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
|
9211
9211
|
}
|
9212
9212
|
};
|
9213
|
-
const getPriceText = ({ product, enableFormattedPrice, globalConfig }) => {
|
9213
|
+
const getPriceText = ({ product, enableFormattedPrice, globalConfig, isHiddenDef }) => {
|
9214
9214
|
var _a, _b, _c, _d, _e;
|
9215
|
+
if ((!(product === null || product === void 0 ? void 0 : product.currency) || !(product === null || product === void 0 ? void 0 : product.price)) && isHiddenDef)
|
9216
|
+
return null;
|
9215
9217
|
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
9218
|
let text = '';
|
9217
9219
|
let priceSymbol = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.priceSymbol;
|
@@ -13788,7 +13790,8 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13788
13790
|
const priceText = getPriceText({
|
13789
13791
|
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
13790
13792
|
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
13791
|
-
globalConfig
|
13793
|
+
globalConfig,
|
13794
|
+
isHiddenDef: true
|
13792
13795
|
});
|
13793
13796
|
useEffect(() => {
|
13794
13797
|
if (imgDom.current === null || src === '') {
|
@@ -14104,7 +14107,8 @@ const WaterfallFlowItem = (props) => {
|
|
14104
14107
|
const priceText = getPriceText({
|
14105
14108
|
product: rec === null || rec === void 0 ? void 0 : rec.product,
|
14106
14109
|
enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
14107
|
-
globalConfig
|
14110
|
+
globalConfig,
|
14111
|
+
isHiddenDef: true
|
14108
14112
|
});
|
14109
14113
|
// useEffect(() => {
|
14110
14114
|
// if (imgDom.current === null || src === '') {
|