@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.
- package/index.cjs.js +1 -2
- package/index.es.js +1 -2
- package/package.json +1 -1
- package/src/DataTable/Columns.js +1 -1
- package/src/DataTable/DisplayOptions.js +1 -1
- package/src/DataTable/FilterAndSortMenu.js +30 -27
- package/src/DataTable/index.js +14 -3
- package/src/DataTable/utils/queryParams.js +771 -64
- package/src/DataTable/utils/withTableParams.js +16 -3
- package/src/index.js +0 -1
- package/src/utils/isBeingCalledExcessively.js +14 -7
- 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/DataTable/utils/filterLocalEntitiesToHasura.d.ts +0 -5
- package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +0 -2
- package/DataTable/utils/tableQueryParamsToHasuraClauses.d.ts +0 -26
- 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 -391
- 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/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/isBeingCalledExcessively.js +0 -32
- 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 -1058
- 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/sortify.js +0 -73
- package/src/DataTable/utils/filterLocalEntitiesToHasura.js +0 -236
- package/src/DataTable/utils/filterLocalEntitiesToHasura.test.js +0 -587
- package/src/DataTable/utils/initializeHasuraWhereAndFilter.js +0 -26
- package/src/DataTable/utils/tableQueryParamsToHasuraClauses.js +0 -253
- package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +0 -206
- package/style.css +0 -29
- 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 -301
- package/wrapDialog.js +0 -116
package/index.cjs.js
CHANGED
|
@@ -15848,7 +15848,6 @@ var itemSizeEstimator = /* @__PURE__ */ __name(function itemSizeEstimator2() {
|
|
|
15848
15848
|
return 41.36;
|
|
15849
15849
|
}, "itemSizeEstimator");
|
|
15850
15850
|
var ReactTableDefaults = defaultProps;
|
|
15851
|
-
var VIRTUALIZE_CUTOFF_LENGTH = 200;
|
|
15852
15851
|
var ReactTable = function(_Methods) {
|
|
15853
15852
|
_inherits$8(ReactTable2, _Methods);
|
|
15854
15853
|
function ReactTable2(props) {
|
|
@@ -16434,7 +16433,7 @@ var ReactTable = function(_Methods) {
|
|
|
16434
16433
|
minWidth: rowMinWidth + "px"
|
|
16435
16434
|
})
|
|
16436
16435
|
}, tBodyProps.rest),
|
|
16437
|
-
|
|
16436
|
+
pageRows.length < 200 ? pageRows.map(function(d2, i2) {
|
|
16438
16437
|
return makePageRow(d2, i2);
|
|
16439
16438
|
}) : React.createElement(ReactList, {
|
|
16440
16439
|
type: "variable",
|
package/index.es.js
CHANGED
|
@@ -15830,7 +15830,6 @@ var itemSizeEstimator = /* @__PURE__ */ __name(function itemSizeEstimator2() {
|
|
|
15830
15830
|
return 41.36;
|
|
15831
15831
|
}, "itemSizeEstimator");
|
|
15832
15832
|
var ReactTableDefaults = defaultProps;
|
|
15833
|
-
var VIRTUALIZE_CUTOFF_LENGTH = 200;
|
|
15834
15833
|
var ReactTable = function(_Methods) {
|
|
15835
15834
|
_inherits$8(ReactTable2, _Methods);
|
|
15836
15835
|
function ReactTable2(props) {
|
|
@@ -16416,7 +16415,7 @@ var ReactTable = function(_Methods) {
|
|
|
16416
16415
|
minWidth: rowMinWidth + "px"
|
|
16417
16416
|
})
|
|
16418
16417
|
}, tBodyProps.rest),
|
|
16419
|
-
|
|
16418
|
+
pageRows.length < 200 ? pageRows.map(function(d2, i2) {
|
|
16420
16419
|
return makePageRow(d2, i2);
|
|
16421
16420
|
}) : React__default.createElement(ReactList, {
|
|
16422
16421
|
type: "variable",
|
package/package.json
CHANGED
package/src/DataTable/Columns.js
CHANGED
|
@@ -33,10 +33,10 @@ import getTextFromEl from "../utils/getTextFromEl";
|
|
|
33
33
|
import rowClick, { finalizeSelection } from "./utils/rowClick";
|
|
34
34
|
import { editCellHelper } from "./editCellHelper";
|
|
35
35
|
import { getCellVal } from "./getCellVal";
|
|
36
|
+
import { getCCDisplayName } from "./utils/queryParams";
|
|
36
37
|
import { useDispatch } from "react-redux";
|
|
37
38
|
import { change as _change } from "redux-form";
|
|
38
39
|
import { RenderCell } from "./RenderCell";
|
|
39
|
-
import { getCCDisplayName } from "./utils/tableQueryParamsToHasuraClauses";
|
|
40
40
|
|
|
41
41
|
dayjs.extend(localizedFormat);
|
|
42
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { DateInput, DateRangeInput } from "@blueprintjs/datetime";
|
|
3
|
-
import { camelCase
|
|
3
|
+
import { camelCase } from "lodash-es";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import {
|
|
6
6
|
Menu,
|
|
@@ -349,40 +349,43 @@ function getFilterMenuItems(dataType) {
|
|
|
349
349
|
let filterMenuItems = [];
|
|
350
350
|
if (dataType === "string") {
|
|
351
351
|
filterMenuItems = [
|
|
352
|
-
"
|
|
353
|
-
"
|
|
354
|
-
"
|
|
355
|
-
"
|
|
356
|
-
"
|
|
357
|
-
"
|
|
358
|
-
"
|
|
359
|
-
"
|
|
360
|
-
"
|
|
361
|
-
"
|
|
352
|
+
"Contains",
|
|
353
|
+
"Not Contains",
|
|
354
|
+
"Starts With",
|
|
355
|
+
"Ends With",
|
|
356
|
+
"Is Exactly",
|
|
357
|
+
"Regex",
|
|
358
|
+
"In List",
|
|
359
|
+
"Not In List",
|
|
360
|
+
"Is Empty",
|
|
361
|
+
"Not Empty"
|
|
362
362
|
];
|
|
363
363
|
} else if (dataType === "lookup") {
|
|
364
364
|
filterMenuItems = [
|
|
365
|
-
"
|
|
366
|
-
"
|
|
367
|
-
"
|
|
368
|
-
"
|
|
369
|
-
"
|
|
370
|
-
"
|
|
365
|
+
"Contains",
|
|
366
|
+
"Not Contains",
|
|
367
|
+
"Starts With",
|
|
368
|
+
"Ends With",
|
|
369
|
+
"Is Exactly",
|
|
370
|
+
"Regex"
|
|
371
371
|
];
|
|
372
372
|
} else if (dataType === "boolean") {
|
|
373
|
-
filterMenuItems = ["
|
|
373
|
+
filterMenuItems = ["True", "False"];
|
|
374
374
|
} else if (dataType === "number" || dataType === "integer") {
|
|
375
|
+
// else if (dataType === "lookup") {
|
|
376
|
+
// filterMenuItems = ["None"];
|
|
377
|
+
// }
|
|
375
378
|
filterMenuItems = [
|
|
376
|
-
"
|
|
377
|
-
"
|
|
378
|
-
"
|
|
379
|
-
"
|
|
380
|
-
"
|
|
381
|
-
"
|
|
382
|
-
"
|
|
379
|
+
"Greater Than",
|
|
380
|
+
"Less Than",
|
|
381
|
+
"In Range",
|
|
382
|
+
"Outside Range",
|
|
383
|
+
"Equal To",
|
|
384
|
+
"In List",
|
|
385
|
+
"Not In List"
|
|
383
386
|
];
|
|
384
387
|
} else if (dataType === "timestamp") {
|
|
385
|
-
filterMenuItems = ["
|
|
388
|
+
filterMenuItems = ["Is Between", "Not Between", "Is Before", "Is After"];
|
|
386
389
|
}
|
|
387
|
-
return filterMenuItems
|
|
390
|
+
return filterMenuItems;
|
|
388
391
|
}
|
package/src/DataTable/index.js
CHANGED
|
@@ -92,6 +92,7 @@ import { viewColumn, openColumn, multiViewColumn } from "./viewColumn";
|
|
|
92
92
|
import convertSchema from "./utils/convertSchema";
|
|
93
93
|
import TableFormTrackerContext from "./TableFormTrackerContext";
|
|
94
94
|
import {
|
|
95
|
+
getCCDisplayName,
|
|
95
96
|
getCurrentParamsFromUrl,
|
|
96
97
|
getQueryParams,
|
|
97
98
|
makeDataTableHandlers,
|
|
@@ -102,7 +103,6 @@ import { formValueSelector, change as _change } from "redux-form";
|
|
|
102
103
|
import { throwFormError } from "../throwFormError";
|
|
103
104
|
import { isObservableArray, toJS } from "mobx";
|
|
104
105
|
import { isBeingCalledExcessively } from "../utils/isBeingCalledExcessively";
|
|
105
|
-
import { getCCDisplayName } from "./utils/tableQueryParamsToHasuraClauses";
|
|
106
106
|
|
|
107
107
|
enablePatches();
|
|
108
108
|
const IS_LINUX = window.navigator.platform.toLowerCase().search("linux") > -1;
|
|
@@ -337,6 +337,16 @@ const DataTable = ({
|
|
|
337
337
|
|
|
338
338
|
const queryParams = useMemo(() => {
|
|
339
339
|
if (!isTableParamsConnected) {
|
|
340
|
+
const additionalFilterToUse =
|
|
341
|
+
typeof props.additionalFilter === "function"
|
|
342
|
+
? props.additionalFilter
|
|
343
|
+
: () => props.additionalFilter;
|
|
344
|
+
|
|
345
|
+
const additionalOrFilterToUse =
|
|
346
|
+
typeof props.additionalOrFilter === "function"
|
|
347
|
+
? props.additionalOrFilter
|
|
348
|
+
: () => props.additionalOrFilter;
|
|
349
|
+
|
|
340
350
|
return getQueryParams({
|
|
341
351
|
doNotCoercePageSize,
|
|
342
352
|
currentParams,
|
|
@@ -346,7 +356,8 @@ const DataTable = ({
|
|
|
346
356
|
schema: convertedSchema,
|
|
347
357
|
isInfinite,
|
|
348
358
|
isLocalCall,
|
|
349
|
-
additionalFilter:
|
|
359
|
+
additionalFilter: additionalFilterToUse,
|
|
360
|
+
additionalOrFilter: additionalOrFilterToUse,
|
|
350
361
|
noOrderError: props.noOrderError,
|
|
351
362
|
isCodeModel: props.isCodeModel,
|
|
352
363
|
ownProps: props
|
|
@@ -603,7 +614,7 @@ const DataTable = ({
|
|
|
603
614
|
: !val;
|
|
604
615
|
});
|
|
605
616
|
}
|
|
606
|
-
if (noValsForField
|
|
617
|
+
if (noValsForField) {
|
|
607
618
|
return {
|
|
608
619
|
...field,
|
|
609
620
|
isHidden: true,
|