synapse-react-client 2.1.2 → 2.1.3
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.
- package/dist/containers/FileUpload.d.ts +2 -1
- package/dist/containers/FileUpload.js +1 -1
- package/dist/containers/FileUpload.js.map +1 -1
- package/dist/containers/FullWidthAlert.d.ts +1 -1
- package/dist/containers/FullWidthAlert.js +10 -3
- package/dist/containers/FullWidthAlert.js.map +1 -1
- package/dist/containers/ToastMessage.d.ts +4 -2
- package/dist/containers/ToastMessage.js +25 -6
- package/dist/containers/ToastMessage.js.map +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep2.d.ts +3 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep2.js +47 -36
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep2.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/umd/synapse-react-client.development.js +82 -71
- package/dist/umd/synapse-react-client.development.js.map +2 -2
- package/dist/umd/synapse-react-client.production.min.js +23 -23
- package/dist/umd.index.d.ts +4 -2
- package/dist/utils/functions/getUserData.d.ts +1 -1
- package/dist/utils/functions/getUserData.js +10 -34
- package/dist/utils/functions/getUserData.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/useUserBundle.js +1 -1
- package/dist/utils/hooks/SynapseAPI/useUserBundle.js.map +1 -1
- package/package.json +1 -1
package/dist/umd.index.d.ts
CHANGED
|
@@ -53,9 +53,11 @@ declare const SynapseComponents: {
|
|
|
53
53
|
autoCloseInMs?: number | undefined;
|
|
54
54
|
primaryButtonText?: string | undefined;
|
|
55
55
|
onPrimaryButtonClick?: (() => void) | undefined;
|
|
56
|
+
dismissOnPrimaryButtonClick?: boolean | undefined;
|
|
56
57
|
secondaryButtonText?: string | undefined;
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
onSecondaryButtonClickOrHref?: string | (() => void) | undefined;
|
|
59
|
+
dismissOnSecondaryButtonClick?: boolean | undefined;
|
|
60
|
+
}) => void;
|
|
59
61
|
IconSvg: import("react").FunctionComponent<import("./containers/IconSvg").IconSvgProps>;
|
|
60
62
|
UserProfileLinks: typeof UserProfileLinks;
|
|
61
63
|
PlotlyWrapper: import("react").FC<import("./containers/PlotlyWrapper").PlotlyWrapperProps>;
|
|
@@ -6,7 +6,7 @@ export declare type UserProfileAndImg = {
|
|
|
6
6
|
userProfile: UserProfile;
|
|
7
7
|
preSignedURL?: string;
|
|
8
8
|
};
|
|
9
|
-
declare function getProfilePic(userProfile: UserProfile
|
|
9
|
+
declare function getProfilePic(userProfile: UserProfile): UserProfileAndImg;
|
|
10
10
|
declare const getColor: (userName: string) => string;
|
|
11
11
|
export { getUserProfileWithProfilePicAttached, getColor, getProfilePic };
|
|
12
12
|
declare const _default: {
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getProfilePic = exports.getColor = exports.getUserProfileWithProfilePicAttached = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var __1 = require("..");
|
|
6
|
-
var synapseTypes_1 = require("../synapseTypes/");
|
|
7
6
|
var getEndpoint_1 = require("./getEndpoint");
|
|
8
7
|
/*
|
|
9
8
|
Utility functions for UserCards
|
|
@@ -30,39 +29,16 @@ function getUserProfileWithProfilePicAttached(principalIds) {
|
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
31
|
exports.getUserProfileWithProfilePicAttached = getUserProfileWithProfilePicAttached;
|
|
33
|
-
function getProfilePic(userProfile
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
associateObjectId: userProfile.ownerId,
|
|
45
|
-
associateObjectType: synapseTypes_1.FileHandleAssociateType.UserProfileAttachment,
|
|
46
|
-
fileHandleId: userProfile.profilePicureFileHandleId,
|
|
47
|
-
},
|
|
48
|
-
];
|
|
49
|
-
request = {
|
|
50
|
-
includeFileHandles: false,
|
|
51
|
-
includePreSignedURLs: true,
|
|
52
|
-
includePreviewPreSignedURLs: false,
|
|
53
|
-
requestedFiles: fileHandleAssociationList,
|
|
54
|
-
};
|
|
55
|
-
return [4 /*yield*/, __1.SynapseClient.getFiles(request, token)];
|
|
56
|
-
case 2:
|
|
57
|
-
fileHandleList = _a.sent();
|
|
58
|
-
firstElement = fileHandleList.requestedFiles[0];
|
|
59
|
-
return [2 /*return*/, {
|
|
60
|
-
userProfile: userProfile,
|
|
61
|
-
preSignedURL: firstElement.preSignedURL,
|
|
62
|
-
}];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
32
|
+
function getProfilePic(userProfile) {
|
|
33
|
+
if (!userProfile.profilePicureFileHandleId) {
|
|
34
|
+
return { userProfile: userProfile };
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return {
|
|
38
|
+
userProfile: userProfile,
|
|
39
|
+
preSignedURL: (0, getEndpoint_1.getEndpoint)(getEndpoint_1.BackendDestinationEnum.REPO_ENDPOINT) + "/repo/v1/userProfile/" + userProfile.ownerId + "/image/preview?redirect=true",
|
|
40
|
+
};
|
|
41
|
+
}
|
|
66
42
|
}
|
|
67
43
|
exports.getProfilePic = getProfilePic;
|
|
68
44
|
var COLORS = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserData.js","sourceRoot":"","sources":["../../../src/lib/utils/functions/getUserData.ts"],"names":[],"mappings":";;;;AAAA,wBAAkC;
|
|
1
|
+
{"version":3,"file":"getUserData.js","sourceRoot":"","sources":["../../../src/lib/utils/functions/getUserData.ts"],"names":[],"mappings":";;;;AAAA,wBAAkC;AAElC,6CAAmE;AAEnE;;EAEE;AAEF,SAAe,oCAAoC,CACjD,YAAsB;;;;;wBAED,qBAAM,iBAAa,CAAC,eAAe,CAAC,YAAY,CAAC,EAAA;;oBAAhE,YAAY,GAAG,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AG,CAAC,GAAG,CAAC,CAAA;AACtB,CAAC,CAAA;AAED,IAAM,QAAQ,GAAG,UAAC,QAAgB;IAChC,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAA;IACrC,OAAO,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAC/C,CAAC,CAAA;AAE8C,4BAAQ;AACvD,kBAAe;IACb,oCAAoC,sCAAA;IACpC,QAAQ,UAAA;IACR,aAAa,eAAA;CACd,CAAA"}
|
|
@@ -31,7 +31,7 @@ function useGetUserProfileWithProfilePic(principalId, options) {
|
|
|
31
31
|
enabled: (_a = options === null || options === void 0 ? void 0 : options.enabled) !== null && _a !== void 0 ? _a : true,
|
|
32
32
|
}).data;
|
|
33
33
|
// TODO: create useGetFile hook with careful configuration to prevent serving expired pre-signed URLs
|
|
34
|
-
return (0, react_query_1.useQuery)(queryKey, function () { return (0, getUserData_1.getProfilePic)(userProfile
|
|
34
|
+
return (0, react_query_1.useQuery)(queryKey, function () { return (0, getUserData_1.getProfilePic)(userProfile); }, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), { enabled: !!userProfile }));
|
|
35
35
|
}
|
|
36
36
|
exports.useGetUserProfileWithProfilePic = useGetUserProfileWithProfilePic;
|
|
37
37
|
//# sourceMappingURL=useUserBundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserBundle.js","sourceRoot":"","sources":["../../../../src/lib/utils/hooks/SynapseAPI/useUserBundle.ts"],"names":[],"mappings":";;;;AAAA,2CAAuD;AACvD,2BAAqC;AACrC,2DAA8E;AAE9E,uDAAwD;AAGxD,SAAgB,iBAAiB,CAC/B,WAAmB,EACnB,OAA0D;IAElD,IAAA,WAAW,GAAK,IAAA,kCAAiB,GAAE,YAAxB,CAAwB;IAC3C,IAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;IAC9D,8DAA8D;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