@teselagen/ui 0.7.36 → 0.8.1
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/index.cjs.js +1 -2
- package/index.es.js +1 -2
- package/package.json +1 -1
- package/src/AdvancedOptions.spec.js +26 -0
- package/src/AsyncValidateFieldSpinner/index.js +12 -0
- package/src/BlueprintError/index.js +14 -0
- package/src/BounceLoader/index.js +16 -0
- package/src/BounceLoader/style.css +45 -0
- package/src/CollapsibleCard/index.js +68 -0
- package/src/CollapsibleCard/style.css +23 -0
- package/src/DNALoader/index.js +20 -0
- package/src/DNALoader/style.css +251 -0
- package/src/DataTable/index.js +3220 -0
- package/src/DataTable/style.css +608 -0
- package/src/DataTable/utils/index.js +55 -0
- package/{queryParams.js → src/DataTable/utils/queryParams.js} +0 -1
- package/src/DialogFooter/index.js +86 -0
- package/src/DialogFooter/style.css +9 -0
- package/src/FormComponents/index.js +1266 -0
- package/src/FormComponents/style.css +275 -0
- package/src/FormComponents/utils.js +6 -0
- package/src/HotkeysDialog/index.js +79 -0
- package/src/HotkeysDialog/style.css +54 -0
- package/src/InfoHelper/index.js +78 -0
- package/src/InfoHelper/style.css +7 -0
- package/src/IntentText/index.js +18 -0
- package/src/Loading/index.js +70 -0
- package/src/Loading/style.css +4 -0
- package/src/MenuBar/index.js +423 -0
- package/src/MenuBar/style.css +45 -0
- package/src/PromptUnsavedChanges/index.js +38 -0
- package/src/ResizableDraggableDialog/index.js +141 -0
- package/src/ResizableDraggableDialog/style.css +42 -0
- package/src/ScrollToTop/index.js +72 -0
- package/src/TagSelect/index.js +69 -0
- package/src/TagSelect/style.css +13 -0
- package/src/TgHtmlSelect/index.js +20 -0
- package/src/TgSelect/index.js +537 -0
- package/src/TgSelect/style.css +61 -0
- package/src/TgSuggest/index.js +124 -0
- package/src/Timeline/index.js +15 -0
- package/src/enhancers/withDialog/index.js +196 -0
- package/src/index.js +87 -0
- package/src/showConfirmationDialog/index.js +148 -0
- package/src/style.css +265 -0
- package/{isBeingCalledExcessively.js → src/utils/isBeingCalledExcessively.js} +0 -2
- /package/{AdvancedOptions.js → src/AdvancedOptions.js} +0 -0
- /package/{AssignDefaultsModeContext.js → src/AssignDefaultsModeContext.js} +0 -0
- /package/{CellDragHandle.js → src/DataTable/CellDragHandle.js} +0 -0
- /package/{ColumnFilterMenu.js → src/DataTable/ColumnFilterMenu.js} +0 -0
- /package/{Columns.js → src/DataTable/Columns.js} +0 -0
- /package/{DisabledLoadingComponent.js → src/DataTable/DisabledLoadingComponent.js} +0 -0
- /package/{DisplayOptions.js → src/DataTable/DisplayOptions.js} +0 -0
- /package/{DropdownCell.js → src/DataTable/DropdownCell.js} +0 -0
- /package/{EditableCell.js → src/DataTable/EditableCell.js} +0 -0
- /package/{FilterAndSortMenu.js → src/DataTable/FilterAndSortMenu.js} +0 -0
- /package/{PagingTool.js → src/DataTable/PagingTool.js} +0 -0
- /package/{RenderCell.js → src/DataTable/RenderCell.js} +0 -0
- /package/{SearchBar.js → src/DataTable/SearchBar.js} +0 -0
- /package/{SortableColumns.js → src/DataTable/SortableColumns.js} +0 -0
- /package/{TableFormTrackerContext.js → src/DataTable/TableFormTrackerContext.js} +0 -0
- /package/{ThComponent.js → src/DataTable/ThComponent.js} +0 -0
- /package/{dataTableEnhancer.js → src/DataTable/dataTableEnhancer.js} +0 -0
- /package/{defaultFormatters.js → src/DataTable/defaultFormatters.js} +0 -0
- /package/{defaultValidators.js → src/DataTable/defaultValidators.js} +0 -0
- /package/{editCellHelper.js → src/DataTable/editCellHelper.js} +0 -0
- /package/{getCellVal.js → src/DataTable/getCellVal.js} +0 -0
- /package/{getVals.js → src/DataTable/getVals.js} +0 -0
- /package/{isTruthy.js → src/DataTable/isTruthy.js} +0 -0
- /package/{isValueEmpty.js → src/DataTable/isValueEmpty.js} +0 -0
- /package/{convertSchema.js → src/DataTable/utils/convertSchema.js} +0 -0
- /package/{formatPasteData.js → src/DataTable/utils/formatPasteData.js} +0 -0
- /package/{getAllRows.js → src/DataTable/utils/getAllRows.js} +0 -0
- /package/{getCellCopyText.js → src/DataTable/utils/getCellCopyText.js} +0 -0
- /package/{getCellInfo.js → src/DataTable/utils/getCellInfo.js} +0 -0
- /package/{getFieldPathToField.js → src/DataTable/utils/getFieldPathToField.js} +0 -0
- /package/{getIdOrCodeOrIndex.js → src/DataTable/utils/getIdOrCodeOrIndex.js} +0 -0
- /package/{getLastSelectedEntity.js → src/DataTable/utils/getLastSelectedEntity.js} +0 -0
- /package/{getNewEntToSelect.js → src/DataTable/utils/getNewEntToSelect.js} +0 -0
- /package/{getRowCopyText.js → src/DataTable/utils/getRowCopyText.js} +0 -0
- /package/{getTableConfigFromStorage.js → src/DataTable/utils/getTableConfigFromStorage.js} +0 -0
- /package/{handleCopyColumn.js → src/DataTable/utils/handleCopyColumn.js} +0 -0
- /package/{handleCopyHelper.js → src/DataTable/utils/handleCopyHelper.js} +0 -0
- /package/{handleCopyRows.js → src/DataTable/utils/handleCopyRows.js} +0 -0
- /package/{handleCopyTable.js → src/DataTable/utils/handleCopyTable.js} +0 -0
- /package/{isBottomRightCornerOfRectangle.js → src/DataTable/utils/isBottomRightCornerOfRectangle.js} +0 -0
- /package/{isEntityClean.js → src/DataTable/utils/isEntityClean.js} +0 -0
- /package/{primarySelectedValue.js → src/DataTable/utils/primarySelectedValue.js} +0 -0
- /package/{removeCleanRows.js → src/DataTable/utils/removeCleanRows.js} +0 -0
- /package/{rowClick.js → src/DataTable/utils/rowClick.js} +0 -0
- /package/{selection.js → src/DataTable/utils/selection.js} +0 -0
- /package/{useTableEntities.js → src/DataTable/utils/useTableEntities.js} +0 -0
- /package/{utils.js → src/DataTable/utils/utils.js} +0 -0
- /package/{withSelectedEntities.js → src/DataTable/utils/withSelectedEntities.js} +0 -0
- /package/{withTableParams.js → src/DataTable/utils/withTableParams.js} +0 -0
- /package/{validateTableWideErrors.js → src/DataTable/validateTableWideErrors.js} +0 -0
- /package/{viewColumn.js → src/DataTable/viewColumn.js} +0 -0
- /package/{DropdownButton.js → src/DropdownButton.js} +0 -0
- /package/{FillWindow.css → src/FillWindow.css} +0 -0
- /package/{FillWindow.js → src/FillWindow.js} +0 -0
- /package/{FormSeparator.js → src/FormComponents/FormSeparator.js} +0 -0
- /package/{LoadingDots.js → src/FormComponents/LoadingDots.js} +0 -0
- /package/{Uploader.js → src/FormComponents/Uploader.js} +0 -0
- /package/{getNewName.js → src/FormComponents/getNewName.js} +0 -0
- /package/{itemUpload.js → src/FormComponents/itemUpload.js} +0 -0
- /package/{sortify.js → src/FormComponents/sortify.js} +0 -0
- /package/{tryToMatchSchemas.js → src/FormComponents/tryToMatchSchemas.js} +0 -0
- /package/{MatchHeaders.js → src/MatchHeaders.js} +0 -0
- /package/{SimpleStepViz.js → src/SimpleStepViz.js} +0 -0
- /package/{Tag.js → src/Tag.js} +0 -0
- /package/{TimelineEvent.js → src/Timeline/TimelineEvent.js} +0 -0
- /package/{style.css → src/Timeline/style.css} +0 -0
- /package/{UploadCsvWizard.css → src/UploadCsvWizard.css} +0 -0
- /package/{UploadCsvWizard.js → src/UploadCsvWizard.js} +0 -0
- /package/{autoTooltip.js → src/autoTooltip.js} +0 -0
- /package/{constants.js → src/constants.js} +0 -0
- /package/{customIcons.js → src/customIcons.js} +0 -0
- /package/{tg_modalState.js → src/enhancers/withDialog/tg_modalState.js} +0 -0
- /package/{withField.js → src/enhancers/withField.js} +0 -0
- /package/{withFields.js → src/enhancers/withFields.js} +0 -0
- /package/{withLocalStorage.js → src/enhancers/withLocalStorage.js} +0 -0
- /package/{rerenderOnWindowResize.js → src/rerenderOnWindowResize.js} +0 -0
- /package/{showAppSpinner.js → src/showAppSpinner.js} +0 -0
- /package/{showDialogOnDocBody.js → src/showDialogOnDocBody.js} +0 -0
- /package/{throwFormError.js → src/throwFormError.js} +0 -0
- /package/{toastr.js → src/toastr.js} +0 -0
- /package/{typeToCommonType.js → src/typeToCommonType.js} +0 -0
- /package/{useDialog.js → src/useDialog.js} +0 -0
- /package/{adHoc.js → src/utils/adHoc.js} +0 -0
- /package/{basicHandleActionsWithFullState.js → src/utils/basicHandleActionsWithFullState.js} +0 -0
- /package/{browserUtils.js → src/utils/browserUtils.js} +0 -0
- /package/{combineReducersWithFullState.js → src/utils/combineReducersWithFullState.js} +0 -0
- /package/{commandControls.js → src/utils/commandControls.js} +0 -0
- /package/{commandUtils.js → src/utils/commandUtils.js} +0 -0
- /package/{determineBlackOrWhiteTextColor.js → src/utils/determineBlackOrWhiteTextColor.js} +0 -0
- /package/{getDayjsFormatter.js → src/utils/getDayjsFormatter.js} +0 -0
- /package/{getTextFromEl.js → src/utils/getTextFromEl.js} +0 -0
- /package/{handlerHelpers.js → src/utils/handlerHelpers.js} +0 -0
- /package/{index.js → src/utils/hooks/index.js} +0 -0
- /package/{useDeepEqualMemo.js → src/utils/hooks/useDeepEqualMemo.js} +0 -0
- /package/{useStableReference.js → src/utils/hooks/useStableReference.js} +0 -0
- /package/{hotkeyUtils.js → src/utils/hotkeyUtils.js} +0 -0
- /package/{menuUtils.js → src/utils/menuUtils.js} +0 -0
- /package/{popoverOverflowModifiers.js → src/utils/popoverOverflowModifiers.js} +0 -0
- /package/{pureNoFunc.js → src/utils/pureNoFunc.js} +0 -0
- /package/{renderOnDoc.js → src/utils/renderOnDoc.js} +0 -0
- /package/{showProgressToast.js → src/utils/showProgressToast.js} +0 -0
- /package/{tagUtils.js → src/utils/tagUtils.js} +0 -0
- /package/{tgFormValues.js → src/utils/tgFormValues.js} +0 -0
- /package/{useTraceUpdate.js → src/utils/useTraceUpdate.js} +0 -0
- /package/{withSelectTableRecords.js → src/utils/withSelectTableRecords.js} +0 -0
- /package/{withStore.js → src/utils/withStore.js} +0 -0
- /package/{wrapDialog.js → src/wrapDialog.js} +0 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
.tg-flex-form-content .bp3-form-content {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.error-popover {
|
|
6
|
+
margin: 5px;
|
|
7
|
+
color: red;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.te-file-upload-input {
|
|
11
|
+
min-width: 140px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ant-upload.ant-upload-drag {
|
|
15
|
+
border-width: 2px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tg-upload-inner {
|
|
19
|
+
margin: 10px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: center;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
}
|
|
25
|
+
.tg-dropzone.tg-dropzone-minimal {
|
|
26
|
+
height: 30px !important;
|
|
27
|
+
width: fit-content !important;
|
|
28
|
+
}
|
|
29
|
+
.tg-dropzone-minimal .tg-upload-inner {
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
margin: 4px;
|
|
32
|
+
}
|
|
33
|
+
.tg-dropzone-minimal .bp3-icon {
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
margin-right: 5px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tg-hide-drop-target .ant-upload.ant-upload-drag {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tg-dropzone {
|
|
43
|
+
width: 100% !important;
|
|
44
|
+
height: 100% !important;
|
|
45
|
+
border-width: 2px;
|
|
46
|
+
border-color: #d9d9d9;
|
|
47
|
+
border-style: dashed;
|
|
48
|
+
border-radius: 5px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
transition: all 1s;
|
|
51
|
+
}
|
|
52
|
+
.tg-dropzone:hover {
|
|
53
|
+
border-color: rgb(91, 157, 211);
|
|
54
|
+
}
|
|
55
|
+
.tg-dropzone-active {
|
|
56
|
+
border-color: rgb(91, 157, 211);
|
|
57
|
+
}
|
|
58
|
+
.tg-dropzone-accept {
|
|
59
|
+
border-color: rgb(123, 214, 150);
|
|
60
|
+
}
|
|
61
|
+
.tg-dropzone-reject {
|
|
62
|
+
border-color: rgb(91, 157, 211);
|
|
63
|
+
}
|
|
64
|
+
.tg-dropzone-disabled {
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
border-color: rgb(136, 133, 132) !important;
|
|
67
|
+
opacity: 0.8;
|
|
68
|
+
}
|
|
69
|
+
.tg-upload-file-list-item {
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: space-between;
|
|
72
|
+
margin: 2px;
|
|
73
|
+
border-radius: 3px;
|
|
74
|
+
padding: 2px;
|
|
75
|
+
}
|
|
76
|
+
.tg-upload-file-list-item:hover {
|
|
77
|
+
background: rgb(215, 238, 255);
|
|
78
|
+
}
|
|
79
|
+
.clickableIcon {
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
}
|
|
82
|
+
.clickableIcon:hover {
|
|
83
|
+
opacity: 0.7;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.tg-upload-file-list-item a {
|
|
87
|
+
display: block;
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tg-upload-file-list-item-overflow {
|
|
94
|
+
overflow: auto;
|
|
95
|
+
height: 150px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.tg-upload-file-list-counter {
|
|
99
|
+
position: absolute;
|
|
100
|
+
padding: 5px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.tg-spin {
|
|
104
|
+
animation-name: spin;
|
|
105
|
+
animation-duration: 1500ms;
|
|
106
|
+
animation-iteration-count: infinite;
|
|
107
|
+
animation-timing-function: linear;
|
|
108
|
+
}
|
|
109
|
+
@keyframes spin {
|
|
110
|
+
from {
|
|
111
|
+
transform: rotate(0deg);
|
|
112
|
+
}
|
|
113
|
+
to {
|
|
114
|
+
transform: rotate(360deg);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* .Select-multi-value-wrapper {
|
|
119
|
+
max-height: 100px;
|
|
120
|
+
overflow: scroll;
|
|
121
|
+
} */
|
|
122
|
+
|
|
123
|
+
/* dark styles */
|
|
124
|
+
.bp3-dark .Select.is-open > .Select-control,
|
|
125
|
+
.bp3-dark .Select-control,
|
|
126
|
+
.bp3-dark .Select.is-disabled > .Select-control {
|
|
127
|
+
background: rgba(16, 22, 26, 0.3);
|
|
128
|
+
box-shadow:
|
|
129
|
+
0 0 0 0 rgba(19, 124, 189, 0),
|
|
130
|
+
0 0 0 0 rgba(19, 124, 189, 0),
|
|
131
|
+
0 0 0 0 rgba(19, 124, 189, 0),
|
|
132
|
+
inset 0 0 0 1px rgba(16, 22, 26, 0.3),
|
|
133
|
+
inset 0 1px 1px rgba(16, 22, 26, 0.4);
|
|
134
|
+
background: rgba(16, 22, 26, 0.3);
|
|
135
|
+
color: #f5f8fa;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.bp3-dark .Select.is-focused:not(.is-open) > .Select-control {
|
|
139
|
+
background: rgba(16, 22, 26, 0.3);
|
|
140
|
+
color: #f5f8fa;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.bp3-dark .Select-placeholder,
|
|
144
|
+
.bp3-dark .Select--single > .Select-control .Select-value {
|
|
145
|
+
color: rgb(191, 204, 214, 0.5); /*#bfccd6*/
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.bp3-dark .Select-control {
|
|
149
|
+
border: none !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.bp3-dark
|
|
153
|
+
.Select.has-value.Select--single
|
|
154
|
+
> .Select-control
|
|
155
|
+
.Select-value
|
|
156
|
+
.Select-value-label,
|
|
157
|
+
.bp3-dark
|
|
158
|
+
.Select.has-value.is-pseudo-focused.Select--single
|
|
159
|
+
> .Select-control
|
|
160
|
+
.Select-value
|
|
161
|
+
.Select-value-label,
|
|
162
|
+
.bp3-dark .Select-option.is-selected {
|
|
163
|
+
color: #f5f8fa;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.bp3-dark .Select-option {
|
|
167
|
+
background: #30404d;
|
|
168
|
+
color: #f5f8fa;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.bp3-dark .Select-menu-outer {
|
|
172
|
+
border: 1px solid #26738cb0;
|
|
173
|
+
background: #202b33;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.bp3-dark .Select-option.is-focused {
|
|
177
|
+
background: rgba(0, 126, 255, 0.08);
|
|
178
|
+
color: #f5f8fa;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.bp3-dark .tg-upload-file-list-item:hover {
|
|
182
|
+
background: #26738cb0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.tg-tooltipError .bp3-popover-wrapper {
|
|
186
|
+
width: 100%;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.tg-no-fill-field {
|
|
190
|
+
display: table !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.item-upload-container {
|
|
194
|
+
padding: 5px;
|
|
195
|
+
width: 290px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.item-upload {
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: space-between;
|
|
201
|
+
align-items: center;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* .bp3-control {
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
} */
|
|
208
|
+
|
|
209
|
+
.bp3-form-group.bp3-inline .bp3-form-content {
|
|
210
|
+
flex: 1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.bp3-dark input {
|
|
214
|
+
color: #f5f8fa;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.tg-no-fill-field .bp3-checkbox {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.bp3-form-group .info-helper-wrapper:not(.info-helper-wrapper-noMarginTop) {
|
|
223
|
+
margin-top: -9px !important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.generateDefaultDot {
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
border-radius: 50%;
|
|
229
|
+
background: #ffca00;
|
|
230
|
+
box-shadow: 0px 0px 2px black;
|
|
231
|
+
height: 8px;
|
|
232
|
+
width: 8px;
|
|
233
|
+
}
|
|
234
|
+
.bp3-dark .generateDefaultDot {
|
|
235
|
+
background: yellow;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.bp3-label {
|
|
239
|
+
font-size: 13px;
|
|
240
|
+
font-weight: 600;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:not(.no-inline-label-margins).bp3-inline .bp3-label {
|
|
244
|
+
/* text-align: right; */
|
|
245
|
+
padding-right: 20px;
|
|
246
|
+
min-width: 100px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.bp3-dark .tg-color-picker-selector input {
|
|
250
|
+
color: #222222;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.form-separator {
|
|
254
|
+
p {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
width: 100%;
|
|
258
|
+
}
|
|
259
|
+
p::before {
|
|
260
|
+
content: "";
|
|
261
|
+
display: block;
|
|
262
|
+
width: 100%;
|
|
263
|
+
height: 1px;
|
|
264
|
+
background-color: #e1e4e8;
|
|
265
|
+
margin-right: 16px;
|
|
266
|
+
}
|
|
267
|
+
p::after {
|
|
268
|
+
content: "";
|
|
269
|
+
display: block;
|
|
270
|
+
width: 100%;
|
|
271
|
+
height: 1px;
|
|
272
|
+
background-color: #e1e4e8;
|
|
273
|
+
margin-left: 16px;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Dialog,
|
|
4
|
+
Tab,
|
|
5
|
+
Tabs,
|
|
6
|
+
KeyCombo,
|
|
7
|
+
Classes /*, Tooltip*/
|
|
8
|
+
} from "@blueprintjs/core";
|
|
9
|
+
// import { startCase } from "lodash-es";
|
|
10
|
+
import classNames from "classnames";
|
|
11
|
+
import {
|
|
12
|
+
getHotkeyProps /*, hotkeysById, comboToLabel*/
|
|
13
|
+
} from "../utils/hotkeyUtils";
|
|
14
|
+
|
|
15
|
+
import "./style.css";
|
|
16
|
+
|
|
17
|
+
export default function HotkeysDialog(props) {
|
|
18
|
+
if (!props.hotkeySets) {
|
|
19
|
+
console.error("Missing hotkeySets in HotkeysDialog");
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const sections = Object.keys(props.hotkeySets);
|
|
23
|
+
return (
|
|
24
|
+
<Dialog
|
|
25
|
+
isOpen={props.isOpen}
|
|
26
|
+
onClose={props.onClose}
|
|
27
|
+
title={props.dialogTitle || "Keyboard Shortcuts"}
|
|
28
|
+
>
|
|
29
|
+
<Tabs className="tg-hotkeys-dialog">
|
|
30
|
+
{sections.map(name => (
|
|
31
|
+
<Tab
|
|
32
|
+
key={name}
|
|
33
|
+
id={name}
|
|
34
|
+
title={sections.length === 1 ? undefined : name}
|
|
35
|
+
panel={
|
|
36
|
+
<div className="tg-table-wrapper">
|
|
37
|
+
<table
|
|
38
|
+
className={classNames(
|
|
39
|
+
Classes.HTML_TABLE,
|
|
40
|
+
Classes.HTML_TABLE_STRIPED,
|
|
41
|
+
Classes.HTML_TABLE_BORDERED
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
<thead>
|
|
45
|
+
<tr>
|
|
46
|
+
<th>Action</th>
|
|
47
|
+
<th>Shortcut</th>
|
|
48
|
+
</tr>
|
|
49
|
+
</thead>
|
|
50
|
+
<tbody>
|
|
51
|
+
{Object.keys(props.hotkeySets[name]).map(id => {
|
|
52
|
+
const def = getHotkeyProps(
|
|
53
|
+
props.hotkeySets[name][id],
|
|
54
|
+
id
|
|
55
|
+
);
|
|
56
|
+
return (
|
|
57
|
+
<tr key={id}>
|
|
58
|
+
<td>{def.label}</td>
|
|
59
|
+
<td>
|
|
60
|
+
<KeyCombo combo={def.combo} />
|
|
61
|
+
{/* <Tooltip
|
|
62
|
+
content={comboToLabel(def.combo, false)}
|
|
63
|
+
>
|
|
64
|
+
{comboToLabel(def.combo)}
|
|
65
|
+
</Tooltip> */}
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
);
|
|
69
|
+
})}
|
|
70
|
+
</tbody>
|
|
71
|
+
</table>
|
|
72
|
+
</div>
|
|
73
|
+
}
|
|
74
|
+
/>
|
|
75
|
+
))}
|
|
76
|
+
</Tabs>
|
|
77
|
+
</Dialog>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.tg-hotkeys-dialog .bp3-tab-list {
|
|
2
|
+
/* border-top: 1px solid #ddd; */
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
padding-left: 10px;
|
|
6
|
+
margin-top: 5px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tg-hotkeys-dialog table {
|
|
10
|
+
table-layout: fixed;
|
|
11
|
+
margin: 0 5px 5px;
|
|
12
|
+
width: calc(100% - 10px);
|
|
13
|
+
border-spacing: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tg-hotkeys-dialog .bp3-tab-panel {
|
|
17
|
+
margin-top: 5px;
|
|
18
|
+
padding: 10px;
|
|
19
|
+
}
|
|
20
|
+
.tg-hotkeys-dialog thead,
|
|
21
|
+
.tg-hotkeys-dialog tbody tr {
|
|
22
|
+
display: table;
|
|
23
|
+
width: 100%;
|
|
24
|
+
table-layout: fixed; /* even columns width , fix width of table too*/
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tg-hotkeys-dialog .tg-table-wrapper tbody {
|
|
28
|
+
display: block;
|
|
29
|
+
max-height: 55vh;
|
|
30
|
+
overflow-y: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tg-hotkeys-dialog th {
|
|
34
|
+
width: 50%;
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
color: black;
|
|
37
|
+
border-bottom: 3px solid #ddd;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.tg-hotkeys-dialog tr:nth-child(2n) td {
|
|
41
|
+
background-color: #f8f8f8;
|
|
42
|
+
}
|
|
43
|
+
.bp3-dark .tg-hotkeys-dialog tr:nth-child(2n) td {
|
|
44
|
+
background-color: #3e4b6d;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tg-hotkeys-dialog td,
|
|
48
|
+
.tg-hotkeys-dialog th {
|
|
49
|
+
padding: 8px 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tg-hotkeys-dialog td:first-child {
|
|
53
|
+
border-right: 1px solid lightgrey;
|
|
54
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Popover, Button, Tooltip, Icon } from "@blueprintjs/core";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import "./style.css";
|
|
5
|
+
import { popoverOverflowModifiers } from "..";
|
|
6
|
+
|
|
7
|
+
export default ({
|
|
8
|
+
className,
|
|
9
|
+
content,
|
|
10
|
+
children,
|
|
11
|
+
icon = "info-sign",
|
|
12
|
+
isPopover,
|
|
13
|
+
isButton,
|
|
14
|
+
size,
|
|
15
|
+
isInline,
|
|
16
|
+
clickable,
|
|
17
|
+
color,
|
|
18
|
+
noMarginTop,
|
|
19
|
+
popoverProps = {},
|
|
20
|
+
disabled,
|
|
21
|
+
displayToSide,
|
|
22
|
+
style,
|
|
23
|
+
...rest
|
|
24
|
+
}) => {
|
|
25
|
+
const IconToUse = isButton ? Button : Icon;
|
|
26
|
+
const iconProps = {
|
|
27
|
+
icon,
|
|
28
|
+
color,
|
|
29
|
+
disabled
|
|
30
|
+
};
|
|
31
|
+
if (!isButton) iconProps.iconSize = size;
|
|
32
|
+
|
|
33
|
+
const IconInner = <IconToUse {...iconProps} {...rest} />;
|
|
34
|
+
let toReturn;
|
|
35
|
+
const toolTipOrPopoverProps = {
|
|
36
|
+
disabled:
|
|
37
|
+
disabled ||
|
|
38
|
+
(!isPopover && window.Cypress && !window.Cypress.allowInfoHelperTooltips),
|
|
39
|
+
popoverClassName: "tg-info-helper-popover bp3-tooltip",
|
|
40
|
+
content: content || children,
|
|
41
|
+
modifiers: popoverOverflowModifiers,
|
|
42
|
+
...popoverProps
|
|
43
|
+
};
|
|
44
|
+
if (displayToSide) {
|
|
45
|
+
toReturn = (
|
|
46
|
+
<React.Fragment>
|
|
47
|
+
{IconInner}
|
|
48
|
+
<span style={{ paddingLeft: 5, fontStyle: "italic" }}>
|
|
49
|
+
{content || children}
|
|
50
|
+
</span>
|
|
51
|
+
</React.Fragment>
|
|
52
|
+
);
|
|
53
|
+
} else if (isPopover) {
|
|
54
|
+
toReturn = <Popover {...toolTipOrPopoverProps} target={IconInner} />;
|
|
55
|
+
} else {
|
|
56
|
+
toReturn = <Tooltip {...toolTipOrPopoverProps} target={IconInner} />;
|
|
57
|
+
}
|
|
58
|
+
const El = isInline ? "span" : "div";
|
|
59
|
+
return (
|
|
60
|
+
<El
|
|
61
|
+
style={{
|
|
62
|
+
...(clickable ? { cursor: "pointer" } : {}),
|
|
63
|
+
...(isInline ? {} : { display: "flex" }),
|
|
64
|
+
...style
|
|
65
|
+
}}
|
|
66
|
+
className={classnames(
|
|
67
|
+
"info-helper-wrapper",
|
|
68
|
+
{
|
|
69
|
+
"info-helper-wrapper-noMarginTop": noMarginTop,
|
|
70
|
+
"info-helper-clickable": isPopover
|
|
71
|
+
},
|
|
72
|
+
className
|
|
73
|
+
)}
|
|
74
|
+
>
|
|
75
|
+
{toReturn}
|
|
76
|
+
</El>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Classes } from "@blueprintjs/core";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
|
|
5
|
+
const intentToClass = {
|
|
6
|
+
danger: Classes.INTENT_DANGER,
|
|
7
|
+
warning: Classes.INTENT_WARNING,
|
|
8
|
+
success: Classes.INTENT_SUCCESS,
|
|
9
|
+
primary: Classes.INTENT_PRIMARY
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default function IntentText({ intent, text, children }) {
|
|
13
|
+
return (
|
|
14
|
+
<div className={classNames(Classes.FORM_GROUP, intentToClass[intent])}>
|
|
15
|
+
<div className={Classes.FORM_HELPER_TEXT}>{text || children}</div>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
|
2
|
+
import DNALoader from "../DNALoader";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
import { BounceLoader } from "../BounceLoader";
|
|
5
|
+
|
|
6
|
+
const Loading = ({
|
|
7
|
+
loading,
|
|
8
|
+
style: userStyle,
|
|
9
|
+
className,
|
|
10
|
+
containerStyle = {},
|
|
11
|
+
children,
|
|
12
|
+
displayInstantly = false,
|
|
13
|
+
bounce = false,
|
|
14
|
+
withTimeout,
|
|
15
|
+
inDialog,
|
|
16
|
+
centeredInPage
|
|
17
|
+
}) => {
|
|
18
|
+
const [longerThan200MS, setLongerThan200MS] = useState(false);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const timeoutId = setTimeout(() => {
|
|
22
|
+
setLongerThan200MS(true);
|
|
23
|
+
}, 200);
|
|
24
|
+
|
|
25
|
+
return () => {
|
|
26
|
+
clearTimeout(timeoutId);
|
|
27
|
+
};
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
const style = {
|
|
31
|
+
...userStyle,
|
|
32
|
+
...(inDialog && { minHeight: 120 })
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const LoaderComp = bounce || inDialog ? BounceLoader : DNALoader;
|
|
36
|
+
|
|
37
|
+
if (loading || !children) {
|
|
38
|
+
if (
|
|
39
|
+
!displayInstantly &&
|
|
40
|
+
!longerThan200MS &&
|
|
41
|
+
((!bounce && !inDialog) || withTimeout)
|
|
42
|
+
) {
|
|
43
|
+
return <div />;
|
|
44
|
+
}
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
className="tg-loader-container tg-flex justify-center align-center"
|
|
48
|
+
style={{
|
|
49
|
+
width: "100%",
|
|
50
|
+
...containerStyle,
|
|
51
|
+
...(centeredInPage && {
|
|
52
|
+
width: undefined,
|
|
53
|
+
zIndex: 20,
|
|
54
|
+
height: 10,
|
|
55
|
+
position: "fixed",
|
|
56
|
+
top: "50%",
|
|
57
|
+
left: "50%",
|
|
58
|
+
transform: "translate(-50%, 0)"
|
|
59
|
+
})
|
|
60
|
+
}}
|
|
61
|
+
>
|
|
62
|
+
<LoaderComp style={style} className={className} />
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
} else {
|
|
66
|
+
return children || null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default Loading;
|