@fixefy/fixefy-ui-components 0.3.49 → 0.3.51

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,7 @@
1
1
  import React from 'react';
2
- export declare const FxGeneralModal: ({ buttonComponent, modalComponent, onClick, }: {
2
+ export declare const FxGeneralModal: ({ buttonComponent, modalComponent, onClick, closeOnButtonChange }: {
3
3
  buttonComponent: any;
4
4
  modalComponent: any;
5
5
  onClick?: any;
6
+ closeOnButtonChange?: boolean;
6
7
  }) => React.JSX.Element;
@@ -52,7 +52,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
52
52
  }
53
53
  return newObj;
54
54
  }
55
- const FxGeneralModal = ({ buttonComponent, modalComponent, onClick })=>{
55
+ const FxGeneralModal = ({ buttonComponent, modalComponent, onClick, closeOnButtonChange = true })=>{
56
56
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
57
57
  const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
58
58
  const handleClick = (e)=>{
@@ -72,7 +72,9 @@ const FxGeneralModal = ({ buttonComponent, modalComponent, onClick })=>{
72
72
  setAnchorEl(null);
73
73
  };
74
74
  (0, _react.useEffect)(()=>{
75
- setIsOpen(false);
75
+ if (closeOnButtonChange) {
76
+ setIsOpen(false);
77
+ }
76
78
  }, [
77
79
  buttonComponent
78
80
  ]);
@@ -1,6 +1,5 @@
1
- export declare const FxUserImage: ({ bucketAddress, path, user, loading, setLoading }: {
1
+ export declare const FxUserImage: ({ bucketAddress, user, loading, setLoading }: {
2
2
  bucketAddress: string;
3
- path: string;
4
3
  user: any;
5
4
  loading: boolean;
6
5
  setLoading: (loading: boolean) => void;
@@ -92,11 +92,11 @@ function _interop_require_wildcard(obj, nodeInterop) {
92
92
  }
93
93
  return newObj;
94
94
  }
95
- const FxUserImage = ({ bucketAddress, path, user, loading, setLoading })=>{
95
+ const FxUserImage = ({ bucketAddress, user, loading, setLoading })=>{
96
96
  const getRandomColor = (0, _fixefyhooks.useRandomColor)();
97
97
  const { listS3Bucket } = (0, _nexts3upload.useS3ListBucket)();
98
98
  const { downloadFromS3 } = (0, _nexts3upload.useS3Download)('download-bytearray');
99
- const { full_name, first_name, last_name } = user;
99
+ const { email, full_name, first_name, last_name } = user;
100
100
  var _ref;
101
101
  // @ts-ignore
102
102
  const initials = (0, _fixefyuiutils.toInitials)((_ref = full_name !== null && full_name !== void 0 ? full_name : first_name && last_name) !== null && _ref !== void 0 ? _ref : 'unknown').slice(0, 2);
@@ -162,7 +162,7 @@ const FxUserImage = ({ bucketAddress, path, user, loading, setLoading })=>{
162
162
  return;
163
163
  }
164
164
  const bucket = `fixefy-${bucketAddress}`;
165
- const startAfter = `${currentWorkspace.readable_id}/${path}`;
165
+ const startAfter = `${currentWorkspace.readable_id}/${email}`;
166
166
  const data = yield listS3Bucket({
167
167
  bucketName: bucket,
168
168
  prefix: startAfter,
package/package.json CHANGED
@@ -69,5 +69,5 @@
69
69
  "require": "./dist/index.js"
70
70
  }
71
71
  },
72
- "version": "0.3.49"
72
+ "version": "0.3.51"
73
73
  }