pb-sxp-ui 1.0.34 → 1.0.35

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.js CHANGED
@@ -11905,14 +11905,14 @@ var _materials_ = /*#__PURE__*/Object.freeze({
11905
11905
  Prompt: Prompt
11906
11906
  });
11907
11907
 
11908
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11909
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11908
+ const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11909
+ const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11910
11910
  const LikeButton = (_a) => {
11911
11911
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11912
11912
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11913
11913
  const [state, setState] = useState(active);
11914
- const likeIcon = useIconLink(defaultLikeIconPath);
11915
- const unlikeIcon = useIconLink(defaultUnLikeIconPath);
11914
+ const likeIcon = useIconLink(defaultLikeIconPath$1);
11915
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
11916
11916
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
11917
11917
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
11918
11918
  if (state) {
@@ -13190,9 +13190,9 @@ const RESOLVER$1 = {};
13190
13190
  Object.values(_materials_).forEach((v) => {
13191
13191
  RESOLVER$1[v.extend.type] = v;
13192
13192
  });
13193
- const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle }) => {
13194
- const containerWidth = 375;
13195
- const containerHeight = 664;
13193
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
13194
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
13195
+ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
13196
13196
  const height = useMemo(() => {
13197
13197
  return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
13198
13198
  }, [globalConfig, containerHeight]);
@@ -13242,8 +13242,10 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
13242
13242
  }
13243
13243
  return null;
13244
13244
  };
13245
+ const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
13246
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
13245
13247
  const renderLikeButton = (rec, index) => {
13246
- var _a, _b;
13248
+ var _a, _b, _c, _d;
13247
13249
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13248
13250
  return;
13249
13251
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -13251,15 +13253,15 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
13251
13253
  top += 40;
13252
13254
  }
13253
13255
  if (rec.video) {
13254
- return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13256
+ return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13255
13257
  top,
13256
- right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
13258
+ right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
13257
13259
  } }));
13258
13260
  }
13259
13261
  return null;
13260
13262
  };
13261
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
13262
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
13263
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
13264
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
13263
13265
  const renderView = (rec, index) => {
13264
13266
  var _a, _b, _c, _d;
13265
13267
  return (React.createElement("div", { style: { position: 'relative' } },