@fixefy/fixefy-ui-components 0.3.47 → 0.3.49
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,5 +1,6 @@
|
|
|
1
|
-
export declare const FxUserImage: ({ bucketAddress, user, loading, setLoading }: {
|
|
1
|
+
export declare const FxUserImage: ({ bucketAddress, path, user, loading, setLoading }: {
|
|
2
2
|
bucketAddress: string;
|
|
3
|
+
path: string;
|
|
3
4
|
user: any;
|
|
4
5
|
loading: boolean;
|
|
5
6
|
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, user, loading, setLoading })=>{
|
|
95
|
+
const FxUserImage = ({ bucketAddress, path, 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 {
|
|
99
|
+
const { 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, user, loading, setLoading })=>{
|
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
const bucket = `fixefy-${bucketAddress}`;
|
|
165
|
-
const startAfter = `${currentWorkspace.readable_id}/${
|
|
165
|
+
const startAfter = `${currentWorkspace.readable_id}/${path}`;
|
|
166
166
|
const data = yield listS3Bucket({
|
|
167
167
|
bucketName: bucket,
|
|
168
168
|
prefix: startAfter,
|
package/dist/index.d.ts
CHANGED
|
@@ -29,5 +29,6 @@ export { FxTabs } from './FxTabs';
|
|
|
29
29
|
export { FxTag, TagPropsType } from './FxTag';
|
|
30
30
|
export { FxTextField, TextFieldPropsType } from './FxTextField';
|
|
31
31
|
export { FxTodo, TodoItemType, TodoPropsType } from './FxTodo';
|
|
32
|
+
export { FxUserImage } from './FxUserImage';
|
|
32
33
|
export { FxWizard, StepsLauncher } from './FxWizard';
|
|
33
34
|
export { Card, PageHeader, Label, BoldValue, Value, PageTitle, Link, Text, ShowMore, ShowMoreContainer, DataWrapper, Bars, } from './FxStyledComponents';
|
package/dist/index.js
CHANGED
|
@@ -135,6 +135,9 @@ _export(exports, {
|
|
|
135
135
|
FxToggleButtons: function() {
|
|
136
136
|
return _FxToggleButtons.FxToggleButtons;
|
|
137
137
|
},
|
|
138
|
+
FxUserImage: function() {
|
|
139
|
+
return _FxUserImage.FxUserImage;
|
|
140
|
+
},
|
|
138
141
|
FxWizard: function() {
|
|
139
142
|
return _FxWizard.FxWizard;
|
|
140
143
|
},
|
|
@@ -263,5 +266,6 @@ const _FxTabs = require("./FxTabs");
|
|
|
263
266
|
const _FxTag = require("./FxTag");
|
|
264
267
|
const _FxTextField = require("./FxTextField");
|
|
265
268
|
const _FxTodo = require("./FxTodo");
|
|
269
|
+
const _FxUserImage = require("./FxUserImage");
|
|
266
270
|
const _FxWizard = require("./FxWizard");
|
|
267
271
|
const _FxStyledComponents = require("./FxStyledComponents");
|
package/package.json
CHANGED