@teselagen/ui 0.7.35 → 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 (128) 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/DataTable/Columns.js +1 -1
  5. package/src/DataTable/DisplayOptions.js +1 -1
  6. package/src/DataTable/FilterAndSortMenu.js +30 -27
  7. package/src/DataTable/index.js +14 -3
  8. package/src/DataTable/utils/queryParams.js +771 -64
  9. package/src/DataTable/utils/withTableParams.js +16 -3
  10. package/src/index.js +0 -1
  11. package/src/utils/isBeingCalledExcessively.js +14 -7
  12. package/AdvancedOptions.js +0 -33
  13. package/AssignDefaultsModeContext.js +0 -22
  14. package/CellDragHandle.js +0 -132
  15. package/ColumnFilterMenu.js +0 -62
  16. package/Columns.js +0 -979
  17. package/DataTable/utils/filterLocalEntitiesToHasura.d.ts +0 -5
  18. package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +0 -2
  19. package/DataTable/utils/tableQueryParamsToHasuraClauses.d.ts +0 -26
  20. package/DisabledLoadingComponent.js +0 -15
  21. package/DisplayOptions.js +0 -199
  22. package/DropdownButton.js +0 -36
  23. package/DropdownCell.js +0 -61
  24. package/EditableCell.js +0 -44
  25. package/FillWindow.css +0 -6
  26. package/FillWindow.js +0 -69
  27. package/FilterAndSortMenu.js +0 -391
  28. package/FormSeparator.js +0 -9
  29. package/LoadingDots.js +0 -14
  30. package/MatchHeaders.js +0 -234
  31. package/PagingTool.js +0 -225
  32. package/RenderCell.js +0 -191
  33. package/SearchBar.js +0 -69
  34. package/SimpleStepViz.js +0 -22
  35. package/SortableColumns.js +0 -100
  36. package/TableFormTrackerContext.js +0 -10
  37. package/Tag.js +0 -112
  38. package/ThComponent.js +0 -44
  39. package/TimelineEvent.js +0 -31
  40. package/UploadCsvWizard.css +0 -4
  41. package/UploadCsvWizard.js +0 -719
  42. package/Uploader.js +0 -1278
  43. package/adHoc.js +0 -10
  44. package/autoTooltip.js +0 -201
  45. package/basicHandleActionsWithFullState.js +0 -14
  46. package/browserUtils.js +0 -3
  47. package/combineReducersWithFullState.js +0 -14
  48. package/commandControls.js +0 -82
  49. package/commandUtils.js +0 -112
  50. package/constants.js +0 -1
  51. package/convertSchema.js +0 -69
  52. package/customIcons.js +0 -361
  53. package/dataTableEnhancer.js +0 -41
  54. package/defaultFormatters.js +0 -32
  55. package/defaultValidators.js +0 -40
  56. package/determineBlackOrWhiteTextColor.js +0 -4
  57. package/editCellHelper.js +0 -44
  58. package/formatPasteData.js +0 -16
  59. package/getAllRows.js +0 -11
  60. package/getCellCopyText.js +0 -7
  61. package/getCellInfo.js +0 -36
  62. package/getCellVal.js +0 -20
  63. package/getDayjsFormatter.js +0 -35
  64. package/getFieldPathToField.js +0 -7
  65. package/getIdOrCodeOrIndex.js +0 -9
  66. package/getLastSelectedEntity.js +0 -11
  67. package/getNewEntToSelect.js +0 -25
  68. package/getNewName.js +0 -31
  69. package/getRowCopyText.js +0 -28
  70. package/getTableConfigFromStorage.js +0 -5
  71. package/getTextFromEl.js +0 -28
  72. package/getVals.js +0 -8
  73. package/handleCopyColumn.js +0 -21
  74. package/handleCopyHelper.js +0 -15
  75. package/handleCopyRows.js +0 -23
  76. package/handleCopyTable.js +0 -16
  77. package/handlerHelpers.js +0 -24
  78. package/hotkeyUtils.js +0 -131
  79. package/index.js +0 -1
  80. package/isBeingCalledExcessively.js +0 -32
  81. package/isBottomRightCornerOfRectangle.js +0 -20
  82. package/isEntityClean.js +0 -15
  83. package/isTruthy.js +0 -12
  84. package/isValueEmpty.js +0 -3
  85. package/itemUpload.js +0 -84
  86. package/menuUtils.js +0 -433
  87. package/popoverOverflowModifiers.js +0 -11
  88. package/primarySelectedValue.js +0 -1
  89. package/pureNoFunc.js +0 -31
  90. package/queryParams.js +0 -1058
  91. package/removeCleanRows.js +0 -22
  92. package/renderOnDoc.js +0 -32
  93. package/rerenderOnWindowResize.js +0 -26
  94. package/rowClick.js +0 -181
  95. package/selection.js +0 -8
  96. package/showAppSpinner.js +0 -12
  97. package/showDialogOnDocBody.js +0 -33
  98. package/showProgressToast.js +0 -22
  99. package/sortify.js +0 -73
  100. package/src/DataTable/utils/filterLocalEntitiesToHasura.js +0 -236
  101. package/src/DataTable/utils/filterLocalEntitiesToHasura.test.js +0 -587
  102. package/src/DataTable/utils/initializeHasuraWhereAndFilter.js +0 -26
  103. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.js +0 -253
  104. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +0 -206
  105. package/style.css +0 -29
  106. package/tagUtils.js +0 -45
  107. package/tgFormValues.js +0 -35
  108. package/tg_modalState.js +0 -47
  109. package/throwFormError.js +0 -16
  110. package/toastr.js +0 -148
  111. package/tryToMatchSchemas.js +0 -264
  112. package/typeToCommonType.js +0 -6
  113. package/useDeepEqualMemo.js +0 -15
  114. package/useDialog.js +0 -63
  115. package/useStableReference.js +0 -9
  116. package/useTableEntities.js +0 -38
  117. package/useTraceUpdate.js +0 -19
  118. package/utils.js +0 -37
  119. package/validateTableWideErrors.js +0 -160
  120. package/viewColumn.js +0 -97
  121. package/withField.js +0 -20
  122. package/withFields.js +0 -11
  123. package/withLocalStorage.js +0 -11
  124. package/withSelectTableRecords.js +0 -43
  125. package/withSelectedEntities.js +0 -65
  126. package/withStore.js +0 -10
  127. package/withTableParams.js +0 -301
  128. package/wrapDialog.js +0 -116
package/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;
package/ThComponent.js DELETED
@@ -1,44 +0,0 @@
1
- import React from "react";
2
- import { useSortable } from "@dnd-kit/sortable";
3
- import { CSS } from "@dnd-kit/utilities";
4
- import classNames from "classnames";
5
-
6
- export const ThComponent = ({
7
- toggleSort,
8
- immovable,
9
- className,
10
- children,
11
- style,
12
- columnindex,
13
- ...rest
14
- }) => {
15
- const index = columnindex ?? -1;
16
- const { attributes, listeners, setNodeRef, transform, transition } =
17
- useSortable({
18
- id: `${index}`,
19
- disabled: immovable === "true"
20
- });
21
-
22
- const sortStyles = {
23
- transform: CSS.Transform.toString(transform),
24
- transition
25
- };
26
-
27
- return (
28
- <div
29
- style={{ ...sortStyles, ...style }}
30
- ref={setNodeRef}
31
- {...attributes}
32
- {...listeners}
33
- className={classNames("rt-th", className)}
34
- onClick={e => toggleSort && toggleSort(e)}
35
- role="columnheader"
36
- tabIndex="-1" // Resolves eslint issues without implementing keyboard navigation incorrectly
37
- columnindex={columnindex}
38
- index={index}
39
- {...rest}
40
- >
41
- {children}
42
- </div>
43
- );
44
- };
package/TimelineEvent.js DELETED
@@ -1,31 +0,0 @@
1
- import React from "react";
2
- import dayjs from "dayjs";
3
- import { Classes } from "@blueprintjs/core";
4
- import classNames from "classnames";
5
- import relativeTime from "dayjs/plugin/relativeTime";
6
-
7
- dayjs.extend(relativeTime);
8
-
9
- function TimelineEvent({ date, children }) {
10
- return (
11
- <div className="tg-timeline-event">
12
- <div
13
- style={{
14
- display: "flex",
15
- alignItems: "center"
16
- }}
17
- >
18
- <div className="tg-timeline-circle" />
19
- {children}
20
- <div
21
- style={{ marginLeft: 5 }}
22
- className={classNames(Classes.TEXT_SMALL, Classes.TEXT_MUTED)}
23
- >
24
- ({dayjs(date).fromNow()})
25
- </div>
26
- </div>
27
- </div>
28
- );
29
- }
30
-
31
- export default TimelineEvent;
@@ -1,4 +0,0 @@
1
- .rg-celleditor-input,
2
- .rg-celleditor input {
3
- border: none;
4
- }