synapse-react-client 2.0.62 → 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/README.md +25 -33
- package/dist/containers/DirectDownload.js +1 -1
- package/dist/containers/DirectDownload.js.map +1 -1
- 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/HelpPopover.d.ts +9 -0
- package/dist/containers/HelpPopover.js +21 -0
- package/dist/containers/HelpPopover.js.map +1 -0
- package/dist/containers/MarkdownPopover.js +3 -1
- package/dist/containers/MarkdownPopover.js.map +1 -1
- package/dist/containers/ProgrammaticInstructionsModal.d.ts +25 -0
- package/dist/containers/ProgrammaticInstructionsModal.js +77 -0
- package/dist/containers/ProgrammaticInstructionsModal.js.map +1 -0
- 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/containers/download_list_v2/DirectProgrammaticDownload.d.ts +7 -0
- package/dist/containers/download_list_v2/DirectProgrammaticDownload.js +23 -0
- package/dist/containers/download_list_v2/DirectProgrammaticDownload.js.map +1 -0
- package/dist/containers/download_list_v2/DownloadCartPage.js +39 -40
- package/dist/containers/download_list_v2/DownloadCartPage.js.map +1 -1
- package/dist/containers/download_list_v2/DownloadListTable.js +13 -9
- package/dist/containers/download_list_v2/DownloadListTable.js.map +1 -1
- package/dist/containers/entity_finder/details/view/DetailsView.js +2 -6
- package/dist/containers/entity_finder/details/view/DetailsView.js.map +1 -1
- package/dist/containers/row_renderers/utils/Icon.js +19 -19
- package/dist/containers/row_renderers/utils/Icon.js.map +1 -1
- package/dist/containers/synapse_form_wrapper/SynapseFormSubmissionsGrid.js +10 -10
- package/dist/containers/synapse_form_wrapper/SynapseFormSubmissionsGrid.js.map +1 -1
- package/dist/containers/synapse_form_wrapper/SynapseFormWrapper.js +3 -3
- package/dist/containers/synapse_form_wrapper/SynapseFormWrapper.js.map +1 -1
- package/dist/containers/table/datasets/DatasetItemsEditor.js +15 -11
- package/dist/containers/table/datasets/DatasetItemsEditor.js.map +1 -1
- package/dist/containers/table/table-top/DownloadLoginModal.js +1 -2
- package/dist/containers/table/table-top/DownloadLoginModal.js.map +1 -1
- package/dist/containers/table/table-top/DownloadOptions.js +2 -2
- package/dist/containers/table/table-top/DownloadOptions.js.map +1 -1
- package/dist/containers/table/table-top/{ProgrammaticOptions.d.ts → ProgrammaticTableDownload.d.ts} +0 -5
- package/dist/containers/table/table-top/ProgrammaticTableDownload.js +64 -0
- package/dist/containers/table/table-top/ProgrammaticTableDownload.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/style/base/_icons.scss +4 -5
- package/dist/style/bootstrap4_backports/_base-import.scss +1 -1
- package/dist/style/bootstrap4_backports/_overrides.scss +0 -6
- package/dist/style/components/_dataset-editor.scss +1 -1
- package/dist/style/components/_download-cart-page.scss +9 -6
- package/dist/style/components/_download-list-v2.scss +7 -7
- package/dist/style/components/_fluid-modal.scss +0 -5
- package/dist/style/components/_markdown.scss +0 -1
- package/dist/style/components/entity_finder/_details-view.scss +1 -1
- package/dist/style/components/synapse_form_wrapper/_synapse-form-wrapper.scss +2 -2
- package/dist/style/main.css +24 -30
- package/dist/style/main.scss +1 -1
- package/dist/umd/{synapse-react-client.production.styles.css → synapse-react-client.development.css} +2233 -2249
- package/dist/umd/synapse-react-client.development.css.map +7 -0
- package/dist/umd/synapse-react-client.development.js +82965 -0
- package/dist/umd/synapse-react-client.development.js.map +7 -0
- package/dist/umd/synapse-react-client.production.min.css +12 -0
- package/dist/umd/synapse-react-client.production.min.js +953 -95
- package/dist/{rollup.index.d.ts → umd.index.d.ts} +11 -5
- package/dist/{rollup.index.js → umd.index.js} +10 -4
- package/dist/umd.index.js.map +1 -0
- 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/dist/utils/synapseTypes/ExternalFileHandleInterface.js +3 -2
- package/dist/utils/synapseTypes/ExternalFileHandleInterface.js.map +1 -1
- package/dist/utils/typography/Typography.styles.js +2 -2
- package/package.json +21 -24
- package/dist/containers/table/table-top/ProgrammaticOptions.js +0 -119
- package/dist/containers/table/table-top/ProgrammaticOptions.js.map +0 -1
- package/dist/rollup.index.js.map +0 -1
|
@@ -6,12 +6,13 @@ import EntityForm from './containers/EntityForm';
|
|
|
6
6
|
import HasAccess from './containers/HasAccess';
|
|
7
7
|
import DownloadListTable from './containers/download_list/DownloadListTable';
|
|
8
8
|
import './style/main.scss';
|
|
9
|
-
import { SynapseConstants, SynapseClient } from './utils
|
|
9
|
+
import { SynapseConstants, SynapseClient } from './utils';
|
|
10
10
|
import FavoritesPage from './containers/FavoritesPage';
|
|
11
11
|
import ShowDownloadV2 from './containers/download_list_v2/ShowDownloadV2';
|
|
12
12
|
import FullWidthAlert from './containers/FullWidthAlert';
|
|
13
|
+
import DirectProgrammaticDownload from './containers/download_list_v2/DirectProgrammaticDownload';
|
|
13
14
|
import UserProfileLinks from './containers/user_profile_links/UserProfileLinks';
|
|
14
|
-
import
|
|
15
|
+
import ProgrammaticTableDownload from './containers/table/table-top/ProgrammaticTableDownload';
|
|
15
16
|
import { useSynapseContext } from './utils/SynapseContext';
|
|
16
17
|
import { DatasetItemsEditor } from './containers/table/datasets/DatasetItemsEditor';
|
|
17
18
|
declare const SynapseContext: {
|
|
@@ -46,16 +47,17 @@ declare const SynapseComponents: {
|
|
|
46
47
|
SynapseNavDrawer: import("react").FunctionComponent<import("./containers/SynapseNavDrawer").SynapseNavDrawerProps>;
|
|
47
48
|
FavoritesPage: typeof FavoritesPage;
|
|
48
49
|
EntityModal: import("react").FC<import("./containers/entity/metadata/EntityModal").EntityModalProps>;
|
|
49
|
-
ProgrammaticOptions: typeof ProgrammaticOptions;
|
|
50
50
|
SynapseToastContainer: import("react").FunctionComponent<{}>;
|
|
51
51
|
displayToast: (message: string, variant?: "success" | "info" | "warning" | "danger" | undefined, toastMessageOptions?: {
|
|
52
52
|
title?: string | undefined;
|
|
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>;
|
|
@@ -63,5 +65,9 @@ declare const SynapseComponents: {
|
|
|
63
65
|
EntityTypeIcon: import("react").FC<Omit<import("@fortawesome/react-fontawesome").FontAwesomeIconProps, "icon"> & {
|
|
64
66
|
type: import("./utils/synapseTypes").EntityType;
|
|
65
67
|
}>;
|
|
68
|
+
HelpPopover: import("react").FunctionComponent<import("./containers/HelpPopover").HelpPopoverProps>;
|
|
69
|
+
ProgrammaticTableDownload: typeof ProgrammaticTableDownload;
|
|
70
|
+
DirectProgrammaticDownload: typeof DirectProgrammaticDownload;
|
|
71
|
+
ProgrammaticInstructionsModal: ({ show, title, onClose, pythonNotes, pythonCode, rNotes, rCode, cliNotes, cliCode, helpMarkdown, helpUrl, }: import("./containers/ProgrammaticInstructionsModal").ProgrammaticInstructionsModalProps) => JSX.Element;
|
|
66
72
|
};
|
|
67
73
|
export { SynapseComponents, SynapseConstants, SynapseClient, SynapseContext };
|
|
@@ -11,7 +11,7 @@ var EntityForm_1 = (0, tslib_1.__importDefault)(require("./containers/EntityForm
|
|
|
11
11
|
var HasAccess_1 = (0, tslib_1.__importDefault)(require("./containers/HasAccess"));
|
|
12
12
|
var DownloadListTable_1 = (0, tslib_1.__importDefault)(require("./containers/download_list/DownloadListTable"));
|
|
13
13
|
require("./style/main.scss");
|
|
14
|
-
var utils_1 = require("./utils
|
|
14
|
+
var utils_1 = require("./utils");
|
|
15
15
|
Object.defineProperty(exports, "SynapseConstants", { enumerable: true, get: function () { return utils_1.SynapseConstants; } });
|
|
16
16
|
Object.defineProperty(exports, "SynapseClient", { enumerable: true, get: function () { return utils_1.SynapseClient; } });
|
|
17
17
|
var EvaluationCard_1 = require("./containers/evaluation_queues/EvaluationCard");
|
|
@@ -30,12 +30,15 @@ var ErrorPage_1 = (0, tslib_1.__importDefault)(require("./containers/ErrorPage")
|
|
|
30
30
|
var EntityBadgeIcons_1 = require("./containers/EntityBadgeIcons");
|
|
31
31
|
var ShowDownloadV2_1 = (0, tslib_1.__importDefault)(require("./containers/download_list_v2/ShowDownloadV2"));
|
|
32
32
|
var FullWidthAlert_1 = (0, tslib_1.__importDefault)(require("./containers/FullWidthAlert"));
|
|
33
|
+
var HelpPopover_1 = require("./containers/HelpPopover");
|
|
34
|
+
var DirectProgrammaticDownload_1 = (0, tslib_1.__importDefault)(require("./containers/download_list_v2/DirectProgrammaticDownload"));
|
|
33
35
|
var DownloadConfirmation_1 = require("./containers/download_list/DownloadConfirmation");
|
|
34
36
|
var UserProfileLinks_1 = (0, tslib_1.__importDefault)(require("./containers/user_profile_links/UserProfileLinks"));
|
|
35
37
|
var SchemaDrivenAnnotationEditor_1 = require("./containers/entity/annotations/SchemaDrivenAnnotationEditor");
|
|
36
38
|
var EntityModal_1 = require("./containers/entity/metadata/EntityModal");
|
|
37
|
-
var
|
|
39
|
+
var ProgrammaticTableDownload_1 = (0, tslib_1.__importDefault)(require("./containers/table/table-top/ProgrammaticTableDownload"));
|
|
38
40
|
var ToastMessage_1 = require("./containers/ToastMessage");
|
|
41
|
+
var ProgrammaticInstructionsModal_1 = require("./containers/ProgrammaticInstructionsModal");
|
|
39
42
|
var PlotlyWrapper_1 = (0, tslib_1.__importDefault)(require("./containers/PlotlyWrapper"));
|
|
40
43
|
var IconSvg_1 = (0, tslib_1.__importDefault)(require("./containers/IconSvg"));
|
|
41
44
|
var SynapseContext_1 = require("./utils/SynapseContext");
|
|
@@ -74,7 +77,6 @@ var SynapseComponents = {
|
|
|
74
77
|
SynapseNavDrawer: SynapseNavDrawer_1.SynapseNavDrawer,
|
|
75
78
|
FavoritesPage: FavoritesPage_1.default,
|
|
76
79
|
EntityModal: EntityModal_1.EntityModal,
|
|
77
|
-
ProgrammaticOptions: ProgrammaticOptions_1.default,
|
|
78
80
|
SynapseToastContainer: ToastMessage_1.SynapseToastContainer,
|
|
79
81
|
displayToast: ToastMessage_1.displayToast,
|
|
80
82
|
IconSvg: IconSvg_1.default,
|
|
@@ -82,6 +84,10 @@ var SynapseComponents = {
|
|
|
82
84
|
PlotlyWrapper: PlotlyWrapper_1.default,
|
|
83
85
|
DatasetItemsEditor: DatasetItemsEditor_1.DatasetItemsEditor,
|
|
84
86
|
EntityTypeIcon: EntityIcon_1.EntityTypeIcon,
|
|
87
|
+
HelpPopover: HelpPopover_1.HelpPopover,
|
|
88
|
+
ProgrammaticTableDownload: ProgrammaticTableDownload_1.default,
|
|
89
|
+
DirectProgrammaticDownload: DirectProgrammaticDownload_1.default,
|
|
90
|
+
ProgrammaticInstructionsModal: ProgrammaticInstructionsModal_1.ProgrammaticInstructionsModal,
|
|
85
91
|
};
|
|
86
92
|
exports.SynapseComponents = SynapseComponents;
|
|
87
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=umd.index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"umd.index.js","sourceRoot":"","sources":["../src/lib/umd.index.ts"],"names":[],"mappings":";;;;AAAA,uCAAoC;AACpC,gFAA4C;AAC5C,0EAAsC;AACtC,kFAA8C;AAC9C,4FAAwD;AACxD,oFAAgD;AAChD,kFAA8C;AAC9C,gHAA4E;AAC5E,6BAA0B;AAC1B,iCAAyD;AAkF7B,iGAlFnB,wBAAgB,OAkFmB;AAAE,8FAlFnB,qBAAa,OAkFmB;AAjF3D,gFAA8E;AAC9E,sFAAoF;AACpF,oEAAkE;AAClE,oGAAgE;AAChE,wFAAoD;AACpD,sIAAkG;AAClG,gEAA8D;AAC9D,kEAAgE;AAChE,mFAAiF;AACjF,0FAAsD;AACtD,4FAA0F;AAC1F,wEAAsE;AACtE,kFAA8C;AAC9C,kEAAgE;AAChE,6GAAyE;AACzE,4FAAwD;AACxD,wDAAsD;AACtD,qIAAiG;AACjG,wFAAsF;AACtF,mHAA+E;AAC/E,6GAA2G;AAC3G,wEAAsE;AACtE,kIAA8F;AAC9F,0DAA+E;AAC/E,4FAA0F;AAC1F,0FAAsD;AACtD,8EAA0C;AAC1C,yDAI+B;AAC/B,qFAAmF;AACnF,sDAAwD;AAExD,IAAM,cAAc,GAAG;IACrB,sBAAsB,yCAAA;IACtB,sBAAsB,yCAAA;IACtB,iBAAiB,oCAAA;CAClB,CAAA;AA0C4D,wCAAc;AAxC3E,IAAM,iBAAiB,GAAG;IACxB,KAAK,iBAAA;IACL,SAAS,qBAAA;IACT,UAAU,sBAAA;IACV,QAAQ,oBAAA;IACR,cAAc,0BAAA;IACd,SAAS,qBAAA;IACT,iBAAiB,6BAAA;IACjB,cAAc,iCAAA;IACd,oBAAoB,6CAAA;IACpB,eAAe,mCAAA;IACf,iBAAiB,uCAAA;IACjB,kBAAkB,8BAAA;IAClB,YAAY,wBAAA;IACZ,mBAAmB,+BAAA;IACnB,eAAe,mCAAA;IACf,YAAY,6BAAA;IACZ,SAAS,qBAAA;IACT,gBAAgB,qCAAA;IAChB,gBAAgB,qCAAA;IAChB,cAAc,0BAAA;IACd,oBAAoB,6CAAA;IACpB,cAAc,EAAE,wBAAc;IAC9B,4BAA4B,6DAAA;IAC5B,gBAAgB,qCAAA;IAChB,aAAa,yBAAA;IACb,WAAW,2BAAA;IACX,qBAAqB,sCAAA;IACrB,YAAY,6BAAA;IACZ,OAAO,mBAAA;IACP,gBAAgB,4BAAA;IAChB,aAAa,yBAAA;IACb,kBAAkB,yCAAA;IAClB,cAAc,6BAAA;IACd,WAAW,2BAAA;IACX,yBAAyB,qCAAA;IACzB,0BAA0B,sCAAA;IAC1B,6BAA6B,+DAAA;CAC9B,CAAA;AAEQ,8CAAiB"}
|
|
@@ -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,SAAiD;oBAChE,oBAAoB,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,UAAA,OAAO;wBACxD,IAAI,OAAO,CAAC,yBAAyB,EAAE;4BACrC,uDACK,OAAO,KACV,kBAAkB,EAAK,IAAA,yBAAW,EAAC,oCAAsB,CAAC,aAAa,CAAC,6BAAwB,OAAO,CAAC,OAAO,iCAA8B,IAC9I;yBACF;6BAAM;4BACL,OAAO,OAAO,CAAA;yBACf;oBACH,CAAC,CAAC,CAAA;oBACF,sBAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,EAAA;;;;CACtC;AAuDQ,oFAAoC;AAhD7C,SAAS,aAAa,CACpB,WAAwB;IAExB,IAAI,CAAC,WAAW,CAAC,yBAAyB,EAAE;QAC1C,OAAO,EAAE,WAAW,aAAA,EAAE,CAAA;KACvB;SAAM;QACL,OAAO;YACL,WAAW,aAAA;YACX,YAAY,EAAK,IAAA,yBAAW,EAAC,oCAAsB,CAAC,aAAa,CAAC,6BAAwB,WAAW,CAAC,OAAO,iCAA8B;SAC5I,CAAA;KACF;AACH,CAAC;AAqCwD,sCAAa;AAnCtE,IAAM,MAAM,GAAa;IACvB,WAAW;IACX,OAAO;IACP,WAAW;IACX,QAAQ;IACR,OAAO;IACP,OAAO;IACP,aAAa;IACb,eAAe;IACf,MAAM;IACN,MAAM;IACN,MAAM;IACN,aAAa;IACb,QAAQ;IACR,MAAM;IACN,WAAW;IACX,YAAY;CACb,CAAA;AAED,IAAM,IAAI,GAAG,UAAC,QAAgB;IAC5B,IAAM,GAAG,GAAG,QAAQ;SACjB,KAAK,CAAC,EAAE,CAAC;SACT,MAAM,CACL,UAAC,QAAQ,EAAE,OAAO;QAChB,OAAA,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAAxD,CAAwD,EAC1D,CAAC,CACF,CAAA;IACH,OAAO,IAAI,CAAC,GAAG,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
|
//# sour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K,IAAA,kCAAiB,GAAE,YAAxB,CAAwB;IAC3C,IAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;IAEjE,IAAM,WAAW,GAAK,iBAAiB,CAAC,WAAW,EAAE;QAC3D,OAAO,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,IAAI;KAClC,CAAC,KAFuB,CAEvB;IAEF,qGAAqG;IACrG,OAAO,IAAA,sBAAQ,EACb,QAAQ,EACR,cAAM,OAAA,IAAA,2BAAa,EAAC,WAAY,CAAC,EAA3B,CAA2B,kDAE5B,OAAO,KACV,OAAO,EAAE,CAAC,CAAC,WAAW,IAEzB,CAAA;AACH,CAAC;AApBD,0EAoBC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.implementsExternalFileHandleInterface = exports.assertIsExternalFileHandle = exports.ExternalFileHandleConcreteTypeEnum = void 0;
|
|
4
|
-
var
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
5
6
|
var ExternalFileHandleConcreteTypeEnum;
|
|
6
7
|
(function (ExternalFileHandleConcreteTypeEnum) {
|
|
7
8
|
ExternalFileHandleConcreteTypeEnum["ProxyFileHandle"] = "org.sagebionetworks.repo.model.file.ProxyFileHandle";
|
|
@@ -10,7 +11,7 @@ var ExternalFileHandleConcreteTypeEnum;
|
|
|
10
11
|
})(ExternalFileHandleConcreteTypeEnum = exports.ExternalFileHandleConcreteTypeEnum || (exports.ExternalFileHandleConcreteTypeEnum = {}));
|
|
11
12
|
function assertIsExternalFileHandle(x) {
|
|
12
13
|
if ((x === null || x === void 0 ? void 0 : x.concreteType) !== ExternalFileHandleConcreteTypeEnum.ExternalFileHandle) {
|
|
13
|
-
throw new assert_1.AssertionError({
|
|
14
|
+
throw new assert_1.default.AssertionError({
|
|
14
15
|
message: " ExternalFileHandle expected but found " + x,
|
|
15
16
|
});
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalFileHandleInterface.js","sourceRoot":"","sources":["../../../src/lib/utils/synapseTypes/ExternalFileHandleInterface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExternalFileHandleInterface.js","sourceRoot":"","sources":["../../../src/lib/utils/synapseTypes/ExternalFileHandleInterface.ts"],"names":[],"mappings":";;;;AACA,+DAA2B;AAE3B,IAAY,kCAIX;AAJD,WAAY,kCAAkC;IAC5C,6GAAuE,CAAA;IACvE,yIAAmG,CAAA;IACnG,mHAA6E,CAAA;AAC/E,CAAC,EAJW,kCAAkC,GAAlC,0CAAkC,KAAlC,0CAAkC,QAI7C;AAeD,SAAgB,0BAA0B,CACxC,CAAc;IAEd,IACE,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,YAAY,MAAK,kCAAkC,CAAC,kBAAkB,EACzE;QACA,MAAM,IAAI,gBAAM,CAAC,cAAc,CAAC;YAC9B,OAAO,EAAE,4CAA0C,CAAG;SACvD,CAAC,CAAA;KACH;AACH,CAAC;AAVD,gEAUC;AAoBD,sFAAsF;AACtF,SAAgB,qCAAqC,CACnD,CAA8B;IAE9B,OAAO,MAAM,CAAC,MAAM,CAAS,kCAAkC,CAAC,CAAC,QAAQ,CACvE,CAAC,CAAC,YAAY,CACf,CAAA;AACH,CAAC;AAND,sFAMC"}
|
|
@@ -11,8 +11,8 @@ var useTypographyStyle = (0, core_1.makeStyles)(function () { return ({
|
|
|
11
11
|
headline1: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "24px", fontWeight: 700, lineHeight: "28px" }),
|
|
12
12
|
headline2: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "20px", fontWeight: 400, lineHeight: "24px" }),
|
|
13
13
|
headline3: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "18px", fontWeight: 700, lineHeight: "20px" }),
|
|
14
|
-
body1: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "
|
|
15
|
-
body2: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "
|
|
14
|
+
body1: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "14px", fontWeight: 400, lineHeight: "24px" }),
|
|
15
|
+
body2: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "14px", fontWeight: 400, lineHeight: "24px", fontStyle: "italic" }),
|
|
16
16
|
breadcrumb1: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "14px", fontWeight: 400, lineHeight: "16px", textTransform: "uppercase" }),
|
|
17
17
|
breadcrumb2: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "14px", fontWeight: 700, lineHeight: "16px", textTransform: "uppercase" }),
|
|
18
18
|
smallText1: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "14px", fontWeight: 400, lineHeight: "16px" }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "synapse-react-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -104,12 +104,8 @@
|
|
|
104
104
|
"@babel/preset-typescript": "^7.14.5",
|
|
105
105
|
"@babel/runtime": "^7.14.6",
|
|
106
106
|
"@babel/types": "^7.14.5",
|
|
107
|
-
"@
|
|
108
|
-
"@
|
|
109
|
-
"@rollup/plugin-image": "^2.0.5",
|
|
110
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
111
|
-
"@rollup/plugin-node-resolve": "^10.0.0",
|
|
112
|
-
"@svgr/rollup": "^5.4.0",
|
|
107
|
+
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
108
|
+
"@sage-bionetworks/esbuild-plugin-svgr": "^0.0.4",
|
|
113
109
|
"@testing-library/dom": "^8.1.0",
|
|
114
110
|
"@testing-library/jest-dom": "^5.14.1",
|
|
115
111
|
"@testing-library/react": "^12.0.0",
|
|
@@ -146,6 +142,10 @@
|
|
|
146
142
|
"core-js": "^3.1.4",
|
|
147
143
|
"enzyme": "^3.11.0",
|
|
148
144
|
"enzyme-adapter-react-16": "^1.15.2",
|
|
145
|
+
"esbuild": "^0.14.2",
|
|
146
|
+
"esbuild-plugin-globals": "^0.1.1",
|
|
147
|
+
"esbuild-plugin-node-polyfills": "^1.0.2",
|
|
148
|
+
"esbuild-sass-plugin": "^1.8.0",
|
|
149
149
|
"eslint-plugin-jest": "^24.3.6",
|
|
150
150
|
"eslint-plugin-jest-dom": "^3.6.5",
|
|
151
151
|
"eslint-plugin-react": "latest",
|
|
@@ -160,16 +160,10 @@
|
|
|
160
160
|
"prettier": "^2.1.2",
|
|
161
161
|
"react-select-event": "^5.3.0",
|
|
162
162
|
"react-styleguidist": "^11.1.2",
|
|
163
|
-
"rollup": "^2.39.0",
|
|
164
|
-
"rollup-plugin-analyzer": "^4.0.0",
|
|
165
|
-
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
166
|
-
"rollup-plugin-postprocess": "^1.0.2",
|
|
167
|
-
"rollup-plugin-scss": "^2.6.1",
|
|
168
|
-
"rollup-plugin-svg": "^2.0.0",
|
|
169
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
170
163
|
"sinon": "^7.2.2",
|
|
164
|
+
"timers-browserify": "^2.0.12",
|
|
171
165
|
"typescript": "4.4.3",
|
|
172
|
-
"yarn": "^1.22.
|
|
166
|
+
"yarn": "^1.22.17"
|
|
173
167
|
},
|
|
174
168
|
"jest": {
|
|
175
169
|
"moduleNameMapper": {
|
|
@@ -185,23 +179,23 @@
|
|
|
185
179
|
"build-gh": "yarn run build:docs",
|
|
186
180
|
"deploy": "gh-pages -d styleguide && gh-pages -d styleguide -o upstream",
|
|
187
181
|
"deploy:origin": "yarn install && yarn run predeploy && gh-pages -d styleguide && gh-pages -d styleguide -o origin",
|
|
188
|
-
"
|
|
189
|
-
"watch-css": "yarn run build-css && sass src --watch -I .",
|
|
182
|
+
"watch:css": "yarn run build:css && sass src --watch --load-path=node_modules",
|
|
190
183
|
"start-js": "react-scripts start",
|
|
191
|
-
"start": "npm-run-all -p watch
|
|
192
|
-
"start-deprecated-demo": "npm-run-all -p watch
|
|
184
|
+
"start": "npm-run-all -p watch:css serve:docs",
|
|
185
|
+
"start-deprecated-demo": "npm-run-all -p watch:css start-js",
|
|
193
186
|
"test": "react-scripts test --transformIgnorePatterns \"node_modules/(?!(lodash-es|jest*)/)\" , --env=jsdom --setupFilesAfterEnv ./src/setupTests.js --resetMocks false",
|
|
194
187
|
"test:coverage": "yarn test --coverage",
|
|
195
188
|
"test:noPrompt": "CI=true yarn test",
|
|
196
189
|
"eject": "react-scripts eject",
|
|
197
190
|
"type-check": "tsc --noEmit",
|
|
198
191
|
"type-check:watch": "yarn run type-check --watch",
|
|
199
|
-
"build": "yarn run build
|
|
192
|
+
"build": "yarn run build:css && yarn run build:js && yarn run build:copy-assets && yarn build:esbuild",
|
|
193
|
+
"build:css": "sass src/lib/style/main.scss src/lib/style/main.css --load-path=node_modules && sass src/demo/style:src/demo/style --load-path=node_modules",
|
|
200
194
|
"build:js": "tsc --p tsconfig.build.json",
|
|
201
195
|
"build:copy-assets": "cd src/lib && find . -name '*.scss' -o -name '*.css' -o -name '*.svg' | cpio -pdm ../../dist/",
|
|
202
|
-
"build:
|
|
196
|
+
"build:esbuild": "node esbuild.config.mjs && cp -r src/umd dist/",
|
|
203
197
|
"serve:docs": "DISABLE_ESLINT_PLUGIN=true FAST_REFRESH=false npx styleguidist server --open",
|
|
204
|
-
"build:docs": "yarn run build
|
|
198
|
+
"build:docs": "yarn run build:css && DISABLE_ESLINT_PLUGIN=true FAST_REFRESH=false npx styleguidist build",
|
|
205
199
|
"link-src": "yarn link && cd ./node_modules/react && yarn link && cd ../react-router && yarn link && cd ../react-router-dom && yarn link && cd ../../",
|
|
206
200
|
"unlink-src": "yarn unlink && cd ./node_modules/react && yarn unlink && cd ../react-router && yarn unlink && cd ../react-router-dom && yarn unlink && cd ../../"
|
|
207
201
|
},
|
|
@@ -213,8 +207,11 @@
|
|
|
213
207
|
"react": "16.13.1",
|
|
214
208
|
"react-dom": "16.13.1",
|
|
215
209
|
"@types/react": "16.9.34",
|
|
216
|
-
"**/@typescript-eslint/eslint-plugin": "^4.
|
|
217
|
-
"**/@typescript-eslint/parser": "^4.
|
|
210
|
+
"**/@typescript-eslint/eslint-plugin": "^4.28.3",
|
|
211
|
+
"**/@typescript-eslint/parser": "^4.28.3"
|
|
212
|
+
},
|
|
213
|
+
"browser": {
|
|
214
|
+
"timers": "timers-browserify"
|
|
218
215
|
},
|
|
219
216
|
"browserslist": {
|
|
220
217
|
"production": [
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProgrammaticOptionsTabs = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
-
var use_deep_compare_effect_1 = (0, tslib_1.__importDefault)(require("use-deep-compare-effect"));
|
|
7
|
-
var SynapseClient_1 = require("../../../utils/SynapseClient");
|
|
8
|
-
var react_bootstrap_1 = require("react-bootstrap");
|
|
9
|
-
var ModalHeader_1 = (0, tslib_1.__importDefault)(require("react-bootstrap/ModalHeader"));
|
|
10
|
-
var ProgrammaticOptionsTabs;
|
|
11
|
-
(function (ProgrammaticOptionsTabs) {
|
|
12
|
-
ProgrammaticOptionsTabs["COMMAND_LINE"] = "Command Line";
|
|
13
|
-
ProgrammaticOptionsTabs["R"] = "R";
|
|
14
|
-
ProgrammaticOptionsTabs["PYTHON"] = "Python";
|
|
15
|
-
})(ProgrammaticOptionsTabs = exports.ProgrammaticOptionsTabs || (exports.ProgrammaticOptionsTabs = {}));
|
|
16
|
-
function ProgrammaticOptions(_a) {
|
|
17
|
-
var _this = this;
|
|
18
|
-
var queryBundleRequest = _a.queryBundleRequest, queryResultBundle = _a.queryResultBundle, onHide = _a.onHide;
|
|
19
|
-
var _b = (0, react_1.useState)(''), generatedSql = _b[0], setGeneratedSql = _b[1];
|
|
20
|
-
var _c = (0, react_1.useState)(ProgrammaticOptionsTabs.COMMAND_LINE), currentTab = _c[0], setCurrentTab = _c[1];
|
|
21
|
-
(0, use_deep_compare_effect_1.default)(function () {
|
|
22
|
-
var getData = function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
|
23
|
-
var query, sql, _a, selectedFacets, columnModels, transformSqlWithFacetsRequest, res, indexOfFrom, selectStarTransformedSql, e_1;
|
|
24
|
-
return (0, tslib_1.__generator)(this, function (_b) {
|
|
25
|
-
switch (_b.label) {
|
|
26
|
-
case 0:
|
|
27
|
-
query = queryBundleRequest.query;
|
|
28
|
-
sql = query.sql, _a = query.selectedFacets, selectedFacets = _a === void 0 ? [] : _a;
|
|
29
|
-
columnModels = queryResultBundle.columnModels;
|
|
30
|
-
if (!columnModels) {
|
|
31
|
-
console.error('Column Models must be included to complete transform sql request');
|
|
32
|
-
}
|
|
33
|
-
transformSqlWithFacetsRequest = {
|
|
34
|
-
concreteType: 'org.sagebionetworks.repo.model.table.TransformSqlWithFacetsRequest',
|
|
35
|
-
sqlToTransform: sql,
|
|
36
|
-
selectedFacets: selectedFacets,
|
|
37
|
-
schema: columnModels,
|
|
38
|
-
};
|
|
39
|
-
_b.label = 1;
|
|
40
|
-
case 1:
|
|
41
|
-
_b.trys.push([1, 3, , 4]);
|
|
42
|
-
return [4 /*yield*/, (0, SynapseClient_1.getTransformSqlWithFacetsRequest)(transformSqlWithFacetsRequest)
|
|
43
|
-
// SWC-5686: The ID column is required by the client, and this column may not have been selected!
|
|
44
|
-
// Change the SQL to "SELECT * ..."
|
|
45
|
-
];
|
|
46
|
-
case 2:
|
|
47
|
-
res = _b.sent();
|
|
48
|
-
indexOfFrom = res.transformedSql.toUpperCase().indexOf('FROM SYN');
|
|
49
|
-
selectStarTransformedSql = "SELECT * " + res.transformedSql.substring(indexOfFrom);
|
|
50
|
-
setGeneratedSql(selectStarTransformedSql.replace(/"/g, '\\"'));
|
|
51
|
-
return [3 /*break*/, 4];
|
|
52
|
-
case 3:
|
|
53
|
-
e_1 = _b.sent();
|
|
54
|
-
console.error('Error on getTransformSqlWithFacetsRequest ', e_1);
|
|
55
|
-
return [3 /*break*/, 4];
|
|
56
|
-
case 4: return [2 /*return*/];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}); };
|
|
60
|
-
getData();
|
|
61
|
-
}, [queryBundleRequest, queryResultBundle]);
|
|
62
|
-
var installationInstructions = react_1.default.createElement("p", null,
|
|
63
|
-
"Installation instructions are available at our",
|
|
64
|
-
' ',
|
|
65
|
-
react_1.default.createElement("a", { className: "ProgrammaticOptions__docslink", href: "https://help.synapse.org/docs/Installing-Synapse-API-Clients.1985249668.html", target: "_blank", rel: "noopener noreferrer" }, "Synapse API Documentation Site"),
|
|
66
|
-
".");
|
|
67
|
-
return (react_1.default.createElement(react_bootstrap_1.Modal, { animation: false, show: true, onHide: function () { return onHide(); }, className: "bootstrap-4-backport ProgrammaticOptions", size: "lg" },
|
|
68
|
-
react_1.default.createElement(ModalHeader_1.default, { closeButton: true },
|
|
69
|
-
react_1.default.createElement(react_bootstrap_1.Modal.Title, null, "Download Programmatically")),
|
|
70
|
-
react_1.default.createElement(react_bootstrap_1.ModalBody, null,
|
|
71
|
-
react_1.default.createElement("div", { className: "Tabs" }, Object.keys(ProgrammaticOptionsTabs).map(function (keyName) {
|
|
72
|
-
return (react_1.default.createElement("div", { className: "Tab", role: "tab", key: keyName, onClick: function (e) {
|
|
73
|
-
e.stopPropagation();
|
|
74
|
-
setCurrentTab(ProgrammaticOptionsTabs[keyName]);
|
|
75
|
-
}, "aria-selected": ProgrammaticOptionsTabs[keyName] === currentTab }, ProgrammaticOptionsTabs[keyName]));
|
|
76
|
-
})),
|
|
77
|
-
react_1.default.createElement("div", { className: "TabContent" },
|
|
78
|
-
currentTab === ProgrammaticOptionsTabs.COMMAND_LINE && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
79
|
-
react_1.default.createElement("p", null, "This command line code will download Synapse files AND file annotations to your working directory."),
|
|
80
|
-
installationInstructions,
|
|
81
|
-
react_1.default.createElement("pre", null,
|
|
82
|
-
" synapse get -q \"",
|
|
83
|
-
generatedSql,
|
|
84
|
-
"\" "))),
|
|
85
|
-
currentTab === ProgrammaticOptionsTabs.R && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
86
|
-
react_1.default.createElement("p", null,
|
|
87
|
-
"This R code will download file annotations only. Use ",
|
|
88
|
-
react_1.default.createElement("a", { target: '_blank', rel: 'noopener noreferrer', href: 'https://help.synapse.org/docs/Get-Started-with-Downloading-Data.2004254837.html#GetStartedwithDownloadingData-DownloadingFiles' },
|
|
89
|
-
"synGet",
|
|
90
|
-
'()'),
|
|
91
|
-
" to loop over the list of Synapse IDs from the file annotations to download files."),
|
|
92
|
-
installationInstructions,
|
|
93
|
-
react_1.default.createElement("pre", null,
|
|
94
|
-
"query ",
|
|
95
|
-
'<-',
|
|
96
|
-
" synTableQuery(\"",
|
|
97
|
-
generatedSql,
|
|
98
|
-
"\")",
|
|
99
|
-
'\n',
|
|
100
|
-
"read.table(query$filepath, sep = \",\")"))),
|
|
101
|
-
currentTab === ProgrammaticOptionsTabs.PYTHON && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
102
|
-
react_1.default.createElement("p", null,
|
|
103
|
-
"This Python code will download file annotations only. Use ",
|
|
104
|
-
react_1.default.createElement("a", { target: '_blank', rel: 'noopener noreferrer', href: 'https://help.synapse.org/docs/Get-Started-with-Downloading-Data.2004254837.html#GetStartedwithDownloadingData-DownloadingFiles' }, "syn.get"),
|
|
105
|
-
" to loop over the list of Synapse IDs from the file annotations to download files."),
|
|
106
|
-
installationInstructions,
|
|
107
|
-
react_1.default.createElement("pre", null,
|
|
108
|
-
"query = syn.tableQuery(\"",
|
|
109
|
-
generatedSql,
|
|
110
|
-
"\")",
|
|
111
|
-
'\n',
|
|
112
|
-
"query.asDataFrame()"))))),
|
|
113
|
-
react_1.default.createElement(react_bootstrap_1.Modal.Footer, null,
|
|
114
|
-
react_1.default.createElement("div", { className: "ButtonContainer" },
|
|
115
|
-
react_1.default.createElement("div", { className: "Spacer" }),
|
|
116
|
-
react_1.default.createElement(react_bootstrap_1.Button, { variant: "primary", onClick: function () { return onHide(); } }, "Got it")))));
|
|
117
|
-
}
|
|
118
|
-
exports.default = ProgrammaticOptions;
|
|
119
|
-
//# sourceMappingURL=ProgrammaticOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammaticOptions.js","sourceRoot":"","sources":["../../../../src/lib/containers/table/table-top/ProgrammaticOptions.tsx"],"names":[],"mappings":";;;;AAAA,0DAAuC;AAMvC,iGAA0D;AAC1D,8DAA+E;AAC/E,mDAA0D;AAC1D,yFAAqD;AAErD,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,wDAA6B,CAAA;IAC7B,kCAAO,CAAA;IACP,4CAAiB,CAAA;AACnB,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC;AASD,SAAS,mBAAmB,CAAC,EAIF;IAJ3B,iBAwIC;QAvIC,kBAAkB,wBAAA,EAClB,iBAAiB,uBAAA,EACjB,MAAM,YAAA;IAEA,IAAA,KAAkC,IAAA,gBAAQ,EAAC,EAAE,CAAC,EAA7C,YAAY,QAAA,EAAE,eAAe,QAAgB,CAAA;IAC9C,IAAA,KAA8B,IAAA,g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D,qCAAG,MAAM,EAAC,QAAQ,EAC1E,GAAG,EAAC,qBAAqB,EACzB,IAAI,EAAC,gIAAgI,cAEnI;6GACF;oBACH,wBAAwB;oBACzB;;wBAC6B,YAAY;;wBAAI,IAAI;8CAE3C,CACL,CAAC,CACF,CACI;QACZ,8BAAC,uBAAK,CAAC,MAAM;YACX,uCAAK,SAAS,EAAC,iBAAiB;gBAC9B,uCAAK,SAAS,EAAC,QAAQ,GAAG;gBAC1B,8BAAC,wBAAM,IACL,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,cAAM,OAAA,MAAM,EAAE,EAAR,CAAQ,aAGhB,CACL,CACO,CACT,CACT,CAAA;AACH,CAAC;AAED,kBAAe,mBAAmB,CAAA"}
|
package/dist/rollup.index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.index.js","sourceRoot":"","sources":["../src/lib/rollup.index.ts"],"names":[],"mappings":";;;;AAAA,uCAAoC;AACpC,gFAA4C;AAC5C,0EAAsC;AACtC,kFAA8C;AAC9C,4FAAwD;AACxD,oFAAgD;AAChD,kFAA8C;AAC9C,gHAA4E;AAC5E,6BAA0B;AAC1B,kCAA0D;AA4E9B,iGA5EnB,wBAAgB,OA4EmB;AAAE,8FA5EnB,qBAAa,OA4EmB;AA3E3D,gFAA8E;AAC9E,sFAAoF;AACpF,oEAAkE;AAClE,oGAAgE;AAChE,wFAAoD;AACpD,sIAAkG;AAClG,gEAA8D;AAC9D,kEAAgE;AAChE,mFAAiF;AACjF,0FAAsD;AACtD,4FAA0F;AAC1F,wEAAsE;AACtE,kFAA8C;AAC9C,kEAAgE;AAChE,6GAAyE;AACzE,4FAAwD;AACxD,wFAAsF;AACtF,mHAA+E;AAC/E,6GAA2G;AAC3G,wEAAsE;AACtE,sHAAkF;AAClF,0DAA+E;AAC/E,0FAAsD;AACtD,8EAA0C;AAC1C,yDAI+B;AAC/B,qFAAmF;AACnF,sDAAwD;AAExD,IAAM,cAAc,GAAG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