@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.
Files changed (153) hide show
  1. package/index.cjs.js +1 -2
  2. package/index.es.js +1 -2
  3. package/package.json +1 -1
  4. package/src/AdvancedOptions.spec.js +26 -0
  5. package/src/AsyncValidateFieldSpinner/index.js +12 -0
  6. package/src/BlueprintError/index.js +14 -0
  7. package/src/BounceLoader/index.js +16 -0
  8. package/src/BounceLoader/style.css +45 -0
  9. package/src/CollapsibleCard/index.js +68 -0
  10. package/src/CollapsibleCard/style.css +23 -0
  11. package/src/DNALoader/index.js +20 -0
  12. package/src/DNALoader/style.css +251 -0
  13. package/src/DataTable/index.js +3220 -0
  14. package/src/DataTable/style.css +608 -0
  15. package/src/DataTable/utils/index.js +55 -0
  16. package/{queryParams.js → src/DataTable/utils/queryParams.js} +0 -1
  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 +87 -0
  44. package/src/showConfirmationDialog/index.js +148 -0
  45. package/src/style.css +265 -0
  46. package/{isBeingCalledExcessively.js → src/utils/isBeingCalledExcessively.js} +0 -2
  47. /package/{AdvancedOptions.js → src/AdvancedOptions.js} +0 -0
  48. /package/{AssignDefaultsModeContext.js → src/AssignDefaultsModeContext.js} +0 -0
  49. /package/{CellDragHandle.js → src/DataTable/CellDragHandle.js} +0 -0
  50. /package/{ColumnFilterMenu.js → src/DataTable/ColumnFilterMenu.js} +0 -0
  51. /package/{Columns.js → src/DataTable/Columns.js} +0 -0
  52. /package/{DisabledLoadingComponent.js → src/DataTable/DisabledLoadingComponent.js} +0 -0
  53. /package/{DisplayOptions.js → src/DataTable/DisplayOptions.js} +0 -0
  54. /package/{DropdownCell.js → src/DataTable/DropdownCell.js} +0 -0
  55. /package/{EditableCell.js → src/DataTable/EditableCell.js} +0 -0
  56. /package/{FilterAndSortMenu.js → src/DataTable/FilterAndSortMenu.js} +0 -0
  57. /package/{PagingTool.js → src/DataTable/PagingTool.js} +0 -0
  58. /package/{RenderCell.js → src/DataTable/RenderCell.js} +0 -0
  59. /package/{SearchBar.js → src/DataTable/SearchBar.js} +0 -0
  60. /package/{SortableColumns.js → src/DataTable/SortableColumns.js} +0 -0
  61. /package/{TableFormTrackerContext.js → src/DataTable/TableFormTrackerContext.js} +0 -0
  62. /package/{ThComponent.js → src/DataTable/ThComponent.js} +0 -0
  63. /package/{dataTableEnhancer.js → src/DataTable/dataTableEnhancer.js} +0 -0
  64. /package/{defaultFormatters.js → src/DataTable/defaultFormatters.js} +0 -0
  65. /package/{defaultValidators.js → src/DataTable/defaultValidators.js} +0 -0
  66. /package/{editCellHelper.js → src/DataTable/editCellHelper.js} +0 -0
  67. /package/{getCellVal.js → src/DataTable/getCellVal.js} +0 -0
  68. /package/{getVals.js → src/DataTable/getVals.js} +0 -0
  69. /package/{isTruthy.js → src/DataTable/isTruthy.js} +0 -0
  70. /package/{isValueEmpty.js → src/DataTable/isValueEmpty.js} +0 -0
  71. /package/{convertSchema.js → src/DataTable/utils/convertSchema.js} +0 -0
  72. /package/{formatPasteData.js → src/DataTable/utils/formatPasteData.js} +0 -0
  73. /package/{getAllRows.js → src/DataTable/utils/getAllRows.js} +0 -0
  74. /package/{getCellCopyText.js → src/DataTable/utils/getCellCopyText.js} +0 -0
  75. /package/{getCellInfo.js → src/DataTable/utils/getCellInfo.js} +0 -0
  76. /package/{getFieldPathToField.js → src/DataTable/utils/getFieldPathToField.js} +0 -0
  77. /package/{getIdOrCodeOrIndex.js → src/DataTable/utils/getIdOrCodeOrIndex.js} +0 -0
  78. /package/{getLastSelectedEntity.js → src/DataTable/utils/getLastSelectedEntity.js} +0 -0
  79. /package/{getNewEntToSelect.js → src/DataTable/utils/getNewEntToSelect.js} +0 -0
  80. /package/{getRowCopyText.js → src/DataTable/utils/getRowCopyText.js} +0 -0
  81. /package/{getTableConfigFromStorage.js → src/DataTable/utils/getTableConfigFromStorage.js} +0 -0
  82. /package/{handleCopyColumn.js → src/DataTable/utils/handleCopyColumn.js} +0 -0
  83. /package/{handleCopyHelper.js → src/DataTable/utils/handleCopyHelper.js} +0 -0
  84. /package/{handleCopyRows.js → src/DataTable/utils/handleCopyRows.js} +0 -0
  85. /package/{handleCopyTable.js → src/DataTable/utils/handleCopyTable.js} +0 -0
  86. /package/{isBottomRightCornerOfRectangle.js → src/DataTable/utils/isBottomRightCornerOfRectangle.js} +0 -0
  87. /package/{isEntityClean.js → src/DataTable/utils/isEntityClean.js} +0 -0
  88. /package/{primarySelectedValue.js → src/DataTable/utils/primarySelectedValue.js} +0 -0
  89. /package/{removeCleanRows.js → src/DataTable/utils/removeCleanRows.js} +0 -0
  90. /package/{rowClick.js → src/DataTable/utils/rowClick.js} +0 -0
  91. /package/{selection.js → src/DataTable/utils/selection.js} +0 -0
  92. /package/{useTableEntities.js → src/DataTable/utils/useTableEntities.js} +0 -0
  93. /package/{utils.js → src/DataTable/utils/utils.js} +0 -0
  94. /package/{withSelectedEntities.js → src/DataTable/utils/withSelectedEntities.js} +0 -0
  95. /package/{withTableParams.js → src/DataTable/utils/withTableParams.js} +0 -0
  96. /package/{validateTableWideErrors.js → src/DataTable/validateTableWideErrors.js} +0 -0
  97. /package/{viewColumn.js → src/DataTable/viewColumn.js} +0 -0
  98. /package/{DropdownButton.js → src/DropdownButton.js} +0 -0
  99. /package/{FillWindow.css → src/FillWindow.css} +0 -0
  100. /package/{FillWindow.js → src/FillWindow.js} +0 -0
  101. /package/{FormSeparator.js → src/FormComponents/FormSeparator.js} +0 -0
  102. /package/{LoadingDots.js → src/FormComponents/LoadingDots.js} +0 -0
  103. /package/{Uploader.js → src/FormComponents/Uploader.js} +0 -0
  104. /package/{getNewName.js → src/FormComponents/getNewName.js} +0 -0
  105. /package/{itemUpload.js → src/FormComponents/itemUpload.js} +0 -0
  106. /package/{sortify.js → src/FormComponents/sortify.js} +0 -0
  107. /package/{tryToMatchSchemas.js → src/FormComponents/tryToMatchSchemas.js} +0 -0
  108. /package/{MatchHeaders.js → src/MatchHeaders.js} +0 -0
  109. /package/{SimpleStepViz.js → src/SimpleStepViz.js} +0 -0
  110. /package/{Tag.js → src/Tag.js} +0 -0
  111. /package/{TimelineEvent.js → src/Timeline/TimelineEvent.js} +0 -0
  112. /package/{style.css → src/Timeline/style.css} +0 -0
  113. /package/{UploadCsvWizard.css → src/UploadCsvWizard.css} +0 -0
  114. /package/{UploadCsvWizard.js → src/UploadCsvWizard.js} +0 -0
  115. /package/{autoTooltip.js → src/autoTooltip.js} +0 -0
  116. /package/{constants.js → src/constants.js} +0 -0
  117. /package/{customIcons.js → src/customIcons.js} +0 -0
  118. /package/{tg_modalState.js → src/enhancers/withDialog/tg_modalState.js} +0 -0
  119. /package/{withField.js → src/enhancers/withField.js} +0 -0
  120. /package/{withFields.js → src/enhancers/withFields.js} +0 -0
  121. /package/{withLocalStorage.js → src/enhancers/withLocalStorage.js} +0 -0
  122. /package/{rerenderOnWindowResize.js → src/rerenderOnWindowResize.js} +0 -0
  123. /package/{showAppSpinner.js → src/showAppSpinner.js} +0 -0
  124. /package/{showDialogOnDocBody.js → src/showDialogOnDocBody.js} +0 -0
  125. /package/{throwFormError.js → src/throwFormError.js} +0 -0
  126. /package/{toastr.js → src/toastr.js} +0 -0
  127. /package/{typeToCommonType.js → src/typeToCommonType.js} +0 -0
  128. /package/{useDialog.js → src/useDialog.js} +0 -0
  129. /package/{adHoc.js → src/utils/adHoc.js} +0 -0
  130. /package/{basicHandleActionsWithFullState.js → src/utils/basicHandleActionsWithFullState.js} +0 -0
  131. /package/{browserUtils.js → src/utils/browserUtils.js} +0 -0
  132. /package/{combineReducersWithFullState.js → src/utils/combineReducersWithFullState.js} +0 -0
  133. /package/{commandControls.js → src/utils/commandControls.js} +0 -0
  134. /package/{commandUtils.js → src/utils/commandUtils.js} +0 -0
  135. /package/{determineBlackOrWhiteTextColor.js → src/utils/determineBlackOrWhiteTextColor.js} +0 -0
  136. /package/{getDayjsFormatter.js → src/utils/getDayjsFormatter.js} +0 -0
  137. /package/{getTextFromEl.js → src/utils/getTextFromEl.js} +0 -0
  138. /package/{handlerHelpers.js → src/utils/handlerHelpers.js} +0 -0
  139. /package/{index.js → src/utils/hooks/index.js} +0 -0
  140. /package/{useDeepEqualMemo.js → src/utils/hooks/useDeepEqualMemo.js} +0 -0
  141. /package/{useStableReference.js → src/utils/hooks/useStableReference.js} +0 -0
  142. /package/{hotkeyUtils.js → src/utils/hotkeyUtils.js} +0 -0
  143. /package/{menuUtils.js → src/utils/menuUtils.js} +0 -0
  144. /package/{popoverOverflowModifiers.js → src/utils/popoverOverflowModifiers.js} +0 -0
  145. /package/{pureNoFunc.js → src/utils/pureNoFunc.js} +0 -0
  146. /package/{renderOnDoc.js → src/utils/renderOnDoc.js} +0 -0
  147. /package/{showProgressToast.js → src/utils/showProgressToast.js} +0 -0
  148. /package/{tagUtils.js → src/utils/tagUtils.js} +0 -0
  149. /package/{tgFormValues.js → src/utils/tgFormValues.js} +0 -0
  150. /package/{useTraceUpdate.js → src/utils/useTraceUpdate.js} +0 -0
  151. /package/{withSelectTableRecords.js → src/utils/withSelectTableRecords.js} +0 -0
  152. /package/{withStore.js → src/utils/withStore.js} +0 -0
  153. /package/{wrapDialog.js → src/wrapDialog.js} +0 -0
package/src/style.css ADDED
@@ -0,0 +1,265 @@
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;
89
+ position: relative;
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;
131
+ }
132
+
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);
207
+ position: absolute;
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);
265
+ }
@@ -1,5 +1,4 @@
1
1
  const keyCount = {};
2
-
3
2
  // if this function is hit more than 20 times in a row in 2 seconds with the same uniqName then throw an error
4
3
  export const isBeingCalledExcessively = ({ uniqName }) => {
5
4
  if (process.env.NODE_ENV !== "development") {
@@ -30,4 +29,3 @@ export const isBeingCalledExcessively = ({ uniqName }) => {
30
29
  throw new Error(`isBeingCalledExcessively: ${uniqName}`);
31
30
  }
32
31
  };
33
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes