pb-sxp-ui 14.0.7 → 15.0.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.
@@ -10,7 +10,7 @@ import { useEventReport } from '../../../../core/hooks/useEventReport';
10
10
  import { getPriceText } from '../../../../core/utils/materials';
11
11
  const WaterfallFlowItem = (props) => {
12
12
  var _a;
13
- const { rec, index, list, reportTagsView, textStyles, space } = props;
13
+ const { rec, index, list, reportTagsView, textStyles, space, openFixedSize } = props;
14
14
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
15
15
  const [showVideo, setShowVideo] = useState(false);
16
16
  const imgDom = useRef(null);
@@ -104,11 +104,11 @@ const WaterfallFlowItem = (props) => {
104
104
  }, 0);
105
105
  };
106
106
  return (React.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
107
- React.createElement("div", { className: 'list-content-listItem-picture' },
107
+ React.createElement("div", { className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture' : 'list-content-listItem-picture1609' },
108
108
  showVideo && (React.createElement("div", { style: { display: 'none' } },
109
109
  React.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
110
110
  React.createElement("canvas", { ref: canvasRef }))),
111
- React.createElement(FormatImage, { loading: 'lazy', className: 'list-content-listItem-picture-img', ref: imgDom })),
111
+ React.createElement(FormatImage, { loading: 'lazy', className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture-img' : 'list-content-listItem-picture1609-img', ref: imgDom })),
112
112
  React.createElement("div", { className: 'list-content-listItem-info' },
113
113
  React.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title, dangerouslySetInnerHTML: {
114
114
  __html: setFontForText(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
@@ -8,7 +8,7 @@ import List from './List';
8
8
  import { useSxpDataSource } from '../../../../core/hooks';
9
9
  import { useEventReport } from '../../../../core/hooks/useEventReport';
10
10
  const WaterFall = (props) => {
11
- var _a;
11
+ var _a, _b;
12
12
  const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = useSxpDataSource();
13
13
  const { backMainFeed } = useEventReport();
14
14
  const modalEleRef = useRef(null);
@@ -97,6 +97,6 @@ const WaterFall = (props) => {
97
97
  display: openHashtag ? 'block' : 'none'
98
98
  } },
99
99
  React.createElement(Navbar, { icon: left, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
100
- (props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (React.createElement(List, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
100
+ ((_b = props === null || props === void 0 ? void 0 : props.openFixedSize) === null || _b === void 0 ? void 0 : _b.open) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (React.createElement(List, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
101
101
  };
102
102
  export default memo(WaterFall);
@@ -14,7 +14,10 @@ export interface IHashTagProps {
14
14
  };
15
15
  buttonBgStyle: CSSProperties;
16
16
  showBanner?: boolean;
17
- openFixedSize?: boolean;
17
+ openFixedSize?: {
18
+ open: true;
19
+ ratio: string;
20
+ };
18
21
  }
19
22
  declare const _default: React.NamedExoticComponent<IHashTagProps>;
20
23
  export default _default;
@@ -56,7 +56,8 @@ const HashTag = createMaterial(HashTagComponent, {
56
56
  paddingLeft: 20,
57
57
  paddingRight: 20,
58
58
  paddingBottom: 20
59
- }
59
+ },
60
+ openFixedSize: { open: true, ratio: '1' }
60
61
  }
61
62
  },
62
63
  w: 100,
@@ -5,12 +5,10 @@ declare const _default: ({
5
5
  label: string;
6
6
  name: string[];
7
7
  addonAfter: string;
8
- initialValue?: undefined;
9
8
  } | {
10
9
  type: string;
11
10
  label: string;
12
11
  name: string[];
13
- initialValue: boolean;
14
12
  addonAfter?: undefined;
15
13
  })[];
16
14
  } | {
@@ -19,10 +19,9 @@ export default [
19
19
  addonAfter: 'px'
20
20
  },
21
21
  {
22
- type: 'Switch',
22
+ type: 'HashTagFixedSize',
23
23
  label: '固定宽高',
24
- name: ['props', 'openFixedSize'],
25
- initialValue: true
24
+ name: ['props', 'openFixedSize']
26
25
  }
27
26
  ]
28
27
  },
@@ -12,7 +12,7 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
12
12
  const materials_1 = require("../../../../core/utils/materials");
13
13
  const WaterfallFlowItem = (props) => {
14
14
  var _a;
15
- const { rec, index, list, reportTagsView, textStyles, space } = props;
15
+ const { rec, index, list, reportTagsView, textStyles, space, openFixedSize } = props;
16
16
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = (0, hooks_1.useSxpDataSource)();
17
17
  const [showVideo, setShowVideo] = (0, react_1.useState)(false);
18
18
  const imgDom = (0, react_1.useRef)(null);
@@ -106,11 +106,11 @@ const WaterfallFlowItem = (props) => {
106
106
  }, 0);
107
107
  };
108
108
  return (react_1.default.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
109
- react_1.default.createElement("div", { className: 'list-content-listItem-picture' },
109
+ react_1.default.createElement("div", { className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture' : 'list-content-listItem-picture1609' },
110
110
  showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
111
111
  react_1.default.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
112
112
  react_1.default.createElement("canvas", { ref: canvasRef }))),
113
- react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: 'list-content-listItem-picture-img', ref: imgDom })),
113
+ react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture-img' : 'list-content-listItem-picture1609-img', ref: imgDom })),
114
114
  react_1.default.createElement("div", { className: 'list-content-listItem-info' },
115
115
  react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title, dangerouslySetInnerHTML: {
116
116
  __html: (0, tool_1.setFontForText)(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
@@ -11,7 +11,7 @@ const List_1 = tslib_1.__importDefault(require("./List"));
11
11
  const hooks_1 = require("../../../../core/hooks");
12
12
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
13
13
  const WaterFall = (props) => {
14
- var _a;
14
+ var _a, _b;
15
15
  const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = (0, hooks_1.useSxpDataSource)();
16
16
  const { backMainFeed } = (0, useEventReport_1.useEventReport)();
17
17
  const modalEleRef = (0, react_1.useRef)(null);
@@ -100,6 +100,6 @@ const WaterFall = (props) => {
100
100
  display: openHashtag ? 'block' : 'none'
101
101
  } },
102
102
  react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
103
- (props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
103
+ ((_b = props === null || props === void 0 ? void 0 : props.openFixedSize) === null || _b === void 0 ? void 0 : _b.open) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
104
104
  };
105
105
  exports.default = (0, react_1.memo)(WaterFall);
@@ -14,7 +14,10 @@ export interface IHashTagProps {
14
14
  };
15
15
  buttonBgStyle: CSSProperties;
16
16
  showBanner?: boolean;
17
- openFixedSize?: boolean;
17
+ openFixedSize?: {
18
+ open: true;
19
+ ratio: string;
20
+ };
18
21
  }
19
22
  declare const _default: React.NamedExoticComponent<IHashTagProps>;
20
23
  export default _default;
@@ -60,7 +60,8 @@ const HashTag = (0, create_1.createMaterial)(_1.default, {
60
60
  paddingLeft: 20,
61
61
  paddingRight: 20,
62
62
  paddingBottom: 20
63
- }
63
+ },
64
+ openFixedSize: { open: true, ratio: '1' }
64
65
  }
65
66
  },
66
67
  w: 100,
@@ -5,12 +5,10 @@ declare const _default: ({
5
5
  label: string;
6
6
  name: string[];
7
7
  addonAfter: string;
8
- initialValue?: undefined;
9
8
  } | {
10
9
  type: string;
11
10
  label: string;
12
11
  name: string[];
13
- initialValue: boolean;
14
12
  addonAfter?: undefined;
15
13
  })[];
16
14
  } | {
@@ -21,10 +21,9 @@ exports.default = [
21
21
  addonAfter: 'px'
22
22
  },
23
23
  {
24
- type: 'Switch',
24
+ type: 'HashTagFixedSize',
25
25
  label: '固定宽高',
26
- name: ['props', 'openFixedSize'],
27
- initialValue: true
26
+ name: ['props', 'openFixedSize']
28
27
  }
29
28
  ]
30
29
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "14.0.7",
3
+ "version": "15.0.2",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",