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 CHANGED
@@ -9205,7 +9205,7 @@ var CommodityGroup$1 = React.memo(CommodityGroup);
9205
9205
  * @Author: binruan@chatlabs.com
9206
9206
  * @Date: 2024-03-20 14:56:16
9207
9207
  * @LastEditors: binruan@chatlabs.com
9208
- * @LastEditTime: 2024-09-13 15:06:44
9208
+ * @LastEditTime: 2024-09-14 10:07:47
9209
9209
  * @FilePath: \pb-sxp-ui\src\core\utils\materials.ts
9210
9210
  *
9211
9211
  */
@@ -9232,8 +9232,10 @@ const getMediaValueByMode = (obj) => {
9232
9232
  return file && file.length > 0 ? (_a = file[0]) === null || _a === void 0 ? void 0 : _a.url : null;
9233
9233
  }
9234
9234
  };
9235
- const getPriceText = ({ product, enableFormattedPrice, globalConfig }) => {
9235
+ const getPriceText = ({ product, enableFormattedPrice, globalConfig, isHiddenDef }) => {
9236
9236
  var _a, _b, _c, _d, _e;
9237
+ if ((!(product === null || product === void 0 ? void 0 : product.currency) || !(product === null || product === void 0 ? void 0 : product.price)) && isHiddenDef)
9238
+ return null;
9237
9239
  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;
9238
9240
  let text = '';
9239
9241
  let priceSymbol = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.priceSymbol;
@@ -13810,7 +13812,8 @@ const WaterfallFlowItem$1 = (props) => {
13810
13812
  const priceText = getPriceText({
13811
13813
  product: rec === null || rec === void 0 ? void 0 : rec.product,
13812
13814
  enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
13813
- globalConfig
13815
+ globalConfig,
13816
+ isHiddenDef: true
13814
13817
  });
13815
13818
  React.useEffect(() => {
13816
13819
  if (imgDom.current === null || src === '') {
@@ -14126,7 +14129,8 @@ const WaterfallFlowItem = (props) => {
14126
14129
  const priceText = getPriceText({
14127
14130
  product: rec === null || rec === void 0 ? void 0 : rec.product,
14128
14131
  enableFormattedPrice: (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
14129
- globalConfig
14132
+ globalConfig,
14133
+ isHiddenDef: true
14130
14134
  });
14131
14135
  // useEffect(() => {
14132
14136
  // if (imgDom.current === null || src === '') {