@teselagen/ui 0.7.33-beta.2 → 0.7.33-beta.3
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/package.json +1 -1
- package/src/style.css +10 -26
- package/AdvancedOptions.js +0 -33
- package/AssignDefaultsModeContext.js +0 -22
- package/CellDragHandle.js +0 -132
- package/ColumnFilterMenu.js +0 -62
- package/Columns.js +0 -979
- package/DisabledLoadingComponent.js +0 -15
- package/DisplayOptions.js +0 -199
- package/DropdownButton.js +0 -36
- package/DropdownCell.js +0 -61
- package/EditableCell.js +0 -44
- package/FillWindow.css +0 -6
- package/FillWindow.js +0 -69
- package/FilterAndSortMenu.js +0 -388
- package/FormSeparator.js +0 -9
- package/LoadingDots.js +0 -14
- package/MatchHeaders.js +0 -234
- package/PagingTool.js +0 -225
- package/RenderCell.js +0 -191
- package/SearchBar.js +0 -69
- package/SimpleStepViz.js +0 -22
- package/SortableColumns.js +0 -100
- package/TableFormTrackerContext.js +0 -10
- package/Tag.js +0 -112
- package/ThComponent.js +0 -44
- package/TimelineEvent.js +0 -31
- package/UploadCsvWizard.css +0 -4
- package/UploadCsvWizard.js +0 -719
- package/Uploader.js +0 -1278
- package/adHoc.js +0 -10
- package/autoTooltip.js +0 -201
- package/basicHandleActionsWithFullState.js +0 -14
- package/browserUtils.js +0 -3
- package/combineReducersWithFullState.js +0 -14
- package/commandControls.js +0 -82
- package/commandUtils.js +0 -112
- package/constants.js +0 -1
- package/convertSchema.js +0 -69
- package/customIcons.js +0 -361
- package/dataTableEnhancer.js +0 -41
- package/defaultFormatters.js +0 -32
- package/defaultValidators.js +0 -40
- package/determineBlackOrWhiteTextColor.js +0 -4
- package/editCellHelper.js +0 -44
- package/filterLocalEntitiesToHasura.js +0 -216
- package/formatPasteData.js +0 -16
- package/getAllRows.js +0 -11
- package/getCellCopyText.js +0 -7
- package/getCellInfo.js +0 -36
- package/getCellVal.js +0 -20
- package/getDayjsFormatter.js +0 -35
- package/getFieldPathToField.js +0 -7
- package/getIdOrCodeOrIndex.js +0 -9
- package/getLastSelectedEntity.js +0 -11
- package/getNewEntToSelect.js +0 -25
- package/getNewName.js +0 -31
- package/getRowCopyText.js +0 -28
- package/getTableConfigFromStorage.js +0 -5
- package/getTextFromEl.js +0 -28
- package/getVals.js +0 -8
- package/handleCopyColumn.js +0 -21
- package/handleCopyHelper.js +0 -15
- package/handleCopyRows.js +0 -23
- package/handleCopyTable.js +0 -16
- package/handlerHelpers.js +0 -24
- package/hotkeyUtils.js +0 -131
- package/index.js +0 -1
- package/initializeHasuraWhereAndFilter.js +0 -27
- package/isBeingCalledExcessively.js +0 -24
- package/isBottomRightCornerOfRectangle.js +0 -20
- package/isEntityClean.js +0 -15
- package/isTruthy.js +0 -12
- package/isValueEmpty.js +0 -3
- package/itemUpload.js +0 -84
- package/menuUtils.js +0 -433
- package/popoverOverflowModifiers.js +0 -11
- package/primarySelectedValue.js +0 -1
- package/pureNoFunc.js +0 -31
- package/queryParams.js +0 -336
- package/removeCleanRows.js +0 -22
- package/renderOnDoc.js +0 -32
- package/rerenderOnWindowResize.js +0 -26
- package/rowClick.js +0 -181
- package/selection.js +0 -8
- package/showAppSpinner.js +0 -12
- package/showDialogOnDocBody.js +0 -33
- package/showProgressToast.js +0 -22
- package/simplifyHasuraWhere.js +0 -80
- package/sortify.js +0 -73
- package/style.css +0 -29
- package/tableQueryParamsToHasuraClauses.js +0 -113
- package/tagUtils.js +0 -45
- package/tgFormValues.js +0 -35
- package/tg_modalState.js +0 -47
- package/throwFormError.js +0 -16
- package/toastr.js +0 -148
- package/tryToMatchSchemas.js +0 -264
- package/typeToCommonType.js +0 -6
- package/useDeepEqualMemo.js +0 -15
- package/useDialog.js +0 -63
- package/useStableReference.js +0 -9
- package/useTableEntities.js +0 -38
- package/useTraceUpdate.js +0 -19
- package/utils.js +0 -37
- package/validateTableWideErrors.js +0 -160
- package/viewColumn.js +0 -97
- package/withField.js +0 -20
- package/withFields.js +0 -11
- package/withLocalStorage.js +0 -11
- package/withSelectTableRecords.js +0 -43
- package/withSelectedEntities.js +0 -65
- package/withStore.js +0 -10
- package/withTableParams.js +0 -288
- 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
|
-
✕
|
|
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;
|
package/UploadCsvWizard.css
DELETED