@teselagen/ui 0.7.33-beta.2 → 0.7.33-beta.4

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 (248) hide show
  1. package/package.json +1 -1
  2. package/src/AdvancedOptions.spec.js +26 -0
  3. package/src/AsyncValidateFieldSpinner/index.js +12 -0
  4. package/src/BlueprintError/index.js +14 -0
  5. package/src/BounceLoader/index.js +16 -0
  6. package/src/BounceLoader/style.css +45 -0
  7. package/src/CollapsibleCard/index.js +68 -0
  8. package/src/CollapsibleCard/style.css +23 -0
  9. package/src/DNALoader/index.js +20 -0
  10. package/src/DNALoader/style.css +251 -0
  11. package/src/DataTable/index.js +3209 -0
  12. package/src/DataTable/style.css +608 -0
  13. package/src/DataTable/utils/filterLocalEntitiesToHasura.test.js +515 -0
  14. package/src/DataTable/utils/index.js +55 -0
  15. package/src/DataTable/utils/simplifyHasuraWhere.test.js +73 -0
  16. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +219 -0
  17. package/src/DialogFooter/index.js +86 -0
  18. package/src/DialogFooter/style.css +9 -0
  19. package/src/FormComponents/index.js +1266 -0
  20. package/src/FormComponents/style.css +275 -0
  21. package/src/FormComponents/utils.js +6 -0
  22. package/src/HotkeysDialog/index.js +79 -0
  23. package/src/HotkeysDialog/style.css +54 -0
  24. package/src/InfoHelper/index.js +78 -0
  25. package/src/InfoHelper/style.css +7 -0
  26. package/src/IntentText/index.js +18 -0
  27. package/src/Loading/index.js +70 -0
  28. package/src/Loading/style.css +4 -0
  29. package/src/MenuBar/index.js +423 -0
  30. package/src/MenuBar/style.css +45 -0
  31. package/src/PromptUnsavedChanges/index.js +38 -0
  32. package/src/ResizableDraggableDialog/index.js +141 -0
  33. package/src/ResizableDraggableDialog/style.css +42 -0
  34. package/src/ScrollToTop/index.js +72 -0
  35. package/src/TagSelect/index.js +69 -0
  36. package/src/TagSelect/style.css +13 -0
  37. package/src/TgHtmlSelect/index.js +20 -0
  38. package/src/TgSelect/index.js +537 -0
  39. package/src/TgSelect/style.css +61 -0
  40. package/src/TgSuggest/index.js +124 -0
  41. package/src/Timeline/index.js +15 -0
  42. package/src/enhancers/withDialog/index.js +196 -0
  43. package/src/index.js +88 -1
  44. package/src/showConfirmationDialog/index.js +148 -0
  45. package/src/style.css +260 -24
  46. package/AdvancedOptions.js +0 -33
  47. package/AssignDefaultsModeContext.js +0 -22
  48. package/DropdownButton.js +0 -36
  49. package/FillWindow.css +0 -6
  50. package/FillWindow.js +0 -69
  51. package/MatchHeaders.js +0 -234
  52. package/SimpleStepViz.js +0 -22
  53. package/Tag.js +0 -112
  54. package/UploadCsvWizard.css +0 -4
  55. package/UploadCsvWizard.js +0 -719
  56. package/autoTooltip.js +0 -201
  57. package/constants.js +0 -1
  58. package/customIcons.js +0 -361
  59. package/rerenderOnWindowResize.js +0 -26
  60. package/showAppSpinner.js +0 -12
  61. package/showDialogOnDocBody.js +0 -33
  62. package/src/CellDragHandle.js +0 -132
  63. package/src/ColumnFilterMenu.js +0 -62
  64. package/src/Columns.js +0 -979
  65. package/src/DisabledLoadingComponent.js +0 -15
  66. package/src/DisplayOptions.js +0 -199
  67. package/src/DropdownCell.js +0 -61
  68. package/src/EditableCell.js +0 -44
  69. package/src/FilterAndSortMenu.js +0 -388
  70. package/src/FormSeparator.js +0 -9
  71. package/src/LoadingDots.js +0 -14
  72. package/src/PagingTool.js +0 -225
  73. package/src/RenderCell.js +0 -191
  74. package/src/SearchBar.js +0 -69
  75. package/src/SortableColumns.js +0 -100
  76. package/src/TableFormTrackerContext.js +0 -10
  77. package/src/ThComponent.js +0 -44
  78. package/src/TimelineEvent.js +0 -31
  79. package/src/Uploader.js +0 -1278
  80. package/src/adHoc.js +0 -10
  81. package/src/basicHandleActionsWithFullState.js +0 -14
  82. package/src/browserUtils.js +0 -3
  83. package/src/combineReducersWithFullState.js +0 -14
  84. package/src/commandControls.js +0 -82
  85. package/src/commandUtils.js +0 -112
  86. package/src/convertSchema.js +0 -69
  87. package/src/dataTableEnhancer.js +0 -41
  88. package/src/defaultFormatters.js +0 -32
  89. package/src/defaultValidators.js +0 -40
  90. package/src/determineBlackOrWhiteTextColor.js +0 -4
  91. package/src/editCellHelper.js +0 -44
  92. package/src/filterLocalEntitiesToHasura.js +0 -216
  93. package/src/formatPasteData.js +0 -16
  94. package/src/getAllRows.js +0 -11
  95. package/src/getCellCopyText.js +0 -7
  96. package/src/getCellInfo.js +0 -36
  97. package/src/getCellVal.js +0 -20
  98. package/src/getDayjsFormatter.js +0 -35
  99. package/src/getFieldPathToField.js +0 -7
  100. package/src/getIdOrCodeOrIndex.js +0 -9
  101. package/src/getLastSelectedEntity.js +0 -11
  102. package/src/getNewEntToSelect.js +0 -25
  103. package/src/getNewName.js +0 -31
  104. package/src/getRowCopyText.js +0 -28
  105. package/src/getTableConfigFromStorage.js +0 -5
  106. package/src/getTextFromEl.js +0 -28
  107. package/src/getVals.js +0 -8
  108. package/src/handleCopyColumn.js +0 -21
  109. package/src/handleCopyHelper.js +0 -15
  110. package/src/handleCopyRows.js +0 -23
  111. package/src/handleCopyTable.js +0 -16
  112. package/src/handlerHelpers.js +0 -24
  113. package/src/hotkeyUtils.js +0 -131
  114. package/src/initializeHasuraWhereAndFilter.js +0 -27
  115. package/src/isBeingCalledExcessively.js +0 -24
  116. package/src/isBottomRightCornerOfRectangle.js +0 -20
  117. package/src/isEntityClean.js +0 -15
  118. package/src/isTruthy.js +0 -12
  119. package/src/isValueEmpty.js +0 -3
  120. package/src/itemUpload.js +0 -84
  121. package/src/menuUtils.js +0 -433
  122. package/src/popoverOverflowModifiers.js +0 -11
  123. package/src/primarySelectedValue.js +0 -1
  124. package/src/pureNoFunc.js +0 -31
  125. package/src/queryParams.js +0 -336
  126. package/src/removeCleanRows.js +0 -22
  127. package/src/renderOnDoc.js +0 -32
  128. package/src/rowClick.js +0 -181
  129. package/src/selection.js +0 -8
  130. package/src/showProgressToast.js +0 -22
  131. package/src/simplifyHasuraWhere.js +0 -80
  132. package/src/sortify.js +0 -73
  133. package/tableQueryParamsToHasuraClauses.js +0 -113
  134. package/tagUtils.js +0 -45
  135. package/tgFormValues.js +0 -35
  136. package/tg_modalState.js +0 -47
  137. package/throwFormError.js +0 -16
  138. package/toastr.js +0 -148
  139. package/tryToMatchSchemas.js +0 -264
  140. package/typeToCommonType.js +0 -6
  141. package/useDeepEqualMemo.js +0 -15
  142. package/useDialog.js +0 -63
  143. package/useStableReference.js +0 -9
  144. package/useTableEntities.js +0 -38
  145. package/useTraceUpdate.js +0 -19
  146. package/utils.js +0 -37
  147. package/validateTableWideErrors.js +0 -160
  148. package/viewColumn.js +0 -97
  149. package/withField.js +0 -20
  150. package/withFields.js +0 -11
  151. package/withLocalStorage.js +0 -11
  152. package/withSelectTableRecords.js +0 -43
  153. package/withSelectedEntities.js +0 -65
  154. package/withStore.js +0 -10
  155. package/withTableParams.js +0 -288
  156. package/wrapDialog.js +0 -116
  157. /package/{CellDragHandle.js → src/DataTable/CellDragHandle.js} +0 -0
  158. /package/{ColumnFilterMenu.js → src/DataTable/ColumnFilterMenu.js} +0 -0
  159. /package/{Columns.js → src/DataTable/Columns.js} +0 -0
  160. /package/{DisabledLoadingComponent.js → src/DataTable/DisabledLoadingComponent.js} +0 -0
  161. /package/{DisplayOptions.js → src/DataTable/DisplayOptions.js} +0 -0
  162. /package/{DropdownCell.js → src/DataTable/DropdownCell.js} +0 -0
  163. /package/{EditableCell.js → src/DataTable/EditableCell.js} +0 -0
  164. /package/{FilterAndSortMenu.js → src/DataTable/FilterAndSortMenu.js} +0 -0
  165. /package/{PagingTool.js → src/DataTable/PagingTool.js} +0 -0
  166. /package/{RenderCell.js → src/DataTable/RenderCell.js} +0 -0
  167. /package/{SearchBar.js → src/DataTable/SearchBar.js} +0 -0
  168. /package/{SortableColumns.js → src/DataTable/SortableColumns.js} +0 -0
  169. /package/{TableFormTrackerContext.js → src/DataTable/TableFormTrackerContext.js} +0 -0
  170. /package/{ThComponent.js → src/DataTable/ThComponent.js} +0 -0
  171. /package/{dataTableEnhancer.js → src/DataTable/dataTableEnhancer.js} +0 -0
  172. /package/{defaultFormatters.js → src/DataTable/defaultFormatters.js} +0 -0
  173. /package/{defaultValidators.js → src/DataTable/defaultValidators.js} +0 -0
  174. /package/{editCellHelper.js → src/DataTable/editCellHelper.js} +0 -0
  175. /package/{getCellVal.js → src/DataTable/getCellVal.js} +0 -0
  176. /package/{getVals.js → src/DataTable/getVals.js} +0 -0
  177. /package/{isTruthy.js → src/DataTable/isTruthy.js} +0 -0
  178. /package/{isValueEmpty.js → src/DataTable/isValueEmpty.js} +0 -0
  179. /package/{convertSchema.js → src/DataTable/utils/convertSchema.js} +0 -0
  180. /package/{filterLocalEntitiesToHasura.js → src/DataTable/utils/filterLocalEntitiesToHasura.js} +0 -0
  181. /package/{formatPasteData.js → src/DataTable/utils/formatPasteData.js} +0 -0
  182. /package/{getAllRows.js → src/DataTable/utils/getAllRows.js} +0 -0
  183. /package/{getCellCopyText.js → src/DataTable/utils/getCellCopyText.js} +0 -0
  184. /package/{getCellInfo.js → src/DataTable/utils/getCellInfo.js} +0 -0
  185. /package/{getFieldPathToField.js → src/DataTable/utils/getFieldPathToField.js} +0 -0
  186. /package/{getIdOrCodeOrIndex.js → src/DataTable/utils/getIdOrCodeOrIndex.js} +0 -0
  187. /package/{getLastSelectedEntity.js → src/DataTable/utils/getLastSelectedEntity.js} +0 -0
  188. /package/{getNewEntToSelect.js → src/DataTable/utils/getNewEntToSelect.js} +0 -0
  189. /package/{getRowCopyText.js → src/DataTable/utils/getRowCopyText.js} +0 -0
  190. /package/{getTableConfigFromStorage.js → src/DataTable/utils/getTableConfigFromStorage.js} +0 -0
  191. /package/{handleCopyColumn.js → src/DataTable/utils/handleCopyColumn.js} +0 -0
  192. /package/{handleCopyHelper.js → src/DataTable/utils/handleCopyHelper.js} +0 -0
  193. /package/{handleCopyRows.js → src/DataTable/utils/handleCopyRows.js} +0 -0
  194. /package/{handleCopyTable.js → src/DataTable/utils/handleCopyTable.js} +0 -0
  195. /package/{initializeHasuraWhereAndFilter.js → src/DataTable/utils/initializeHasuraWhereAndFilter.js} +0 -0
  196. /package/{isBottomRightCornerOfRectangle.js → src/DataTable/utils/isBottomRightCornerOfRectangle.js} +0 -0
  197. /package/{isEntityClean.js → src/DataTable/utils/isEntityClean.js} +0 -0
  198. /package/{primarySelectedValue.js → src/DataTable/utils/primarySelectedValue.js} +0 -0
  199. /package/{queryParams.js → src/DataTable/utils/queryParams.js} +0 -0
  200. /package/{removeCleanRows.js → src/DataTable/utils/removeCleanRows.js} +0 -0
  201. /package/{rowClick.js → src/DataTable/utils/rowClick.js} +0 -0
  202. /package/{selection.js → src/DataTable/utils/selection.js} +0 -0
  203. /package/{simplifyHasuraWhere.js → src/DataTable/utils/simplifyHasuraWhere.js} +0 -0
  204. /package/src/{tableQueryParamsToHasuraClauses.js → DataTable/utils/tableQueryParamsToHasuraClauses.js} +0 -0
  205. /package/src/{useTableEntities.js → DataTable/utils/useTableEntities.js} +0 -0
  206. /package/src/{utils.js → DataTable/utils/utils.js} +0 -0
  207. /package/src/{withSelectedEntities.js → DataTable/utils/withSelectedEntities.js} +0 -0
  208. /package/src/{withTableParams.js → DataTable/utils/withTableParams.js} +0 -0
  209. /package/src/{validateTableWideErrors.js → DataTable/validateTableWideErrors.js} +0 -0
  210. /package/src/{viewColumn.js → DataTable/viewColumn.js} +0 -0
  211. /package/{FormSeparator.js → src/FormComponents/FormSeparator.js} +0 -0
  212. /package/{LoadingDots.js → src/FormComponents/LoadingDots.js} +0 -0
  213. /package/{Uploader.js → src/FormComponents/Uploader.js} +0 -0
  214. /package/{getNewName.js → src/FormComponents/getNewName.js} +0 -0
  215. /package/{itemUpload.js → src/FormComponents/itemUpload.js} +0 -0
  216. /package/{sortify.js → src/FormComponents/sortify.js} +0 -0
  217. /package/src/{tryToMatchSchemas.js → FormComponents/tryToMatchSchemas.js} +0 -0
  218. /package/{TimelineEvent.js → src/Timeline/TimelineEvent.js} +0 -0
  219. /package/{style.css → src/Timeline/style.css} +0 -0
  220. /package/src/{tg_modalState.js → enhancers/withDialog/tg_modalState.js} +0 -0
  221. /package/src/{withField.js → enhancers/withField.js} +0 -0
  222. /package/src/{withFields.js → enhancers/withFields.js} +0 -0
  223. /package/src/{withLocalStorage.js → enhancers/withLocalStorage.js} +0 -0
  224. /package/{adHoc.js → src/utils/adHoc.js} +0 -0
  225. /package/{basicHandleActionsWithFullState.js → src/utils/basicHandleActionsWithFullState.js} +0 -0
  226. /package/{browserUtils.js → src/utils/browserUtils.js} +0 -0
  227. /package/{combineReducersWithFullState.js → src/utils/combineReducersWithFullState.js} +0 -0
  228. /package/{commandControls.js → src/utils/commandControls.js} +0 -0
  229. /package/{commandUtils.js → src/utils/commandUtils.js} +0 -0
  230. /package/{determineBlackOrWhiteTextColor.js → src/utils/determineBlackOrWhiteTextColor.js} +0 -0
  231. /package/{getDayjsFormatter.js → src/utils/getDayjsFormatter.js} +0 -0
  232. /package/{getTextFromEl.js → src/utils/getTextFromEl.js} +0 -0
  233. /package/{handlerHelpers.js → src/utils/handlerHelpers.js} +0 -0
  234. /package/{index.js → src/utils/hooks/index.js} +0 -0
  235. /package/src/{useDeepEqualMemo.js → utils/hooks/useDeepEqualMemo.js} +0 -0
  236. /package/src/{useStableReference.js → utils/hooks/useStableReference.js} +0 -0
  237. /package/{hotkeyUtils.js → src/utils/hotkeyUtils.js} +0 -0
  238. /package/{isBeingCalledExcessively.js → src/utils/isBeingCalledExcessively.js} +0 -0
  239. /package/{menuUtils.js → src/utils/menuUtils.js} +0 -0
  240. /package/{popoverOverflowModifiers.js → src/utils/popoverOverflowModifiers.js} +0 -0
  241. /package/{pureNoFunc.js → src/utils/pureNoFunc.js} +0 -0
  242. /package/{renderOnDoc.js → src/utils/renderOnDoc.js} +0 -0
  243. /package/{showProgressToast.js → src/utils/showProgressToast.js} +0 -0
  244. /package/src/{tagUtils.js → utils/tagUtils.js} +0 -0
  245. /package/src/{tgFormValues.js → utils/tgFormValues.js} +0 -0
  246. /package/src/{useTraceUpdate.js → utils/useTraceUpdate.js} +0 -0
  247. /package/src/{withSelectTableRecords.js → utils/withSelectTableRecords.js} +0 -0
  248. /package/src/{withStore.js → utils/withStore.js} +0 -0
package/src/style.css CHANGED
@@ -1,29 +1,265 @@
1
- /* Copyright (C) 2018 TeselaGen Biotechnology, Inc. */
2
- .tg-timeline {
1
+ :root {
2
+ --base1: #ffffff;
3
+ --base2: #cdcdcd;
4
+ }
5
+
6
+ body.bp3-dark {
7
+ --base1: #393a3a;
8
+ --base2: #293742;
9
+ }
10
+
11
+ .bp3-dark .tg-card {
12
+ background: #394b59 !important;
13
+ }
14
+
15
+ .preserve-newline {
16
+ white-space: pre-line;
17
+ }
18
+
19
+ .bp3-dialog {
20
+ max-width: 100vw;
21
+ }
22
+
23
+ /* adding back in blueprint v2 default styling to all <h/> elements */
24
+ h1 {
25
+ line-height: 40px;
26
+ font-size: 36px;
27
+ }
28
+
29
+ h2 {
30
+ line-height: 32px;
31
+ font-size: 28px;
32
+ }
33
+
34
+ h3 {
35
+ line-height: 25px;
36
+ font-size: 22px;
37
+ }
38
+
39
+ h4 {
40
+ line-height: 21px;
41
+ font-size: 18px;
42
+ }
43
+
44
+ h5 {
45
+ line-height: 19px;
46
+ font-size: 16px;
47
+ }
48
+
49
+ h6 {
50
+ line-height: 16px;
51
+ font-size: 14px;
52
+ }
53
+
54
+ h1,
55
+ h2,
56
+ h3,
57
+ h4,
58
+ h5,
59
+ h6,
60
+ h1.bp3-heading,
61
+ h2.bp3-heading,
62
+ h3.bp3-heading,
63
+ h4.bp3-heading,
64
+ h5.bp3-heading,
65
+ h6.bp3-heading {
66
+ color: #182026;
67
+ font-weight: 300;
68
+ margin: 0 0 10px;
69
+ padding: 0;
70
+ line-height: normal;
71
+ }
72
+
73
+ .bp3-dark h1,
74
+ .bp3-dark h2,
75
+ .bp3-dark h3,
76
+ .bp3-dark h4,
77
+ .bp3-dark h5,
78
+ .bp3-dark h6 {
79
+ color: #f5f8fa;
80
+ }
81
+ .bp3-dark textarea {
82
+ background: #293742;
83
+ color: #f5f8fa;
84
+ }
85
+
86
+ /* bp3 fix https://github.com/palantir/blueprint/issues/2807 */
87
+ .bp3-popover-wrapper {
88
+ display: inline-block;
3
89
  position: relative;
4
- white-space: nowrap;
90
+ vertical-align: top;
91
+ }
92
+ /* this line is necessary otherwise the line above setting "position: relative;" caused nested long bp3 submenus to not appear correctly when using the fix below */
93
+ .bp3-submenu .bp3-popover-wrapper {
94
+ position: unset;
95
+ }
96
+ /* this fixes https://github.com/palantir/blueprint/issues/4791 but requires the "position: unset;" fix above */
97
+ .bp3-submenu > * > .bp3-menu {
98
+ max-height: 96vh;
99
+ overflow: auto;
100
+ }
101
+
102
+ /* bp3 fix https://github.com/palantir/blueprint/issues/2807 */
103
+ span.bp3-popover-target {
104
+ display: block;
105
+ }
106
+
107
+ .bp3-portal {
108
+ z-index: 100000;
109
+ }
110
+ .bp3-switch {
111
+ width: fit-content;
112
+ display: flex;
113
+ align-items: center;
114
+ }
115
+
116
+ .Select {
117
+ min-width: 170px;
118
+ }
119
+
120
+ /* override the default blueprint input focus to instead rely on an inset box shadow. This resolves any issues with overflow:hidden cutting off input box shadows */
121
+ .bp3-dark .bp3-input:focus,
122
+ .bp3-input:focus {
123
+ box-shadow: inset 0 0 3px 1px #137cbd;
124
+ }
125
+
126
+ .notClickable {
127
+ cursor: default !important;
128
+ }
129
+ .bp3-toast-container {
130
+ z-index: 100001;
5
131
  }
6
132
 
7
- .tg-timeline-line {
133
+ .link-button {
134
+ background: none !important;
135
+ border: none;
136
+ padding: 0 !important;
137
+ font-family: arial, sans-serif;
138
+ color: rgb(0, 151, 227);
139
+ /* text-decoration: underline; */
140
+ cursor: pointer;
141
+ }
142
+ .link-button:hover {
143
+ color: rgb(98, 198, 248);
144
+ text-decoration: underline;
145
+ }
146
+
147
+ .above-dialog {
148
+ z-index: 100001;
149
+ }
150
+
151
+ code {
152
+ display: block;
153
+ white-space: pre-wrap;
154
+ }
155
+
156
+ .bp3-toast.no-close-button [aria-label="Close"] {
157
+ display: none;
158
+ }
159
+
160
+ .isDataTitle .tippy-box[data-theme~="teselagen"] .tippy-arrow {
161
+ opacity: 0 !important;
162
+ }
163
+ .isDataTitle .tippy-box[data-theme~="teselagen"] {
164
+ background-color: #4f4a50f4 !important;
165
+ border-radius: 0 !important;
166
+ color: #f3f3f3 !important;
167
+ font-size: 11px !important;
168
+ white-space: pre-wrap;
169
+ padding: 0px 0px !important;
170
+ }
171
+
172
+ [data-tippy-root]:has(.tippy-box[data-theme~="teselagen"]) {
173
+ z-index: 100000 !important;
174
+ }
175
+
176
+ [data-tippy-root] .tippy-box[data-theme~="teselagen"] {
177
+ background-color: #394b59;
178
+ color: #f5f8fa;
179
+ padding: 4px 4px;
180
+ word-break: break-word;
181
+ }
182
+ [data-tippy-root] .tippy-box[data-theme~="teselagen"] .tippy-arrow {
183
+ color: #394b59;
184
+ }
185
+ .bp3-dark [data-tippy-root] .tippy-box[data-theme~="teselagen"] {
186
+ background-color: #e1e8ed;
187
+ color: #394b59;
188
+ }
189
+ .bp3-dark [data-tippy-root] .tippy-box[data-theme~="teselagen"] .tippy-arrow {
190
+ /* background-color: #e1e8ed; */
191
+ color: #e1e8ed;
192
+ }
193
+ .isCellEditable .rt-td {
194
+ position: relative;
195
+ }
196
+
197
+ .ReactTable .tg-cell-edit-boolean-checkbox {
198
+ margin-bottom: 0;
199
+ }
200
+
201
+ .cellDragHandle {
202
+ height: 8px;
203
+ width: 8px;
204
+ cursor: crosshair;
205
+ border: 1px solid rgb(255, 255, 255);
206
+ background-color: rgb(76, 107, 171);
8
207
  position: absolute;
9
- height: 90%;
10
- border-left: 2px solid #bfccd6;
11
- top: 3px;
12
- left: 5px;
13
- }
14
-
15
- .tg-timeline-event {
16
- margin-bottom: 15px;
17
- }
18
-
19
- .tg-timeline-circle {
20
- width: 12px;
21
- min-width: 12px;
22
- height: 12px;
23
- min-height: 12px;
24
- z-index: 1;
25
- margin-right: 10px;
26
- border-radius: 100px;
27
- background: #e1e8ed;
28
- border: 2px solid #137cbd;
208
+ bottom: -4px;
209
+ right: -4px;
210
+ }
211
+
212
+ /* make AnchorButton match Button */
213
+ .bp3-button {
214
+ font-family: Arial;
215
+ }
216
+
217
+ button {
218
+ transition: all 0.2s ease-in-out;
219
+ }
220
+
221
+ button:not(:disabled):active {
222
+ transform: translateY(1px);
223
+ }
224
+ .bp3-tabs.bp3-vertical > .bp3-tab-panel {
225
+ min-width: 0px;
226
+ }
227
+ .bp3-toast[class*="bp3-intent-"] .bp3-button.tg-clear-all-toasts {
228
+ border: 1px solid white !important;
229
+ }
230
+ .bp3-toast[class*="bp3-intent-"] .bp3-button.tg-clear-all-toasts:hover {
231
+ /* background: blue !important; */
232
+ /* background: unset !important; */
233
+ background-color: #137cbd !important;
234
+ }
235
+
236
+ /* .bp3-toast .tg-clear-all-toasts {
237
+ background: unset !important;
238
+ color: unset !important;
239
+ padding: unset !important;
240
+ margin: unset !important;
241
+ font-size: unset !important;
242
+ line-height: unset !important;
243
+ border: unset !important;
244
+ box-shadow: unset !important;
245
+ text-align: unset !important;
246
+ cursor: pointer !important;
247
+ } */
248
+
249
+ .bp3-dialog-header .bp3-heading {
250
+ width: 10px; /* tnw: this is a hack to prevent the dialog title from causing the dialog width to expand larger than the dialog content*/
251
+ }
252
+
253
+ /* to fix tooltip styling issue - https://github.com/palantir/blueprint/issues/3430 */
254
+ .bp3-popover[style*="transform-origin"][style*="bottom"] .bp3-popover-arrow {
255
+ transform: translate(0, -0.5px);
256
+ }
257
+ .bp3-popover[style*="transform-origin"][style*="left"] .bp3-popover-arrow {
258
+ transform: translate(0.5px, 0);
259
+ }
260
+ .bp3-popover[style*="transform-origin"][style*="top"] .bp3-popover-arrow {
261
+ transform: translate(0, 0.5px);
262
+ }
263
+ .bp3-popover[style*="transform-origin"][style*="right"] .bp3-popover-arrow {
264
+ transform: translate(-0.5px, 0);
29
265
  }
@@ -1,33 +0,0 @@
1
- import React, { useState } from "react";
2
- import { Icon } from "@blueprintjs/core";
3
-
4
- export default function AdvancedOptions({
5
- children,
6
- content,
7
- label,
8
- style,
9
- isOpenByDefault
10
- }) {
11
- const [isOpen, setOpen] = useState(isOpenByDefault);
12
- if (!(content || children)) {
13
- return null;
14
- }
15
- return (
16
- <div style={{ marginTop: 5, ...style }}>
17
- <div
18
- onClick={() => {
19
- setOpen(!isOpen);
20
- }}
21
- style={{ cursor: "pointer", display: "flex", alignItems: "flex-end" }}
22
- className="tg-toggle-advanced-options"
23
- >
24
- {label || "Advanced"}{" "}
25
- <Icon
26
- icon={isOpen ? "caret-down" : "caret-right"}
27
- style={{ marginLeft: 5 }}
28
- ></Icon>
29
- </div>
30
- {isOpen && <div style={{ marginTop: 10 }}>{content || children}</div>}
31
- </div>
32
- );
33
- }
@@ -1,22 +0,0 @@
1
- import React from "react";
2
-
3
- export const AssignDefaultsModeContext = React.createContext({
4
- inAssignDefaultsMode: false,
5
- // eslint-disable-next-line @typescript-eslint/no-empty-function
6
- setAssignDefaultsMode: () => {}
7
- });
8
-
9
- export const workflowDefaultParamsObj = {
10
- taskNumber: undefined,
11
- workflowDefinitionName: undefined,
12
- workflowDefinitionId: undefined,
13
- workflowRunName: undefined,
14
- workflowRunId: undefined,
15
- toolName: undefined,
16
- workflowToolTitle: undefined,
17
- workflowToolDefinitionId: undefined,
18
- workflowTaskCode: undefined
19
- };
20
- export const WorkflowDefaultParamsContext = React.createContext(
21
- workflowDefaultParamsObj
22
- );
package/DropdownButton.js DELETED
@@ -1,36 +0,0 @@
1
- /* Copyright (C) 2018 TeselaGen Biotechnology, Inc. */
2
-
3
- import React from "react";
4
- import { Button, Popover, Position } from "@blueprintjs/core";
5
- import classnames from "classnames";
6
- import popoverOverflowModifiers from "./utils/popoverOverflowModifiers";
7
-
8
- function DropdownButton({
9
- disabled,
10
- menu,
11
- noRightIcon,
12
- popoverProps,
13
- className,
14
- ...rest
15
- }) {
16
- return (
17
- <Popover
18
- minimal
19
- modifiers={popoverOverflowModifiers}
20
- disabled={disabled}
21
- autoFocus={false}
22
- content={menu}
23
- position={Position.BOTTOM_LEFT}
24
- {...popoverProps}
25
- >
26
- <Button
27
- disabled={disabled}
28
- className={classnames(className, "dropdown-button")}
29
- rightIcon={noRightIcon ? undefined : "caret-down"}
30
- {...rest}
31
- />
32
- </Popover>
33
- );
34
- }
35
-
36
- export default DropdownButton;
package/FillWindow.css DELETED
@@ -1,6 +0,0 @@
1
- .tg-fillWindow {
2
- background: white;
3
- }
4
- .bp3-dark .tg-fillWindow {
5
- background: #293742;
6
- }
package/FillWindow.js DELETED
@@ -1,69 +0,0 @@
1
- import React from "react";
2
- import { createPortal } from "react-dom";
3
- import { isFunction } from "lodash-es";
4
- import rerenderOnWindowResize from "./rerenderOnWindowResize";
5
- import "./FillWindow.css";
6
-
7
- // use like:
8
- // <FillWindow>
9
- // {({ width, height }) => {
10
- // return <div style={{width, height}}></div>
11
- // }
12
- // <FillWindow/>
13
-
14
- export default class FillWindow extends React.Component {
15
- constructor(props) {
16
- super(props);
17
- rerenderOnWindowResize(this);
18
- }
19
- // this is left here for posterity. componentDidMount didn't work before commit ee1853a5ae2e6e27b720dd225650cc2154076db5 "fixing rerenderOnWindowResize to bind this keyword correctly"
20
- // componentDidMount(){
21
- // this.setState({thomas: "realCool"})
22
- // }
23
-
24
- render() {
25
- const w = window,
26
- d = document,
27
- e = d.documentElement,
28
- g = d.getElementsByTagName("body")[0],
29
- width = w.innerWidth || e.clientWidth || g.clientWidth,
30
- height = w.innerHeight || e.clientHeight || g.clientHeight;
31
- const windowDimensions = {
32
- width,
33
- height
34
- };
35
- const {
36
- containerStyle = {},
37
- style,
38
- styleOverrides,
39
- className,
40
- asPortal,
41
- ...rest
42
- } = this.props;
43
- if (this.props.disabled) return this.props.children(windowDimensions);
44
- const inner = (
45
- <div
46
- className={
47
- "tg-fillWindow " + (asPortal ? "bp3-portal " : "") + (className || "")
48
- }
49
- style={{
50
- ...style,
51
- width,
52
- height,
53
- position: "fixed",
54
- top: 0,
55
- left: 0,
56
- ...containerStyle,
57
- ...styleOverrides
58
- }}
59
- {...rest}
60
- >
61
- {this.props.children && isFunction(this.props.children)
62
- ? this.props.children(windowDimensions)
63
- : this.props.children}
64
- </div>
65
- );
66
- if (asPortal) return createPortal(inner, window.document.body);
67
- return inner;
68
- }
69
- }
package/MatchHeaders.js DELETED
@@ -1,234 +0,0 @@
1
- import React, { useMemo } from "react";
2
- import { Callout, Card, Intent } from "@blueprintjs/core";
3
- import immer, { setAutoFreeze } from "immer";
4
- import { flatMap, forEach } from "lodash-es";
5
- import { ReactSelectField } from "./FormComponents";
6
- import showConfirmationDialog from "./showConfirmationDialog";
7
- import { startCase } from "lodash-es";
8
- import { typeToCommonType } from "./typeToCommonType";
9
- import { camelCase } from "lodash-es";
10
- import { change } from "redux-form";
11
- import { useDispatch } from "react-redux";
12
-
13
- setAutoFreeze(false);
14
- export const MatchHeaders = ({
15
- csvValidationIssue,
16
- datatableFormName,
17
- datatableFormNames: _datatableFormNames,
18
- doAllFilesHaveSameHeaders,
19
- fileIndex,
20
- filesWIssues,
21
- ignoredHeadersMsg,
22
- matchedHeaders,
23
- onMultiFileUploadSubmit,
24
- reduxFormEntitiesArray,
25
- searchResults,
26
- setFilesWIssues,
27
- userSchema
28
- }) => {
29
- const datatableFormNames = _datatableFormNames || [datatableFormName];
30
- const dispatch = useDispatch();
31
- const flippedMatchedHeaders = useMemo(() => {
32
- const _flippedMatchedHeaders = {};
33
- forEach(matchedHeaders, (v, k) => {
34
- if (v) _flippedMatchedHeaders[v] = k;
35
- });
36
- return _flippedMatchedHeaders;
37
- }, [matchedHeaders]);
38
-
39
- return (
40
- <div style={{ maxWidth: 500 }}>
41
- {!onMultiFileUploadSubmit && (
42
- <Callout style={{ width: "fit-content" }} intent="warning">
43
- {csvValidationIssue}
44
- </Callout>
45
- )}
46
- {!onMultiFileUploadSubmit && ignoredHeadersMsg && (
47
- <Callout style={{ width: "fit-content" }} intent="warning">
48
- {ignoredHeadersMsg}
49
- </Callout>
50
- )}
51
- <br />
52
- <tr
53
- style={{
54
- display: "flex",
55
- minHeight: 50,
56
- alignItems: "center",
57
- justifyContent: "space-between"
58
- }}
59
- >
60
- <td
61
- style={{
62
- width: 200,
63
- marginLeft: 20,
64
- display: "flex",
65
- fontWeight: "bold"
66
- }}
67
- >
68
- Accepted Headers
69
- </td>
70
- <td
71
- style={{
72
- width: 200,
73
- marginLeft: 20,
74
- display: "flex",
75
- fontWeight: "bold"
76
- }}
77
- >
78
- Your Headers
79
- </td>
80
- <td
81
- style={{
82
- fontWeight: "bold",
83
- marginLeft: 30
84
- }}
85
- >
86
- Data Preview
87
- </td>
88
- </tr>
89
- {searchResults.map(({ path, displayName, type }, i) => {
90
- const userMatchedHeader = matchedHeaders[path];
91
- const opts = flatMap(userSchema.fields, ({ path: pathInner }) => {
92
- if (
93
- pathInner !== userMatchedHeader &&
94
- flippedMatchedHeaders[pathInner]
95
- ) {
96
- return [];
97
- }
98
- return {
99
- value: pathInner,
100
- label: pathInner
101
- };
102
- }).sort((a, b) => {
103
- const ra = searchResults[i].matches
104
- .map(m => m.item.path)
105
- .indexOf(a.value);
106
- const rb = searchResults[i].matches
107
- .map(m => m.item.path)
108
- .indexOf(b.value);
109
- if (!ra) return -1;
110
- if (!rb) return 1;
111
- return rb - ra;
112
- });
113
- return (
114
- <Card style={{ padding: 2 }} key={`field-${i}`}>
115
- <table>
116
- <tbody>
117
- <tr
118
- style={{
119
- display: "flex",
120
- minHeight: 50,
121
- alignItems: "center",
122
- justifyContent: "space-between"
123
- }}
124
- >
125
- <td
126
- style={{
127
- width: 200,
128
- display: "flex"
129
- }}
130
- >
131
- <div
132
- style={{
133
- paddingTop: 2,
134
- marginLeft: 15,
135
- fontSize: 15
136
- }}
137
- >
138
- <span
139
- data-tip={`Column Type: ${
140
- typeToCommonType[type || "string"] || type
141
- }`}
142
- >
143
- {displayName || startCase(camelCase(path))}
144
- </span>
145
- </div>
146
- </td>
147
- <td style={{ width: 200 }}>
148
- <ReactSelectField
149
- noMarginBottom
150
- tooltipError
151
- beforeOnChange={async () => {
152
- const clearEntities = () => {
153
- datatableFormNames.forEach(name => {
154
- dispatch(change(name, "reduxFormEntities", null));
155
- });
156
- };
157
- if (reduxFormEntitiesArray.some(r => r?.isDirty)) {
158
- //when the column mapping changes, update the column in reduxFormEntities (if reduxFormEntities exists)
159
- const doAction = await showConfirmationDialog({
160
- text: "Are you sure you want to edit the columm mapping? This will clear any changes you've already made to the table data",
161
- intent: Intent.DANGER,
162
- confirmButtonText: "Yes",
163
- cancelButtonText: "No"
164
- // canEscapeKeyCancel: true //this is false by default
165
- });
166
- if (doAction) {
167
- clearEntities();
168
- } else {
169
- return { stopEarly: true };
170
- }
171
- } else {
172
- clearEntities();
173
- return { stopEarly: false };
174
- }
175
- }}
176
- onChange={val => {
177
- setFilesWIssues(
178
- immer(filesWIssues, files => {
179
- files.forEach((f, i) => {
180
- const isCurrentFile = fileIndex === i;
181
- if (isCurrentFile || doAllFilesHaveSameHeaders) {
182
- f.matchedHeaders[path] = val;
183
- }
184
- });
185
- })
186
- );
187
- }}
188
- name={path}
189
- // isRequired={!allowEmpty && defaultValue === undefined}
190
- defaultValue={userMatchedHeader}
191
- options={opts}
192
- />
193
- </td>
194
- <td
195
- style={{
196
- marginTop: 10,
197
- marginBottom: 10,
198
- marginLeft: 20,
199
- fontSize: 10 /* color: Colors.RED1 */
200
- }}
201
- >
202
- {userMatchedHeader &&
203
- [
204
- // { [userMatchedHeader]: "Preview:" },
205
- ...(userSchema.userData?.slice(0, 3) || [])
206
- // { [userMatchedHeader]: "..." }
207
- ].map((row, i) => {
208
- return (
209
- <div
210
- style={{
211
- maxWidth: 70,
212
- overflow: "hidden",
213
- textOverflow: "ellipsis",
214
- whiteSpace: "nowrap"
215
- }}
216
- key={`userMatchedHeader-${i}`}
217
- >
218
- {row?.[userMatchedHeader] || ""}
219
- </div>
220
- );
221
- })}
222
- {/* {!allowEmpty &&
223
- defaultValue === undefined &&
224
- "(Required)"} */}
225
- </td>
226
- </tr>
227
- </tbody>
228
- </table>
229
- </Card>
230
- );
231
- })}
232
- </div>
233
- );
234
- };