pb-sxp-ui 1.0.9 → 1.0.10

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,6 +1,6 @@
1
1
  import React from 'react';
2
2
  const Nudge = ({ nudge }) => {
3
- return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
3
+ return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
4
4
  marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
5
5
  width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
6
6
  height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
@@ -8,6 +8,6 @@ const Nudge = ({ nudge }) => {
8
8
  borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
9
9
  } },
10
10
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
11
- React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
11
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
12
12
  };
13
13
  export default Nudge;
@@ -18,6 +18,7 @@ interface ISxpPageRenderProps {
18
18
  isShowLike?: boolean;
19
19
  swipeTipIcon?: string;
20
20
  hashTag?: any[];
21
+ isOpenTextShadow?: boolean;
21
22
  };
22
23
  descStyle?: CSSProperties;
23
24
  tipText?: {
@@ -176,11 +176,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
176
176
  React.createElement(Nudge, { nudge: nudge }),
177
177
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
178
178
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
179
- React.createElement(ExpandableText, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle }),
179
+ React.createElement(ExpandableText, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
180
180
  React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
181
181
  }
182
182
  return null;
183
- }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
183
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle, globalConfig]);
184
184
  const renderLikeButton = useCallback((rec, index) => {
185
185
  var _a, _b;
186
186
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
5
  const Nudge = ({ nudge }) => {
6
- return (react_1.default.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
6
+ return (react_1.default.createElement(react_1.default.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (react_1.default.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
7
7
  marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
8
8
  width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
9
9
  height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
@@ -11,6 +11,6 @@ const Nudge = ({ nudge }) => {
11
11
  borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12
12
  } },
13
13
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? react_1.default.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
14
- react_1.default.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
14
+ react_1.default.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
15
15
  };
16
16
  exports.default = Nudge;
@@ -18,6 +18,7 @@ interface ISxpPageRenderProps {
18
18
  isShowLike?: boolean;
19
19
  swipeTipIcon?: string;
20
20
  hashTag?: any[];
21
+ isOpenTextShadow?: boolean;
21
22
  };
22
23
  descStyle?: CSSProperties;
23
24
  tipText?: {
@@ -179,11 +179,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
179
179
  react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
180
180
  react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
181
181
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
182
- react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle }),
182
+ react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
183
183
  react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
184
184
  }
185
185
  return null;
186
- }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
186
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle, globalConfig]);
187
187
  const renderLikeButton = (0, react_1.useCallback)((rec, index) => {
188
188
  var _a, _b;
189
189
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",