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.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -12
- 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 +14 -12
- 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/DiyPortalPreview/index.d.ts +3 -1
- package/es/core/components/DiyPortalPreview/index.js +10 -8
- package/lib/core/components/DiyPortalPreview/index.d.ts +3 -1
- package/lib/core/components/DiyPortalPreview/index.js +10 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -11928,14 +11928,14 @@ var _materials_ = /*#__PURE__*/Object.freeze({
|
|
11928
11928
|
Prompt: Prompt
|
11929
11929
|
});
|
11930
11930
|
|
11931
|
-
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
11932
|
-
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
11931
|
+
const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
11932
|
+
const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
11933
11933
|
const LikeButton = (_a) => {
|
11934
11934
|
var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
|
11935
11935
|
const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
|
11936
11936
|
const [state, setState] = React.useState(active);
|
11937
|
-
const likeIcon = useIconLink(defaultLikeIconPath);
|
11938
|
-
const unlikeIcon = useIconLink(defaultUnLikeIconPath);
|
11937
|
+
const likeIcon = useIconLink(defaultLikeIconPath$1);
|
11938
|
+
const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
|
11939
11939
|
const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
11940
11940
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
11941
11941
|
if (state) {
|
@@ -13213,9 +13213,9 @@ const RESOLVER$1 = {};
|
|
13213
13213
|
Object.values(_materials_).forEach((v) => {
|
13214
13214
|
RESOLVER$1[v.extend.type] = v;
|
13215
13215
|
});
|
13216
|
-
const
|
13217
|
-
|
13218
|
-
|
13216
|
+
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
13217
|
+
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
13218
|
+
const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
|
13219
13219
|
const height = React.useMemo(() => {
|
13220
13220
|
return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
|
13221
13221
|
}, [globalConfig, containerHeight]);
|
@@ -13265,8 +13265,10 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
|
|
13265
13265
|
}
|
13266
13266
|
return null;
|
13267
13267
|
};
|
13268
|
+
const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
|
13269
|
+
const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
|
13268
13270
|
const renderLikeButton = (rec, index) => {
|
13269
|
-
var _a, _b;
|
13271
|
+
var _a, _b, _c, _d;
|
13270
13272
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
13271
13273
|
return;
|
13272
13274
|
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
@@ -13274,15 +13276,15 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
|
|
13274
13276
|
top += 40;
|
13275
13277
|
}
|
13276
13278
|
if (rec.video) {
|
13277
|
-
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: {
|
13279
|
+
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: {
|
13278
13280
|
top,
|
13279
|
-
right: (
|
13281
|
+
right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
|
13280
13282
|
} }));
|
13281
13283
|
}
|
13282
13284
|
return null;
|
13283
13285
|
};
|
13284
|
-
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
13285
|
-
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
13286
|
+
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
|
13287
|
+
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
|
13286
13288
|
const renderView = (rec, index) => {
|
13287
13289
|
var _a, _b, _c, _d;
|
13288
13290
|
return (React.createElement("div", { style: { position: 'relative' } },
|