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.
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ISxpPageRenderProps } from '../SxpPageRender';
3
- declare const _default: React.NamedExoticComponent<ISxpPageRenderProps>;
3
+ declare const _default: React.NamedExoticComponent<ISxpPageRenderProps & {
4
+ appDomain?: string | undefined;
5
+ }>;
4
6
  export default _default;
@@ -14,9 +14,9 @@ const RESOLVER = {};
14
14
  Object.values(_materials_).forEach((v) => {
15
15
  RESOLVER[v.extend.type] = v;
16
16
  });
17
- const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle }) => {
18
- const containerWidth = 375;
19
- const containerHeight = 664;
17
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
18
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
19
+ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
20
20
  const height = useMemo(() => {
21
21
  return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
22
22
  }, [globalConfig, containerHeight]);
@@ -62,8 +62,10 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
62
62
  }
63
63
  return null;
64
64
  };
65
+ const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
66
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
65
67
  const renderLikeButton = (rec, index) => {
66
- var _a, _b;
68
+ var _a, _b, _c, _d;
67
69
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
68
70
  return;
69
71
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -71,15 +73,15 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
71
73
  top += 40;
72
74
  }
73
75
  if (rec.video) {
74
- return (React.createElement(LikeButton, { 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: {
76
+ return (React.createElement(LikeButton, { 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: {
75
77
  top,
76
- right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
78
+ right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
77
79
  } }));
78
80
  }
79
81
  return null;
80
82
  };
81
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
82
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
83
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
84
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
83
85
  const renderView = (rec, index) => {
84
86
  var _a, _b, _c, _d;
85
87
  return (React.createElement("div", { style: { position: 'relative' } },
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ISxpPageRenderProps } from '../SxpPageRender';
3
- declare const _default: React.NamedExoticComponent<ISxpPageRenderProps>;
3
+ declare const _default: React.NamedExoticComponent<ISxpPageRenderProps & {
4
+ appDomain?: string | undefined;
5
+ }>;
4
6
  export default _default;
@@ -17,9 +17,9 @@ const RESOLVER = {};
17
17
  Object.values(_materials_).forEach((v) => {
18
18
  RESOLVER[v.extend.type] = v;
19
19
  });
20
- const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle }) => {
21
- const containerWidth = 375;
22
- const containerHeight = 664;
20
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
21
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
22
+ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
23
23
  const height = (0, react_1.useMemo)(() => {
24
24
  return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
25
25
  }, [globalConfig, containerHeight]);
@@ -65,8 +65,10 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
65
65
  }
66
66
  return null;
67
67
  };
68
+ const likeIcon = (0, useIconLink_1.useIconLink)(defaultLikeIconPath, appDomain);
69
+ const unlikeIcon = (0, useIconLink_1.useIconLink)(defaultUnLikeIconPath, appDomain);
68
70
  const renderLikeButton = (rec, index) => {
69
- var _a, _b;
71
+ var _a, _b, _c, _d;
70
72
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
71
73
  return;
72
74
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -74,15 +76,15 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
74
76
  top += 40;
75
77
  }
76
78
  if (rec.video) {
77
- return (react_1.default.createElement(LikeButton_1.default, { 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: {
79
+ return (react_1.default.createElement(LikeButton_1.default, { 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: {
78
80
  top,
79
- right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
81
+ right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
80
82
  } }));
81
83
  }
82
84
  return null;
83
85
  };
84
- const mutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
85
- const unmutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
86
+ const mutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
87
+ const unmutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
86
88
  const renderView = (rec, index) => {
87
89
  var _a, _b, _c, _d;
88
90
  return (react_1.default.createElement("div", { style: { position: 'relative' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",