synapse-react-client 2.0.62 → 2.0.63

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.
Files changed (40) hide show
  1. package/dist/containers/DirectDownload.js +1 -1
  2. package/dist/containers/DirectDownload.js.map +1 -1
  3. package/dist/containers/HelpPopover.d.ts +9 -0
  4. package/dist/containers/HelpPopover.js +21 -0
  5. package/dist/containers/HelpPopover.js.map +1 -0
  6. package/dist/containers/MarkdownPopover.js +3 -1
  7. package/dist/containers/MarkdownPopover.js.map +1 -1
  8. package/dist/containers/ProgrammaticInstructionsModal.d.ts +25 -0
  9. package/dist/containers/ProgrammaticInstructionsModal.js +77 -0
  10. package/dist/containers/ProgrammaticInstructionsModal.js.map +1 -0
  11. package/dist/containers/download_list_v2/DirectProgrammaticDownload.d.ts +7 -0
  12. package/dist/containers/download_list_v2/DirectProgrammaticDownload.js +23 -0
  13. package/dist/containers/download_list_v2/DirectProgrammaticDownload.js.map +1 -0
  14. package/dist/containers/download_list_v2/DownloadCartPage.js +37 -38
  15. package/dist/containers/download_list_v2/DownloadCartPage.js.map +1 -1
  16. package/dist/containers/download_list_v2/DownloadListTable.js +9 -5
  17. package/dist/containers/download_list_v2/DownloadListTable.js.map +1 -1
  18. package/dist/containers/entity_finder/details/view/DetailsView.js +2 -6
  19. package/dist/containers/entity_finder/details/view/DetailsView.js.map +1 -1
  20. package/dist/containers/table/table-top/DownloadOptions.js +2 -2
  21. package/dist/containers/table/table-top/DownloadOptions.js.map +1 -1
  22. package/dist/containers/table/table-top/{ProgrammaticOptions.d.ts → ProgrammaticTableDownload.d.ts} +0 -5
  23. package/dist/containers/table/table-top/ProgrammaticTableDownload.js +64 -0
  24. package/dist/containers/table/table-top/ProgrammaticTableDownload.js.map +1 -0
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +3 -3
  27. package/dist/index.js.map +1 -1
  28. package/dist/rollup.index.d.ts +6 -2
  29. package/dist/rollup.index.js +8 -2
  30. package/dist/rollup.index.js.map +1 -1
  31. package/dist/style/base/_icons.scss +4 -5
  32. package/dist/style/components/_download-cart-page.scss +7 -1
  33. package/dist/style/components/_download-list-v2.scss +5 -5
  34. package/dist/style/main.css +16 -8
  35. package/dist/umd/synapse-react-client.production.min.js +10 -10
  36. package/dist/umd/synapse-react-client.production.styles.css +16 -8
  37. package/dist/utils/typography/Typography.styles.js +2 -2
  38. package/package.json +1 -1
  39. package/dist/containers/table/table-top/ProgrammaticOptions.js +0 -119
  40. package/dist/containers/table/table-top/ProgrammaticOptions.js.map +0 -1
@@ -15803,11 +15803,10 @@ main * a.ignoreLink:not(.btn):visited.disabled:hover, main * a.ignoreLink:not(.b
15803
15803
  fill: #407ba0;
15804
15804
  }
15805
15805
 
15806
- .HelpButton {
15807
- color: #ababac;
15808
- margin: 5px;
15809
- height: 18px;
15810
- width: 18px;
15806
+ svg.HelpButton {
15807
+ color: #aeb5bc;
15808
+ cursor: pointer;
15809
+ font-size: 1.2em;
15811
15810
  }
15812
15811
 
15813
15812
  .modal-dialog-scrollable {
@@ -21343,7 +21342,7 @@ table.DownloadListTableV2 tbody tr:nth-of-type(odd) > .stickyColumn {
21343
21342
  table.DownloadListTableV2 tbody .stickyColumn .actionsContainer {
21344
21343
  color: #878e95;
21345
21344
  display: grid;
21346
- grid-template-columns: repeat(2, 45px);
21345
+ grid-template-columns: repeat(3, 40px);
21347
21346
  }
21348
21347
  table.DownloadListTableV2 tbody .stickyColumn .actionsContainer * {
21349
21348
  justify-self: center;
@@ -21351,9 +21350,12 @@ table.DownloadListTableV2 tbody .stickyColumn .actionsContainer * {
21351
21350
  table.DownloadListTableV2 tbody .stickyColumn .actionsContainer .downloadItem {
21352
21351
  grid-column: 1/span 1;
21353
21352
  }
21354
- table.DownloadListTableV2 tbody .stickyColumn .actionsContainer .removeItem {
21353
+ table.DownloadListTableV2 tbody .stickyColumn .actionsContainer .programmaticAccessItem {
21355
21354
  grid-column: 2/span 1;
21356
21355
  }
21356
+ table.DownloadListTableV2 tbody .stickyColumn .actionsContainer .removeItem {
21357
+ grid-column: 3/span 1;
21358
+ }
21357
21359
  table.DownloadListTableV2 thead > tr > th,
21358
21360
  table.DownloadListTableV2 thead:first-child > tr:first-child > th {
21359
21361
  padding: 10px 6px 5px 7px;
@@ -21618,7 +21620,7 @@ table.DownloadListTableV2 td {
21618
21620
  font-weight: bold;
21619
21621
  padding-right: 20px;
21620
21622
  }
21621
- .DownloadCartPage .subSectionOverview {
21623
+ .DownloadCartPage .subSectionOverviewContainer {
21622
21624
  padding: 30px 0px;
21623
21625
  background-color: #f9f9f9;
21624
21626
  }
@@ -21629,6 +21631,12 @@ table.DownloadListTableV2 td {
21629
21631
  .DownloadCartPage .DownloadListTabContent .subSectionOverview > * {
21630
21632
  padding: 0px 50px;
21631
21633
  }
21634
+ .DownloadCartPage .DownloadListTabContent .subSectionOverview > *:first-child {
21635
+ padding-left: 0px;
21636
+ }
21637
+ .DownloadCartPage .DownloadListTabContent .subSectionOverview > *:last-child {
21638
+ padding-right: 0px;
21639
+ }
21632
21640
  .DownloadCartPage .DownloadListTabContent .subSectionOverview > *:first-child {
21633
21641
  border-right: 1px solid #D0D4D9;
21634
21642
  }
@@ -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: "16px", fontWeight: 400, lineHeight: "24px" }),
15
- body2: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, basicFontStyle), { fontSize: "16px", fontWeight: 400, lineHeight: "24px", fontStyle: "italic" }),
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.0.62",
3
+ "version": "2.0.63",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -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,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