@teselagen/ui 0.7.35 → 0.7.36

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 (160) hide show
  1. package/isBeingCalledExcessively.js +1 -0
  2. package/package.json +1 -1
  3. package/DataTable/utils/filterLocalEntitiesToHasura.d.ts +0 -5
  4. package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +0 -2
  5. package/DataTable/utils/tableQueryParamsToHasuraClauses.d.ts +0 -26
  6. package/src/AdvancedOptions.js +0 -33
  7. package/src/AdvancedOptions.spec.js +0 -26
  8. package/src/AssignDefaultsModeContext.js +0 -22
  9. package/src/AsyncValidateFieldSpinner/index.js +0 -12
  10. package/src/BlueprintError/index.js +0 -14
  11. package/src/BounceLoader/index.js +0 -16
  12. package/src/BounceLoader/style.css +0 -45
  13. package/src/CollapsibleCard/index.js +0 -68
  14. package/src/CollapsibleCard/style.css +0 -23
  15. package/src/DNALoader/index.js +0 -20
  16. package/src/DNALoader/style.css +0 -251
  17. package/src/DataTable/CellDragHandle.js +0 -132
  18. package/src/DataTable/ColumnFilterMenu.js +0 -62
  19. package/src/DataTable/Columns.js +0 -979
  20. package/src/DataTable/DisabledLoadingComponent.js +0 -15
  21. package/src/DataTable/DisplayOptions.js +0 -199
  22. package/src/DataTable/DropdownCell.js +0 -61
  23. package/src/DataTable/EditableCell.js +0 -44
  24. package/src/DataTable/FilterAndSortMenu.js +0 -388
  25. package/src/DataTable/PagingTool.js +0 -225
  26. package/src/DataTable/RenderCell.js +0 -191
  27. package/src/DataTable/SearchBar.js +0 -69
  28. package/src/DataTable/SortableColumns.js +0 -100
  29. package/src/DataTable/TableFormTrackerContext.js +0 -10
  30. package/src/DataTable/ThComponent.js +0 -44
  31. package/src/DataTable/dataTableEnhancer.js +0 -41
  32. package/src/DataTable/defaultFormatters.js +0 -32
  33. package/src/DataTable/defaultValidators.js +0 -40
  34. package/src/DataTable/editCellHelper.js +0 -44
  35. package/src/DataTable/getCellVal.js +0 -20
  36. package/src/DataTable/getVals.js +0 -8
  37. package/src/DataTable/index.js +0 -3209
  38. package/src/DataTable/isTruthy.js +0 -12
  39. package/src/DataTable/isValueEmpty.js +0 -3
  40. package/src/DataTable/style.css +0 -608
  41. package/src/DataTable/utils/convertSchema.js +0 -69
  42. package/src/DataTable/utils/filterLocalEntitiesToHasura.js +0 -236
  43. package/src/DataTable/utils/filterLocalEntitiesToHasura.test.js +0 -587
  44. package/src/DataTable/utils/formatPasteData.js +0 -16
  45. package/src/DataTable/utils/getAllRows.js +0 -11
  46. package/src/DataTable/utils/getCellCopyText.js +0 -7
  47. package/src/DataTable/utils/getCellInfo.js +0 -36
  48. package/src/DataTable/utils/getFieldPathToField.js +0 -7
  49. package/src/DataTable/utils/getIdOrCodeOrIndex.js +0 -9
  50. package/src/DataTable/utils/getLastSelectedEntity.js +0 -11
  51. package/src/DataTable/utils/getNewEntToSelect.js +0 -25
  52. package/src/DataTable/utils/getRowCopyText.js +0 -28
  53. package/src/DataTable/utils/getTableConfigFromStorage.js +0 -5
  54. package/src/DataTable/utils/handleCopyColumn.js +0 -21
  55. package/src/DataTable/utils/handleCopyHelper.js +0 -15
  56. package/src/DataTable/utils/handleCopyRows.js +0 -23
  57. package/src/DataTable/utils/handleCopyTable.js +0 -16
  58. package/src/DataTable/utils/index.js +0 -55
  59. package/src/DataTable/utils/initializeHasuraWhereAndFilter.js +0 -26
  60. package/src/DataTable/utils/isBottomRightCornerOfRectangle.js +0 -20
  61. package/src/DataTable/utils/isEntityClean.js +0 -15
  62. package/src/DataTable/utils/primarySelectedValue.js +0 -1
  63. package/src/DataTable/utils/queryParams.js +0 -350
  64. package/src/DataTable/utils/removeCleanRows.js +0 -22
  65. package/src/DataTable/utils/rowClick.js +0 -181
  66. package/src/DataTable/utils/selection.js +0 -8
  67. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.js +0 -253
  68. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +0 -206
  69. package/src/DataTable/utils/useTableEntities.js +0 -38
  70. package/src/DataTable/utils/utils.js +0 -37
  71. package/src/DataTable/utils/withSelectedEntities.js +0 -65
  72. package/src/DataTable/utils/withTableParams.js +0 -288
  73. package/src/DataTable/validateTableWideErrors.js +0 -160
  74. package/src/DataTable/viewColumn.js +0 -97
  75. package/src/DialogFooter/index.js +0 -86
  76. package/src/DialogFooter/style.css +0 -9
  77. package/src/DropdownButton.js +0 -36
  78. package/src/FillWindow.css +0 -6
  79. package/src/FillWindow.js +0 -69
  80. package/src/FormComponents/FormSeparator.js +0 -9
  81. package/src/FormComponents/LoadingDots.js +0 -14
  82. package/src/FormComponents/Uploader.js +0 -1278
  83. package/src/FormComponents/getNewName.js +0 -31
  84. package/src/FormComponents/index.js +0 -1266
  85. package/src/FormComponents/itemUpload.js +0 -84
  86. package/src/FormComponents/sortify.js +0 -73
  87. package/src/FormComponents/style.css +0 -275
  88. package/src/FormComponents/tryToMatchSchemas.js +0 -264
  89. package/src/FormComponents/utils.js +0 -6
  90. package/src/HotkeysDialog/index.js +0 -79
  91. package/src/HotkeysDialog/style.css +0 -54
  92. package/src/InfoHelper/index.js +0 -78
  93. package/src/InfoHelper/style.css +0 -7
  94. package/src/IntentText/index.js +0 -18
  95. package/src/Loading/index.js +0 -70
  96. package/src/Loading/style.css +0 -4
  97. package/src/MatchHeaders.js +0 -234
  98. package/src/MenuBar/index.js +0 -423
  99. package/src/MenuBar/style.css +0 -45
  100. package/src/PromptUnsavedChanges/index.js +0 -38
  101. package/src/ResizableDraggableDialog/index.js +0 -141
  102. package/src/ResizableDraggableDialog/style.css +0 -42
  103. package/src/ScrollToTop/index.js +0 -72
  104. package/src/SimpleStepViz.js +0 -22
  105. package/src/Tag.js +0 -112
  106. package/src/TagSelect/index.js +0 -69
  107. package/src/TagSelect/style.css +0 -13
  108. package/src/TgHtmlSelect/index.js +0 -20
  109. package/src/TgSelect/index.js +0 -537
  110. package/src/TgSelect/style.css +0 -61
  111. package/src/TgSuggest/index.js +0 -124
  112. package/src/Timeline/TimelineEvent.js +0 -31
  113. package/src/Timeline/index.js +0 -15
  114. package/src/Timeline/style.css +0 -29
  115. package/src/UploadCsvWizard.css +0 -4
  116. package/src/UploadCsvWizard.js +0 -719
  117. package/src/autoTooltip.js +0 -201
  118. package/src/constants.js +0 -1
  119. package/src/customIcons.js +0 -361
  120. package/src/enhancers/withDialog/index.js +0 -196
  121. package/src/enhancers/withDialog/tg_modalState.js +0 -47
  122. package/src/enhancers/withField.js +0 -20
  123. package/src/enhancers/withFields.js +0 -11
  124. package/src/enhancers/withLocalStorage.js +0 -11
  125. package/src/index.js +0 -88
  126. package/src/rerenderOnWindowResize.js +0 -26
  127. package/src/showAppSpinner.js +0 -12
  128. package/src/showConfirmationDialog/index.js +0 -148
  129. package/src/showDialogOnDocBody.js +0 -33
  130. package/src/style.css +0 -265
  131. package/src/throwFormError.js +0 -16
  132. package/src/toastr.js +0 -148
  133. package/src/typeToCommonType.js +0 -6
  134. package/src/useDialog.js +0 -63
  135. package/src/utils/adHoc.js +0 -10
  136. package/src/utils/basicHandleActionsWithFullState.js +0 -14
  137. package/src/utils/browserUtils.js +0 -3
  138. package/src/utils/combineReducersWithFullState.js +0 -14
  139. package/src/utils/commandControls.js +0 -82
  140. package/src/utils/commandUtils.js +0 -112
  141. package/src/utils/determineBlackOrWhiteTextColor.js +0 -4
  142. package/src/utils/getDayjsFormatter.js +0 -35
  143. package/src/utils/getTextFromEl.js +0 -28
  144. package/src/utils/handlerHelpers.js +0 -24
  145. package/src/utils/hooks/index.js +0 -1
  146. package/src/utils/hooks/useDeepEqualMemo.js +0 -15
  147. package/src/utils/hooks/useStableReference.js +0 -9
  148. package/src/utils/hotkeyUtils.js +0 -131
  149. package/src/utils/isBeingCalledExcessively.js +0 -24
  150. package/src/utils/menuUtils.js +0 -433
  151. package/src/utils/popoverOverflowModifiers.js +0 -11
  152. package/src/utils/pureNoFunc.js +0 -31
  153. package/src/utils/renderOnDoc.js +0 -32
  154. package/src/utils/showProgressToast.js +0 -22
  155. package/src/utils/tagUtils.js +0 -45
  156. package/src/utils/tgFormValues.js +0 -35
  157. package/src/utils/useTraceUpdate.js +0 -19
  158. package/src/utils/withSelectTableRecords.js +0 -43
  159. package/src/utils/withStore.js +0 -10
  160. package/src/wrapDialog.js +0 -116
@@ -1,72 +0,0 @@
1
- import React, { useEffect, useState } from "react";
2
- import { Button } from "@blueprintjs/core";
3
- import { Transition } from "react-transition-group";
4
-
5
- const duration = 300;
6
-
7
- const defaultStyle = {
8
- transition: `opacity ${duration}ms ease-in-out`,
9
- opacity: 0
10
- };
11
-
12
- const transitionStyles = {
13
- entering: { opacity: 1 },
14
- entered: { opacity: 1 },
15
- exiting: { opacity: 0 },
16
- exited: { opacity: 0 }
17
- };
18
-
19
- function ScrollToTop({
20
- showAt = 150,
21
- scrollContainer = document.scrollingElement
22
- }) {
23
- const [shouldShow, setShouldShow] = useState(
24
- scrollContainer.scrollTop >= showAt
25
- );
26
-
27
- useEffect(() => {
28
- const scrollListener = () => {
29
- const newShouldShow = scrollContainer.scrollTop >= showAt;
30
- if (newShouldShow !== shouldShow) setShouldShow(newShouldShow);
31
- };
32
- const listenerContainer =
33
- scrollContainer === document.scrollingElement ? window : scrollContainer;
34
- listenerContainer.addEventListener("scroll", scrollListener);
35
- // Specify how to clean up after this effect:
36
- return function cleanup() {
37
- listenerContainer.removeEventListener("scroll", scrollListener);
38
- };
39
- }, [shouldShow, showAt, scrollContainer]);
40
-
41
- const scrollToTop = () => {
42
- const c = scrollContainer.scrollTop;
43
- if (c > 0) {
44
- window.requestAnimationFrame(scrollToTop);
45
- scrollContainer.scrollTo(0, c - c / 8);
46
- }
47
- };
48
-
49
- return (
50
- <Transition in={shouldShow} timeout={duration}>
51
- {state =>
52
- state === "exited" ? null : (
53
- <div style={{ position: "fixed", bottom: 25, right: 25, zIndex: 10 }}>
54
- <Button
55
- style={{
56
- borderRadius: "50%",
57
- ...defaultStyle,
58
- ...transitionStyles[state]
59
- }}
60
- intent="primary"
61
- icon="arrow-up"
62
- large
63
- onClick={scrollToTop}
64
- />
65
- </div>
66
- )
67
- }
68
- </Transition>
69
- );
70
- }
71
-
72
- export default ScrollToTop;
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import { Icon } from "@blueprintjs/core";
3
- import classNames from "classnames";
4
-
5
- export default ({ steps, ...rest }) => (
6
- <div style={{ display: "flex", justifyContent: "center" }}>
7
- <ul className="bp3-breadcrumbs" {...rest}>
8
- {steps.map(({ completed, active, text }, i) => (
9
- <li key={i}>
10
- <div
11
- className={classNames("bp3-breadcrumb", {
12
- "bp3-breadcrumb-current": active
13
- })}
14
- >
15
- <Icon icon={completed ? "tick-circle" : undefined} />
16
- {text}
17
- </div>
18
- </li>
19
- ))}
20
- </ul>
21
- </div>
22
- );
package/src/Tag.js DELETED
@@ -1,112 +0,0 @@
1
- /* Copyright (C) 2018 TeselaGen Biotechnology, Inc. */
2
- import React from "react";
3
- import classNames from "classnames";
4
- import "./style.css";
5
- import { Tooltip } from "@blueprintjs/core";
6
- import { getTagColorStyle } from "./utils/tagUtils";
7
- import popoverOverflowModifiers from "./utils/popoverOverflowModifiers";
8
-
9
- function Tag({
10
- name,
11
- color,
12
- tooltip,
13
- selected,
14
- secondarySelected,
15
- hasSelection,
16
- onDelete,
17
- onClick,
18
- clickable,
19
- doNotFillWidth,
20
- style = {}
21
- }) {
22
- const sharedStyles = {
23
- ...getTagColorStyle(color).style,
24
- padding: "2px 5px"
25
- };
26
- const deleteButton = onDelete && (
27
- <span
28
- style={{
29
- ...sharedStyles,
30
- cursor: "pointer",
31
- borderTopRightRadius: 3,
32
- borderBottomRightRadius: 3
33
- }}
34
- className="delete-tag-button"
35
- onClick={onDelete}
36
- >
37
- &#10005;
38
- </span>
39
- );
40
-
41
- let nameToUse = name;
42
- const nameTooLong = name.length > 40;
43
- if (nameTooLong) {
44
- nameToUse = name.slice(0, 40) + "...";
45
- }
46
- if (tooltip || nameTooLong) {
47
- const content = (
48
- <div>
49
- {nameTooLong ? (
50
- <div>
51
- {name}
52
- {tooltip ? ":" : null}
53
- </div>
54
- ) : null}
55
- {tooltip ? <div>{tooltip}</div> : null}
56
- </div>
57
- );
58
- nameToUse = (
59
- <Tooltip content={content} modifiers={popoverOverflowModifiers}>
60
- {nameToUse}
61
- </Tooltip>
62
- );
63
- }
64
-
65
- const tag = (
66
- <React.Fragment>
67
- <span
68
- onClick={onClick}
69
- className="tg-tag"
70
- style={{
71
- ...sharedStyles,
72
- // will stop tags from growing tall
73
- marginBottom: "auto",
74
- borderRadius: 3,
75
- whiteSpace: "nowrap",
76
- wordBreak: "normal",
77
- overflow: "hidden",
78
- textOverflow: "ellipsis",
79
-
80
- ...(onClick && { cursor: "pointer" }),
81
- ...(onDelete && {
82
- borderTopRightRadius: 0,
83
- borderBottomRightRadius: 0
84
- }),
85
- ...(doNotFillWidth && { width: "fit-content" }),
86
- ...(clickable && { cursor: "pointer" }),
87
- ...style
88
- }}
89
- >
90
- {nameToUse}
91
- </span>
92
- {deleteButton}
93
- </React.Fragment>
94
- );
95
-
96
- if (hasSelection) {
97
- return (
98
- <div
99
- className={classNames("tag-selection", {
100
- selected,
101
- "secondary-selected": secondarySelected
102
- })}
103
- >
104
- {tag}
105
- </div>
106
- );
107
- } else {
108
- return tag;
109
- }
110
- }
111
-
112
- export default Tag;
@@ -1,69 +0,0 @@
1
- import { Button, InputGroup, Popover } from "@blueprintjs/core";
2
- import React from "react";
3
-
4
- import Tag from "../Tag";
5
- import "./style.css";
6
- import { useState } from "react";
7
- import { itemListPredicate } from "../TgSelect";
8
-
9
- export default ({ value = {}, options = [], onChange }) => {
10
- const [open, setOpen] = useState(false);
11
- const [searchTerm, setSearchTerm] = useState("");
12
-
13
- const filteredOptions = itemListPredicate(searchTerm, options, false);
14
-
15
- return (
16
- <Popover
17
- isOpen={open}
18
- onInteraction={setOpen}
19
- content={
20
- <div className="tag-select-popover">
21
- <InputGroup
22
- rightElement={
23
- // clear button
24
- searchTerm ? (
25
- <Button
26
- icon="cross"
27
- minimal
28
- onClick={() => setSearchTerm("")}
29
- />
30
- ) : null
31
- }
32
- type="text"
33
- placeholder="Search..."
34
- autoFocus
35
- value={searchTerm}
36
- onChange={e => setSearchTerm(e.target.value)}
37
- />
38
- <div className="tag-select-popover-inner">
39
- {filteredOptions.map(option => {
40
- return (
41
- <Tag
42
- key={option.name}
43
- onClick={() => {
44
- onChange(option);
45
- setOpen(false);
46
- }}
47
- clickable
48
- style={{ maxWidth: 150 }}
49
- {...convertTagVals(option)}
50
- doNotFillWidth
51
- ></Tag>
52
- );
53
- })}
54
- </div>
55
- </div>
56
- }
57
- >
58
- <Tag style={{ maxWidth: 150 }} clickable {...convertTagVals(value)}></Tag>
59
- </Popover>
60
- );
61
- };
62
-
63
- function convertTagVals(tagVals) {
64
- return {
65
- ...tagVals,
66
-
67
- name: tagVals.name || tagVals.label
68
- };
69
- }
@@ -1,13 +0,0 @@
1
- .tag-select-popover {
2
- padding: 10px;
3
- }
4
-
5
- .tag-select-popover-inner {
6
- max-height: 150px;
7
- overflow: auto;
8
- display: grid;
9
- padding-top: 10px;
10
- grid-column-gap: 5px;
11
- row-gap: 8px;
12
- grid-template-columns: max-content max-content;
13
- }
@@ -1,20 +0,0 @@
1
- import { HTMLSelect } from "@blueprintjs/core";
2
- import React from "react";
3
- import classNames from "classnames";
4
-
5
- // so far this component just makes the styling of the disabled html select
6
- // look like a regular html select with the selected option displayed
7
- // (instead of greyed out and without the ability to have tooltips working)
8
- const TgHTMLSelect = ({ disabled, ...rest }) => {
9
- if (disabled) {
10
- const opt = rest.options.find(o => o.value === rest.value);
11
- return (
12
- <div {...rest} className={classNames("bp3-html-select", rest.className)}>
13
- {opt.label}
14
- </div>
15
- );
16
- }
17
- return <HTMLSelect {...rest}></HTMLSelect>;
18
- };
19
-
20
- export default TgHTMLSelect;