@teselagen/ui 0.4.14 → 0.4.15

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 (119) hide show
  1. package/AdvancedOptions.d.ts +1 -1
  2. package/AssignDefaultsModeContext.d.ts +1 -1
  3. package/AsyncValidateFieldSpinner/index.d.ts +1 -1
  4. package/BlueprintError/index.d.ts +1 -1
  5. package/BounceLoader/index.d.ts +1 -1
  6. package/CollapsibleCard/index.d.ts +1 -1
  7. package/DNALoader/index.d.ts +1 -1
  8. package/DataTable/CellDragHandle.d.ts +1 -1
  9. package/DataTable/ColumnFilterMenu.d.ts +14 -0
  10. package/DataTable/DisabledLoadingComponent.d.ts +1 -1
  11. package/DataTable/DisplayOptions.d.ts +2 -2
  12. package/DataTable/DropdownCell.d.ts +8 -0
  13. package/DataTable/EditabelCell.d.ts +10 -0
  14. package/DataTable/FilterAndSortMenu.d.ts +2 -2
  15. package/DataTable/SearchBar.d.ts +1 -1
  16. package/DataTable/SortableColumns.d.ts +2 -2
  17. package/DataTable/TableFormTrackerContext.d.ts +1 -1
  18. package/DataTable/defaultProps.d.ts +1 -1
  19. package/DataTable/index.d.ts +0 -5
  20. package/DataTable/utils/computePresets.d.ts +1 -1
  21. package/DataTable/utils/formatPasteData.d.ts +5 -0
  22. package/DataTable/utils/getAllRows.d.ts +1 -0
  23. package/DataTable/utils/getCellCopyText.d.ts +1 -0
  24. package/DataTable/utils/getCellInfo.d.ts +17 -0
  25. package/DataTable/utils/getFieldPathToField.d.ts +1 -0
  26. package/DataTable/utils/getIdOrCodeOrIndex.d.ts +1 -2
  27. package/DataTable/utils/getLastSelectedEntity.d.ts +1 -0
  28. package/DataTable/utils/getNewEntToSelect.d.ts +6 -0
  29. package/DataTable/utils/getRowCopyText.d.ts +3 -0
  30. package/DataTable/utils/handleCopyColumn.d.ts +1 -0
  31. package/DataTable/utils/handleCopyHelper.d.ts +1 -0
  32. package/DataTable/utils/handleCopyRows.d.ts +5 -0
  33. package/DataTable/utils/index.d.ts +21 -0
  34. package/DataTable/utils/isBottomRightCornerOfRectangle.d.ts +8 -0
  35. package/DataTable/utils/isEntityClean.d.ts +1 -0
  36. package/DataTable/utils/removeCleanRows.d.ts +4 -0
  37. package/DataTable/utils/rowClick.d.ts +10 -2
  38. package/DataTable/utils/utils.d.ts +5 -0
  39. package/DataTable/viewColumn.d.ts +2 -2
  40. package/DialogFooter/index.d.ts +1 -1
  41. package/DropdownButton.d.ts +1 -1
  42. package/FillWindow.d.ts +1 -1
  43. package/FormComponents/LoadingDots.d.ts +1 -1
  44. package/FormComponents/Uploader.d.ts +29 -1
  45. package/FormComponents/index.d.ts +34 -34
  46. package/FormComponents/itemUpload.d.ts +1 -1
  47. package/HotkeysDialog/index.d.ts +1 -1
  48. package/InfoHelper/index.d.ts +1 -1
  49. package/IntentText/index.d.ts +1 -1
  50. package/MatchHeaders.d.ts +1 -1
  51. package/MenuBar/index.d.ts +4 -4
  52. package/PromptUnsavedChanges/index.d.ts +1 -1
  53. package/README.md +18 -0
  54. package/ResizableDraggableDialog/index.d.ts +2 -2
  55. package/ScrollToTop/index.d.ts +1 -1
  56. package/SimpleStepViz.d.ts +1 -1
  57. package/Tag.d.ts +1 -1
  58. package/TagSelect/index.d.ts +1 -1
  59. package/TgSelect/index.d.ts +2 -2
  60. package/TgSuggest/index.d.ts +3 -3
  61. package/Timeline/TimelineEvent.d.ts +1 -1
  62. package/Timeline/index.d.ts +2 -2
  63. package/UploadCsvWizard.d.ts +1 -1
  64. package/customIcons.d.ts +19 -19
  65. package/enhancers/withField.d.ts +1 -1
  66. package/enhancers/withFields.d.ts +1 -1
  67. package/enhancers/withLocalStorage.d.ts +1 -1
  68. package/index.cjs.js +14026 -12765
  69. package/index.d.ts +60 -60
  70. package/index.es.js +13844 -12583
  71. package/package.json +7 -4
  72. package/showConfirmationDialog/index.d.ts +2 -2
  73. package/src/DataTable/CellDragHandle.js +6 -7
  74. package/src/DataTable/ColumnFilterMenu.js +60 -0
  75. package/src/DataTable/DropdownCell.js +61 -0
  76. package/src/DataTable/EditabelCell.js +55 -0
  77. package/src/DataTable/PagingTool.js +1 -1
  78. package/src/DataTable/SortableColumns.js +53 -18
  79. package/src/DataTable/dataTableEnhancer.js +1 -1
  80. package/src/DataTable/index.js +385 -759
  81. package/src/DataTable/utils/formatPasteData.js +16 -0
  82. package/src/DataTable/utils/getAllRows.js +11 -0
  83. package/src/DataTable/utils/getCellCopyText.js +7 -0
  84. package/src/DataTable/utils/getCellInfo.js +36 -0
  85. package/src/DataTable/utils/getFieldPathToField.js +7 -0
  86. package/src/DataTable/utils/getIdOrCodeOrIndex.js +1 -1
  87. package/src/DataTable/utils/getLastSelectedEntity.js +11 -0
  88. package/src/DataTable/utils/getNewEntToSelect.js +25 -0
  89. package/src/DataTable/utils/getRowCopyText.js +28 -0
  90. package/src/DataTable/utils/handleCopyColumn.js +21 -0
  91. package/src/DataTable/utils/handleCopyHelper.js +15 -0
  92. package/src/DataTable/utils/handleCopyRows.js +23 -0
  93. package/src/DataTable/utils/index.js +51 -0
  94. package/src/DataTable/utils/isBottomRightCornerOfRectangle.js +20 -0
  95. package/src/DataTable/utils/isEntityClean.js +15 -0
  96. package/src/DataTable/utils/removeCleanRows.js +22 -0
  97. package/src/DataTable/utils/rowClick.js +7 -4
  98. package/src/DataTable/utils/selection.js +1 -1
  99. package/src/DataTable/utils/utils.js +37 -0
  100. package/src/DataTable/validateTableWideErrors.js +1 -1
  101. package/src/FillWindow.js +2 -3
  102. package/src/FormComponents/Uploader.js +400 -400
  103. package/src/FormComponents/tryToMatchSchemas.js +0 -6
  104. package/src/UploadCsvWizard.js +312 -371
  105. package/src/index.js +3 -3
  106. package/src/showDialogOnDocBody.js +5 -9
  107. package/src/useDialog.js +7 -4
  108. package/src/utils/renderOnDoc.js +8 -5
  109. package/style.css +7 -7
  110. package/useDialog.d.ts +2 -2
  111. package/utils/adHoc.d.ts +1 -1
  112. package/utils/commandControls.d.ts +5 -5
  113. package/utils/hotkeyUtils.d.ts +1 -1
  114. package/utils/menuUtils.d.ts +7 -7
  115. package/utils/renderOnDoc.d.ts +1 -1
  116. package/utils/tagUtils.d.ts +1 -1
  117. package/utils/tgFormValues.d.ts +1 -1
  118. package/utils/withStore.d.ts +1 -1
  119. package/wrapDialog.d.ts +1 -1
@@ -0,0 +1,16 @@
1
+ import { getFieldPathToField } from "./getFieldPathToField";
2
+
3
+ export const formatPasteData = ({ schema, newVal, path }) => {
4
+ const pathToField = getFieldPathToField(schema);
5
+ const column = pathToField[path];
6
+ if (column.type === "genericSelect") {
7
+ if (newVal?.__genSelCol === path) {
8
+ newVal = newVal.__strVal;
9
+ } else {
10
+ newVal = undefined;
11
+ }
12
+ } else {
13
+ newVal = Object.hasOwn(newVal, "__strVal") ? newVal.__strVal : newVal;
14
+ }
15
+ return newVal;
16
+ };
@@ -0,0 +1,11 @@
1
+ export const getAllRows = e => {
2
+ const el = e.target.querySelector(".data-table-container")
3
+ ? e.target.querySelector(".data-table-container")
4
+ : e.target.closest(".data-table-container");
5
+
6
+ const allRowEls = el.querySelectorAll(".rt-tr");
7
+ if (!allRowEls || !allRowEls.length) {
8
+ return;
9
+ }
10
+ return allRowEls;
11
+ };
@@ -0,0 +1,7 @@
1
+ export const getCellCopyText = cellWrapper => {
2
+ const text = cellWrapper && cellWrapper.getAttribute("data-copy-text");
3
+ const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
4
+
5
+ const textContent = text || cellWrapper.textContent || "";
6
+ return [textContent, jsonText];
7
+ };
@@ -0,0 +1,36 @@
1
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
2
+
3
+ export const getCellInfo = ({
4
+ columnIndex,
5
+ columnPath,
6
+ rowId,
7
+ schema,
8
+ entities,
9
+ rowIndex,
10
+ isEntityDisabled,
11
+ entity
12
+ }) => {
13
+ const leftpath = schema.fields[columnIndex - 1]?.path;
14
+ const rightpath = schema.fields[columnIndex + 1]?.path;
15
+ const cellIdToLeft = leftpath && `${rowId}:${leftpath}`;
16
+ const cellIdToRight = rightpath && `${rowId}:${rightpath}`;
17
+ const rowAboveId =
18
+ entities[rowIndex - 1] &&
19
+ getIdOrCodeOrIndex(entities[rowIndex - 1], rowIndex - 1);
20
+ const rowBelowId =
21
+ entities[rowIndex + 1] &&
22
+ getIdOrCodeOrIndex(entities[rowIndex + 1], rowIndex + 1);
23
+ const cellIdAbove = rowAboveId && `${rowAboveId}:${columnPath}`;
24
+ const cellIdBelow = rowBelowId && `${rowBelowId}:${columnPath}`;
25
+
26
+ const cellId = `${rowId}:${columnPath}`;
27
+ const rowDisabled = isEntityDisabled(entity);
28
+ return {
29
+ cellId,
30
+ cellIdAbove,
31
+ cellIdToRight,
32
+ cellIdBelow,
33
+ cellIdToLeft,
34
+ rowDisabled
35
+ };
36
+ };
@@ -0,0 +1,7 @@
1
+ export const getFieldPathToField = schema => {
2
+ const fieldPathToField = {};
3
+ schema.fields.forEach(f => {
4
+ fieldPathToField[f.path] = f;
5
+ });
6
+ return fieldPathToField;
7
+ };
@@ -1,4 +1,4 @@
1
- export default (record, rowIndex) => {
1
+ export const getIdOrCodeOrIndex = (record, rowIndex) => {
2
2
  if (record.id || record.id === 0) {
3
3
  return record.id;
4
4
  } else if (record.code) {
@@ -0,0 +1,11 @@
1
+ export const getLastSelectedEntity = idMap => {
2
+ let lastSelectedEnt;
3
+ let latestTime;
4
+ Object.values(idMap).forEach(({ time, entity }) => {
5
+ if (!latestTime || time > latestTime) {
6
+ lastSelectedEnt = entity;
7
+ latestTime = time;
8
+ }
9
+ });
10
+ return lastSelectedEnt;
11
+ };
@@ -0,0 +1,25 @@
1
+ export const getNewEntToSelect = ({
2
+ type,
3
+ lastSelectedIndex,
4
+ entities,
5
+ isEntityDisabled
6
+ }) => {
7
+ let newIndexToSelect;
8
+ if (type === "up") {
9
+ newIndexToSelect = lastSelectedIndex - 1;
10
+ } else {
11
+ newIndexToSelect = lastSelectedIndex + 1;
12
+ }
13
+ const newEntToSelect = entities[newIndexToSelect];
14
+ if (!newEntToSelect) return;
15
+ if (isEntityDisabled && isEntityDisabled(newEntToSelect)) {
16
+ return getNewEntToSelect({
17
+ type,
18
+ lastSelectedIndex: newIndexToSelect,
19
+ entities,
20
+ isEntityDisabled
21
+ });
22
+ } else {
23
+ return newEntToSelect;
24
+ }
25
+ };
@@ -0,0 +1,28 @@
1
+ import { getCellCopyText } from "./getCellCopyText";
2
+ import { flatMap } from "lodash-es";
3
+
4
+ export const getRowCopyText = (rowEl, { specificColumn } = {}) => {
5
+ //takes in a row element
6
+ if (!rowEl) return [];
7
+ const textContent = [];
8
+ const jsonText = [];
9
+
10
+ for (const cellEl of rowEl.children) {
11
+ const cellChild = cellEl.querySelector(`[data-copy-text]`);
12
+ if (!cellChild) {
13
+ if (specificColumn) continue; //strip it
14
+ continue; //just leave it blank
15
+ }
16
+ if (
17
+ specificColumn &&
18
+ cellChild.getAttribute("data-test") !== specificColumn
19
+ ) {
20
+ continue;
21
+ }
22
+ const [t, j] = getCellCopyText(cellChild);
23
+ textContent.push(t);
24
+ jsonText.push(j);
25
+ }
26
+
27
+ return [flatMap(textContent).join("\t"), jsonText];
28
+ };
@@ -0,0 +1,21 @@
1
+ import { getAllRows } from "./getAllRows";
2
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
3
+ import { handleCopyRows } from "./handleCopyRows";
4
+
5
+ export const handleCopyColumn = (e, cellWrapper, selectedRecords) => {
6
+ const specificColumn = cellWrapper.getAttribute("data-test");
7
+ let rowElsToCopy = getAllRows(e);
8
+ if (!rowElsToCopy) return;
9
+ if (selectedRecords) {
10
+ const ids = selectedRecords.map(e => getIdOrCodeOrIndex(e)?.toString());
11
+ rowElsToCopy = Array.from(rowElsToCopy).filter(rowEl => {
12
+ const id = rowEl.closest(".rt-tr-group")?.getAttribute("data-test-id");
13
+ return id !== undefined && ids.includes(id);
14
+ });
15
+ }
16
+ if (!rowElsToCopy) return;
17
+ handleCopyRows(rowElsToCopy, {
18
+ specificColumn,
19
+ onFinishMsg: "Column Copied"
20
+ });
21
+ };
@@ -0,0 +1,15 @@
1
+ import copy from "copy-to-clipboard";
2
+
3
+ export const handleCopyHelper = (stringToCopy, jsonToCopy, message) => {
4
+ !window.Cypress &&
5
+ copy(stringToCopy, {
6
+ onCopy: clipboardData => {
7
+ clipboardData.setData("application/json", JSON.stringify(jsonToCopy));
8
+ },
9
+ // keep this so that pasting into spreadsheets works.
10
+ format: "text/plain"
11
+ });
12
+ if (message) {
13
+ window.toastr.success(message);
14
+ }
15
+ };
@@ -0,0 +1,23 @@
1
+ import download from "downloadjs";
2
+ import { getRowCopyText } from "./getRowCopyText";
3
+ import { handleCopyHelper } from "./handleCopyHelper";
4
+
5
+ export const handleCopyRows = (
6
+ rowElsToCopy,
7
+ { specificColumn, onFinishMsg, isDownload } = {}
8
+ ) => {
9
+ let textToCopy = [];
10
+ const jsonToCopy = [];
11
+ rowElsToCopy.forEach(rowEl => {
12
+ const [t, j] = getRowCopyText(rowEl, { specificColumn });
13
+ textToCopy.push(t);
14
+ jsonToCopy.push(j);
15
+ });
16
+ textToCopy = textToCopy.filter(text => text).join("\n");
17
+ if (!textToCopy) return window.toastr.warning("No text to copy");
18
+ if (isDownload) {
19
+ download(textToCopy.replaceAll("\t", ","), "tableData.csv", "text/csv");
20
+ } else {
21
+ handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
22
+ }
23
+ };
@@ -0,0 +1,51 @@
1
+ import { isEntityClean } from "./isEntityClean";
2
+ import { getSelectedRowsFromEntities } from "./selection";
3
+ import { removeCleanRows } from "./removeCleanRows";
4
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
5
+ import computePresets from "./computePresets";
6
+ import { getRecordsFromIdMap } from "./withSelectedEntities";
7
+ import { formatPasteData } from "./formatPasteData";
8
+ import { getFieldPathToField } from "./getFieldPathToField";
9
+ import {
10
+ defaultParsePaste,
11
+ getEntityIdToEntity,
12
+ getFieldPathToIndex,
13
+ getNumberStrAtEnd,
14
+ stripNumberAtEnd
15
+ } from "./utils";
16
+ import { getAllRows } from "./getAllRows";
17
+ import { getNewEntToSelect } from "./getNewEntToSelect";
18
+ import { getLastSelectedEntity } from "./getLastSelectedEntity";
19
+ import { getCellInfo } from "./getCellInfo";
20
+ import { getCellCopyText } from "./getCellCopyText";
21
+ import { getRowCopyText } from "./getRowCopyText";
22
+ import { handleCopyHelper } from "./handleCopyHelper";
23
+ import { handleCopyRows } from "./handleCopyRows";
24
+ import { handleCopyColumn } from "./handleCopyColumn";
25
+ import { isBottomRightCornerOfRectangle } from "./isBottomRightCornerOfRectangle";
26
+
27
+ export {
28
+ computePresets,
29
+ defaultParsePaste,
30
+ formatPasteData,
31
+ getAllRows,
32
+ getCellCopyText,
33
+ getCellInfo,
34
+ getEntityIdToEntity,
35
+ getFieldPathToIndex,
36
+ getFieldPathToField,
37
+ getIdOrCodeOrIndex,
38
+ getLastSelectedEntity,
39
+ getNewEntToSelect,
40
+ getNumberStrAtEnd,
41
+ getRecordsFromIdMap,
42
+ getRowCopyText,
43
+ getSelectedRowsFromEntities,
44
+ handleCopyColumn,
45
+ handleCopyHelper,
46
+ handleCopyRows,
47
+ isBottomRightCornerOfRectangle,
48
+ isEntityClean,
49
+ removeCleanRows,
50
+ stripNumberAtEnd
51
+ };
@@ -0,0 +1,20 @@
1
+ export const isBottomRightCornerOfRectangle = ({
2
+ cellId,
3
+ selectionGrid,
4
+ lastRowIndex,
5
+ lastCellIndex,
6
+ entityMap,
7
+ pathToIndex
8
+ }) => {
9
+ selectionGrid.forEach(row => {
10
+ // remove undefineds from start of row
11
+ while (row[0] === undefined && row.length) row.shift();
12
+ });
13
+ const [rowId, cellPath] = cellId.split(":");
14
+ const ent = entityMap[rowId];
15
+ if (!ent) return;
16
+ const { i } = ent;
17
+ const cellIndex = pathToIndex[cellPath];
18
+ const isBottomRight = i === lastRowIndex && cellIndex === lastCellIndex;
19
+ return isBottomRight;
20
+ };
@@ -0,0 +1,15 @@
1
+ export function isEntityClean(e) {
2
+ if (typeof e !== "object" || e === null) {
3
+ return true; // or return false depending on what you want for non-object inputs
4
+ }
5
+ let isClean = true;
6
+ for (const [key, val] of Object.entries(e)) {
7
+ if (key === "id") continue;
8
+ if (key === "_isClean") continue;
9
+ if (val) {
10
+ isClean = false;
11
+ break;
12
+ }
13
+ }
14
+ return isClean;
15
+ }
@@ -0,0 +1,22 @@
1
+ import { isEntityClean } from "./isEntityClean";
2
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
3
+
4
+ export const removeCleanRows = (reduxFormEntities, reduxFormCellValidation) => {
5
+ const toFilterOut = {};
6
+ const entsToUse = (reduxFormEntities || []).filter(e => {
7
+ if (!(e._isClean || isEntityClean(e))) return true;
8
+ else {
9
+ toFilterOut[getIdOrCodeOrIndex(e)] = true;
10
+ return false;
11
+ }
12
+ });
13
+
14
+ const validationToUse = {};
15
+ Object.entries(reduxFormCellValidation || {}).forEach(([k, v]) => {
16
+ const [rowId] = k.split(":");
17
+ if (!toFilterOut[rowId]) {
18
+ validationToUse[k] = v;
19
+ }
20
+ });
21
+ return { entsToUse, validationToUse };
22
+ };
@@ -1,6 +1,6 @@
1
1
  import { isEmpty, forEach, range } from "lodash-es";
2
2
  import { getSelectedRowsFromEntities } from "./selection";
3
- import getIdOrCodeOrIndex from "./getIdOrCodeOrIndex";
3
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
4
4
  import { getRecordsFromIdMap } from "./withSelectedEntities";
5
5
 
6
6
  export default function rowClick(e, rowInfo, entities, props) {
@@ -124,8 +124,10 @@ export function changeSelectedEntities({ idMap, entities = [], change }) {
124
124
  change("reduxFormSelectedEntityIdMap", newIdMap);
125
125
  }
126
126
 
127
- export function finalizeSelection({ idMap, entities, props }) {
128
- const {
127
+ export function finalizeSelection({
128
+ idMap,
129
+ entities,
130
+ props: {
129
131
  onDeselect,
130
132
  onSingleRowSelect,
131
133
  onMultiRowSelect,
@@ -133,7 +135,8 @@ export function finalizeSelection({ idMap, entities, props }) {
133
135
  onRowSelect,
134
136
  noSelect,
135
137
  change
136
- } = props;
138
+ }
139
+ }) {
137
140
  if (noSelect) return;
138
141
  if (
139
142
  noDeselectAll &&
@@ -1,4 +1,4 @@
1
- import getIdOrCodeOrIndex from "./getIdOrCodeOrIndex";
1
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
2
2
 
3
3
  export const getSelectedRowsFromEntities = (entities, idMap) => {
4
4
  if (!idMap) return [];
@@ -0,0 +1,37 @@
1
+ import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
2
+
3
+ export const getFieldPathToIndex = schema => {
4
+ const fieldToIndex = {};
5
+ schema.fields.forEach((f, i) => {
6
+ fieldToIndex[f.path] = i;
7
+ });
8
+ return fieldToIndex;
9
+ };
10
+
11
+ export const defaultParsePaste = str => {
12
+ return str.split(/\r\n|\n|\r/).map(row => row.split("\t"));
13
+ };
14
+
15
+ export const getEntityIdToEntity = entities => {
16
+ const entityIdToEntity = {};
17
+ entities.forEach((e, i) => {
18
+ entityIdToEntity[getIdOrCodeOrIndex(e, i)] = { e, i };
19
+ });
20
+ return entityIdToEntity;
21
+ };
22
+
23
+ const endsWithNumber = str => {
24
+ return /[0-9]+$/.test(str);
25
+ };
26
+
27
+ export const getNumberStrAtEnd = str => {
28
+ if (endsWithNumber(str)) {
29
+ return str.match(/[0-9]+$/)[0];
30
+ }
31
+
32
+ return null;
33
+ };
34
+
35
+ export const stripNumberAtEnd = str => {
36
+ return str?.replace?.(getNumberStrAtEnd(str), "");
37
+ };
@@ -1,4 +1,4 @@
1
- import getIdOrCodeOrIndex from "./utils/getIdOrCodeOrIndex";
1
+ import { getIdOrCodeOrIndex } from "./utils";
2
2
  import { getCellVal } from "./getCellVal";
3
3
  import { forEach, isArray } from "lodash-es";
4
4
  import { startCase } from "lodash-es";
package/src/FillWindow.js CHANGED
@@ -1,6 +1,5 @@
1
- import React from "react";
1
+ import React, { createPortal } from "react";
2
2
  import { isFunction } from "lodash-es";
3
- import reactDom from "react-dom";
4
3
  import rerenderOnWindowResize from "./rerenderOnWindowResize";
5
4
  import "./FillWindow.css";
6
5
 
@@ -63,7 +62,7 @@ export default class FillWindow extends React.Component {
63
62
  : this.props.children}
64
63
  </div>
65
64
  );
66
- if (asPortal) return reactDom.createPortal(inner, window.document.body);
65
+ if (asPortal) return createPortal(inner, window.document.body);
67
66
  return inner;
68
67
  }
69
68
  }