@chlp-tech/rpa-ui 0.0.15-beta-1 → 0.0.16

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.
@@ -40,6 +40,7 @@ interface VideoListProps {
40
40
  style?: React.CSSProperties;
41
41
  isLoading?: boolean;
42
42
  handleRetry?: () => void;
43
+ cardCanCheck?: boolean;
43
44
  }
44
45
  type SelectionStatus = 'all' | 'none' | 'partially';
45
46
  declare const VideoList: FC<VideoListProps>;
@@ -43,7 +43,9 @@ var VideoList = /*#__PURE__*/forwardRef(function (_ref, ref) {
43
43
  footerStyle = _ref.footerStyle,
44
44
  selectedIds = _ref.selectedIds,
45
45
  _ref$isLoading = _ref.isLoading,
46
- isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
46
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
47
+ _ref$cardCanCheck = _ref.cardCanCheck,
48
+ cardCanCheck = _ref$cardCanCheck === void 0 ? false : _ref$cardCanCheck;
47
49
  var _useState = useState([]),
48
50
  _useState2 = _slicedToArray(_useState, 2),
49
51
  checkedIds = _useState2[0],
@@ -168,7 +170,13 @@ var VideoList = /*#__PURE__*/forwardRef(function (_ref, ref) {
168
170
  }, /*#__PURE__*/React.createElement("div", {
169
171
  ref: isFirstItem ? itemRef : null,
170
172
  className: "".concat(styles.video_wrap, " ").concat(checkedIds.includes(video.id) ? styles.selected : ""),
171
- style: style
173
+ style: style,
174
+ onClick: function onClick() {
175
+ if (cardCanCheck) {
176
+ var checked = !checkedIds.includes(video.id);
177
+ handleCheck(video.id, checked);
178
+ }
179
+ }
172
180
  }, /*#__PURE__*/React.createElement("div", {
173
181
  style: {
174
182
  position: "relative",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chlp-tech/rpa-ui",
3
- "version": "0.0.15-beta-1",
3
+ "version": "0.0.16",
4
4
  "description": "rpa-ui",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",