@teselagen/ui 0.9.8 → 0.10.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.
Files changed (83) hide show
  1. package/CollapsibleCard/index.d.ts +2 -1
  2. package/DataTable/Columns.d.ts +4 -1
  3. package/DataTable/DisplayOptions.d.ts +2 -1
  4. package/DataTable/index.d.ts +3 -3
  5. package/DividerWithText/index.d.ts +16 -0
  6. package/index.cjs.js +21122 -21084
  7. package/index.d.ts +1 -0
  8. package/index.es.js +21125 -21087
  9. package/package.json +2 -1
  10. package/src/CollapsibleCard/index.js +8 -1
  11. package/src/DataTable/Columns.js +69 -1
  12. package/src/DataTable/DisplayOptions.js +35 -6
  13. package/src/DataTable/PagingTool.js +2 -2
  14. package/src/DataTable/RenderCell.js +8 -4
  15. package/src/DataTable/index.js +1253 -229
  16. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.js +2 -2
  17. package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +21 -0
  18. package/src/DataTable/utils/useTableEntities.js +3 -2
  19. package/src/DataTable/utils/withTableParams.js +34 -13
  20. package/src/DividerWithText/index.js +30 -0
  21. package/src/DividerWithText/style.css +37 -0
  22. package/src/InfoHelper/style.css +1 -0
  23. package/src/UploadCsvWizard.js +7 -5
  24. package/src/index.js +1 -0
  25. package/src/utils/hooks/useDeepEqualMemo.js +2 -2
  26. package/src/utils/isEqualIgnoreFunctions.js +23 -0
  27. package/src/utils/pureNoFunc.js +4 -20
  28. package/ui.css +38 -0
  29. package/utils/isEqualIgnoreFunctions.d.ts +1 -0
  30. package/DataTable/EditabelCell.d.ts +0 -7
  31. package/DataTable/ReactTable.d.ts +0 -78
  32. package/DataTable/defaultProps.d.ts +0 -43
  33. package/DataTable/utils/computePresets.d.ts +0 -1
  34. package/DataTable/utils/types/Entity.d.ts +0 -9
  35. package/DataTable/utils/types/Field.d.ts +0 -4
  36. package/DataTable/utils/types/OrderBy.d.ts +0 -11
  37. package/DataTable/utils/types/Schema.d.ts +0 -4
  38. package/DataTable/utils/useDeepEqualMemo.d.ts +0 -1
  39. package/DataTable/utils/useHotKeysWrapper.d.ts +0 -29
  40. package/DataTable/utils/useTableParams.d.ts +0 -49
  41. package/src/DataTable/Columns.jsx +0 -945
  42. package/src/DataTable/EditabelCell.js +0 -44
  43. package/src/DataTable/EditabelCell.jsx +0 -44
  44. package/src/DataTable/ReactTable.js +0 -738
  45. package/src/DataTable/RenderCell.jsx +0 -191
  46. package/src/DataTable/defaultProps.js +0 -45
  47. package/src/DataTable/utils/computePresets.js +0 -42
  48. package/src/DataTable/utils/convertSchema.ts +0 -79
  49. package/src/DataTable/utils/formatPasteData.ts +0 -34
  50. package/src/DataTable/utils/getAllRows.ts +0 -11
  51. package/src/DataTable/utils/getCellCopyText.ts +0 -7
  52. package/src/DataTable/utils/getCellInfo.ts +0 -46
  53. package/src/DataTable/utils/getFieldPathToField.ts +0 -10
  54. package/src/DataTable/utils/getIdOrCodeOrIndex.ts +0 -14
  55. package/src/DataTable/utils/getLastSelectedEntity.ts +0 -15
  56. package/src/DataTable/utils/getNewEntToSelect.ts +0 -32
  57. package/src/DataTable/utils/initializeHasuraWhereAndFilter.ts +0 -35
  58. package/src/DataTable/utils/isBottomRightCornerOfRectangle.ts +0 -27
  59. package/src/DataTable/utils/isEntityClean.ts +0 -15
  60. package/src/DataTable/utils/primarySelectedValue.ts +0 -1
  61. package/src/DataTable/utils/removeCleanRows.ts +0 -26
  62. package/src/DataTable/utils/selection.ts +0 -11
  63. package/src/DataTable/utils/types/Entity.ts +0 -13
  64. package/src/DataTable/utils/types/Field.ts +0 -4
  65. package/src/DataTable/utils/types/OrderBy.ts +0 -15
  66. package/src/DataTable/utils/types/Schema.ts +0 -5
  67. package/src/DataTable/utils/useDeepEqualMemo.js +0 -10
  68. package/src/DataTable/utils/useHotKeysWrapper.js +0 -395
  69. package/src/DataTable/utils/useTableEntities.ts +0 -60
  70. package/src/DataTable/utils/useTableParams.js +0 -361
  71. package/src/DataTable/utils/utils.ts +0 -39
  72. package/src/Timeline/TimelineEvent.tsx +0 -36
  73. package/src/Timeline/index.tsx +0 -21
  74. package/src/utils/browserUtils.ts +0 -3
  75. package/src/utils/determineBlackOrWhiteTextColor.ts +0 -11
  76. package/src/utils/getTextFromEl.ts +0 -45
  77. package/src/utils/handlerHelpers.ts +0 -32
  78. package/src/utils/hooks/index.ts +0 -1
  79. package/src/utils/hooks/useDeepEqualMemo.ts +0 -10
  80. package/src/utils/hooks/useStableReference.ts +0 -9
  81. package/src/utils/hotkeyUtils.tsx +0 -155
  82. package/src/utils/isBeingCalledExcessively.ts +0 -37
  83. package/style.css +0 -10537
@@ -24,10 +24,10 @@ export function tableQueryParamsToHasuraClauses({
24
24
  const searchTerms = searchTerm.split(",");
25
25
 
26
26
  schema.fields.forEach(field => {
27
- const { type, path, searchDisabled } = field;
27
+ const { type, path, searchDisabled, isHidden } = field;
28
28
  if (uniqueFieldsByPath[path]) return; // Skip if already added
29
29
  uniqueFieldsByPath[path] = true;
30
- if (searchDisabled || field.filterDisabled || type === "color") return;
30
+ if (searchDisabled || field.filterDisabled || type === "color" || isHidden) return;
31
31
 
32
32
  // Process each search term
33
33
  searchTerms.forEach(term => {
@@ -63,6 +63,27 @@ describe("tableQueryParamsToHasuraClauses", () => {
63
63
  offset: 0
64
64
  });
65
65
  });
66
+ it("shouldn't search on hidden fields", () => {
67
+ const result = tableQueryParamsToHasuraClauses({
68
+ searchTerm: "test",
69
+ schema: {
70
+ fields: [
71
+ { path: "name", type: "string", isHidden: true },
72
+ { path: "age", type: "number" },
73
+ { path: "isActive", type: "boolean" },
74
+ { path: "email", type: "string" }
75
+ ]
76
+ }
77
+ });
78
+ expect(result).toEqual({
79
+ where: {
80
+ _or: [{ email: { _ilike: "%test%" } }]
81
+ },
82
+ order_by: [],
83
+ limit: 25,
84
+ offset: 0
85
+ });
86
+ });
66
87
  it("should flatten queries with dup paths", () => {
67
88
  const result = tableQueryParamsToHasuraClauses({
68
89
  searchTerm: "test",
@@ -29,10 +29,11 @@ export const useTableEntities = tableFormName => {
29
29
  [dispatch, tableFormName]
30
30
  );
31
31
 
32
- const { allOrderedEntities, selectedEntities } = useSelector(state => ({
32
+ const entitySelector = state => ({
33
33
  allOrderedEntities: state.form?.[tableFormName]?.values?.allOrderedEntities,
34
34
  selectedEntities:
35
35
  state.form?.[tableFormName]?.values?.reduxFormSelectedEntityIdMap
36
- }));
36
+ });
37
+ const { allOrderedEntities, selectedEntities } = useSelector(entitySelector);
37
38
  return { selectTableEntities, allOrderedEntities, selectedEntities };
38
39
  };
@@ -76,7 +76,39 @@ export const useTableParams = props => {
76
76
  [_defaults, controlled_pageSize]
77
77
  );
78
78
 
79
- const convertedSchema = useMemo(() => convertSchema(schema), [schema]);
79
+ const formValueStateSelector = state =>
80
+ formValueSelector(formName)(
81
+ state,
82
+ "reduxFormQueryParams",
83
+ "reduxFormSelectedEntityIdMap",
84
+ "reduxFormReadOnlyFieldOptions"
85
+ );
86
+
87
+ const {
88
+ reduxFormQueryParams: _reduxFormQueryParams = {},
89
+ reduxFormSelectedEntityIdMap: _reduxFormSelectedEntityIdMap = {},
90
+ reduxFormReadOnlyFieldOptions
91
+ } = useSelector(formValueStateSelector);
92
+
93
+ const convertedSchema = useMemo(() => {
94
+ const pathToHiddenMap = {};
95
+ reduxFormReadOnlyFieldOptions?.forEach(({ path, isHidden }) => {
96
+ if (path) pathToHiddenMap[path] = isHidden;
97
+ });
98
+ const s = convertSchema(schema);
99
+
100
+ s.fields = s.fields.map(f => {
101
+ const isHidden = pathToHiddenMap[f.path];
102
+ if (pathToHiddenMap[f.path] !== undefined) {
103
+ return {
104
+ ...f,
105
+ isHidden
106
+ };
107
+ }
108
+ return f;
109
+ });
110
+ return s;
111
+ }, [schema, reduxFormReadOnlyFieldOptions]);
80
112
 
81
113
  if (isLocalCall) {
82
114
  if (!noForm && (!formName || formName === "tgDataTable")) {
@@ -98,17 +130,6 @@ export const useTableParams = props => {
98
130
  }
99
131
  }
100
132
 
101
- const {
102
- reduxFormQueryParams: _reduxFormQueryParams = {},
103
- reduxFormSelectedEntityIdMap: _reduxFormSelectedEntityIdMap = {}
104
- } = useSelector(state =>
105
- formValueSelector(formName)(
106
- state,
107
- "reduxFormQueryParams",
108
- "reduxFormSelectedEntityIdMap"
109
- )
110
- );
111
-
112
133
  // We want to make sure we don't rerender everything unnecessary
113
134
  // with redux-forms we tend to do unnecessary renders
114
135
  const reduxFormQueryParams = useDeepEqualMemo(_reduxFormQueryParams);
@@ -228,7 +249,7 @@ export const useTableParams = props => {
228
249
 
229
250
  const tableParams = useMemo(
230
251
  () => ({
231
- changeFormValue: change,
252
+ changeFormValue: (...args) => change(...args),
232
253
  selectedEntities,
233
254
  ..._tableParams,
234
255
  formName,
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { Classes } from "@blueprintjs/core";
3
+ import classNames from "classnames";
4
+ import "./style.css";
5
+
6
+ /**
7
+ * A divider component with optional text in the middle.
8
+ * Compatible with BlueprintJS styling.
9
+ *
10
+ * @param {Object} props - Component props
11
+ * @param {string} [props.text] - Optional text to display in the middle of the divider
12
+ * @param {string} [props.className] - Additional CSS class name
13
+ * @param {React.CSSProperties} [props.style] - Additional inline styles
14
+ * @returns {JSX.Element} The divider component
15
+ */
16
+ export default function DividerWithText({ text, className, style }) {
17
+ return (
18
+ <div
19
+ className={classNames(
20
+ Classes.DIVIDER,
21
+ "tg-blueprint-divider",
22
+ { "tg-blueprint-divider-with-text": !!text },
23
+ className
24
+ )}
25
+ style={style}
26
+ >
27
+ {text && <span className="tg-blueprint-divider-text">{text}</span>}
28
+ </div>
29
+ );
30
+ }
@@ -0,0 +1,37 @@
1
+ .tg-blueprint-divider {
2
+ position: relative;
3
+ }
4
+
5
+ /* Override Blueprint's default divider when we use text */
6
+ .tg-blueprint-divider-with-text.bp3-divider {
7
+ /* Remove Blueprint's default border styling to avoid duplication */
8
+ border: none;
9
+ display: flex;
10
+ align-items: center;
11
+ margin: 16px 0;
12
+ height: auto;
13
+ }
14
+
15
+ .tg-blueprint-divider-with-text::before,
16
+ .tg-blueprint-divider-with-text::after {
17
+ content: "";
18
+ flex: 1;
19
+ border-bottom: 1px solid rgba(16, 22, 26, 0.15);
20
+ }
21
+
22
+ .tg-blueprint-divider-text {
23
+ padding: 0 10px;
24
+ font-size: 14px;
25
+ color: rgba(92, 112, 128, 0.6);
26
+ white-space: nowrap;
27
+ }
28
+
29
+ /* Dark theme support */
30
+ .bp3-dark .tg-blueprint-divider-with-text::before,
31
+ .bp3-dark .tg-blueprint-divider-with-text::after {
32
+ border-bottom-color: rgba(255, 255, 255, 0.15);
33
+ }
34
+
35
+ .bp3-dark .tg-blueprint-divider-text {
36
+ color: rgba(167, 182, 194, 0.6);
37
+ }
@@ -1,5 +1,6 @@
1
1
  .bp3-popover.tg-info-helper-popover .bp3-popover-content {
2
2
  max-width: 340px;
3
+ white-space: pre-line;
3
4
  }
4
5
 
5
6
  .info-helper-clickable .bp3-popover-target {
@@ -185,7 +185,9 @@ export const SimpleInsertDataDialog = compose(
185
185
  }, [dataTableForm, dispatch]);
186
186
 
187
187
  const _reduxFormCellValidation = useSelector(
188
- state => state.form?.[dataTableForm]?.values.reduxFormCellValidation
188
+ function _reduxFormCellValidationSelector(state) {
189
+ return state.form?.[dataTableForm]?.values.reduxFormCellValidation;
190
+ }
189
191
  );
190
192
  const reduxFormCellValidation = useDeepEqualMemo(_reduxFormCellValidation);
191
193
 
@@ -272,13 +274,13 @@ const UploadCsvWizardDialogInner = reduxForm()(({
272
274
  const {
273
275
  reduxFormEntities: _reduxFormEntities,
274
276
  reduxFormCellValidation: _reduxFormCellValidation
275
- } = useSelector(state =>
276
- formValueSelector(datatableFormName)(
277
+ } = useSelector(function dtFormNameSelector(state) {
278
+ return formValueSelector(datatableFormName)(
277
279
  state,
278
280
  "reduxFormEntities",
279
281
  "reduxFormCellValidation"
280
- )
281
- );
282
+ );
283
+ });
282
284
 
283
285
  const reduxFormEntities = useDeepEqualMemo(_reduxFormEntities);
284
286
  const reduxFormCellValidation = useDeepEqualMemo(_reduxFormCellValidation);
package/src/index.js CHANGED
@@ -5,6 +5,7 @@ import "./style.css";
5
5
  import "./autoTooltip";
6
6
  export { LoadingDots } from "./FormComponents/LoadingDots";
7
7
  export { FormSeparator } from "./FormComponents/FormSeparator";
8
+ export { default as DividerWithText } from "./DividerWithText";
8
9
  export * from "./AssignDefaultsModeContext";
9
10
  export { default as Uploader } from "./FormComponents/Uploader";
10
11
  export { mergeSchemas } from "./DataTable/utils/convertSchema";
@@ -1,9 +1,9 @@
1
- import { isEqual } from "lodash-es";
2
1
  import { useEffect, useRef } from "react";
2
+ import { isEqualIgnoreFunctions } from "../isEqualIgnoreFunctions";
3
3
 
4
4
  export const useDeepEqualMemo = value => {
5
5
  const ref = useRef();
6
- if (!isEqual(value, ref.current)) {
6
+ if (!isEqualIgnoreFunctions(value, ref.current)) {
7
7
  ref.current = value;
8
8
  }
9
9
  return ref.current;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This HOC compares props to create a pure component that will only update
3
+ * when props are not deep equal. It will compare the string values of functions
4
+ */
5
+ import { isEqualWith, isFunction } from "lodash-es";
6
+
7
+ /**
8
+ * tgreen: This is an awful function which we should come up with a better solution for
9
+ * @param {*} o1
10
+ * @param {*} o2
11
+ */
12
+ export const isEqualIgnoreFunctions = (o1, o2) => {
13
+ const isEq = isEqualWith(o1, o2, function (val1, val2) {
14
+ if (isFunction(val1) && isFunction(val2)) {
15
+ return val1 === val2 || val1.toString() === val2.toString();
16
+ }
17
+ // tgreen: we were seeing an issue where the isEq would infinite loop on react children
18
+ // components. We decided to just ignore them (assume they are equal)
19
+ if (val1 && val1.constructor && val1.constructor.name === "FiberNode")
20
+ return true;
21
+ });
22
+ return isEq;
23
+ };
@@ -3,28 +3,12 @@
3
3
  * when props are not deep equal. It will compare the string values of functions
4
4
  */
5
5
  import { shouldUpdate } from "recompose";
6
- import { isEqualWith, isFunction } from "lodash-es";
7
-
8
- /**
9
- * tgreen: This is an awful function which we should come up with a better solution for
10
- * @param {*} o1
11
- * @param {*} o2
12
- */
13
- const isEq = (o1, o2) => {
14
- const isEq = isEqualWith(o1, o2, function (val1, val2) {
15
- if (isFunction(val1) && isFunction(val2)) {
16
- return val1 === val2 || val1.toString() === val2.toString();
17
- }
18
- // tgreen: we were seeing an issue where the isEq would infinite loop on react children
19
- // components. We decided to just ignore them (assume they are equal)
20
- if (val1 && val1.constructor && val1.constructor.name === "FiberNode")
21
- return true;
22
- });
23
- return isEq;
24
- };
6
+ import { isEqualIgnoreFunctions } from "./isEqualIgnoreFunctions";
25
7
 
26
8
  const pure = BaseComponent => {
27
- const hoc = shouldUpdate((props, nextProps) => !isEq(props, nextProps));
9
+ const hoc = shouldUpdate(
10
+ (props, nextProps) => !isEqualIgnoreFunctions(props, nextProps)
11
+ );
28
12
  return hoc(BaseComponent);
29
13
  };
30
14
 
package/ui.css CHANGED
@@ -9356,6 +9356,43 @@ button:not(:disabled):active {
9356
9356
  margin-left: 16px;
9357
9357
  }
9358
9358
  }
9359
+ .tg-blueprint-divider {
9360
+ position: relative;
9361
+ }
9362
+
9363
+ /* Override Blueprint's default divider when we use text */
9364
+ .tg-blueprint-divider-with-text.bp3-divider {
9365
+ /* Remove Blueprint's default border styling to avoid duplication */
9366
+ border: none;
9367
+ display: flex;
9368
+ align-items: center;
9369
+ margin: 16px 0;
9370
+ height: auto;
9371
+ }
9372
+
9373
+ .tg-blueprint-divider-with-text::before,
9374
+ .tg-blueprint-divider-with-text::after {
9375
+ content: "";
9376
+ flex: 1;
9377
+ border-bottom: 1px solid rgba(16, 22, 26, 0.15);
9378
+ }
9379
+
9380
+ .tg-blueprint-divider-text {
9381
+ padding: 0 10px;
9382
+ font-size: 14px;
9383
+ color: rgba(92, 112, 128, 0.6);
9384
+ white-space: nowrap;
9385
+ }
9386
+
9387
+ /* Dark theme support */
9388
+ .bp3-dark .tg-blueprint-divider-with-text::before,
9389
+ .bp3-dark .tg-blueprint-divider-with-text::after {
9390
+ border-bottom-color: rgba(255, 255, 255, 0.15);
9391
+ }
9392
+
9393
+ .bp3-dark .tg-blueprint-divider-text {
9394
+ color: rgba(167, 182, 194, 0.6);
9395
+ }
9359
9396
  .rg-celleditor-input,
9360
9397
  .rg-celleditor input {
9361
9398
  border: none;
@@ -9423,6 +9460,7 @@ button:not(:disabled):active {
9423
9460
  }
9424
9461
  .bp3-popover.tg-info-helper-popover .bp3-popover-content {
9425
9462
  max-width: 340px;
9463
+ white-space: pre-line;
9426
9464
  }
9427
9465
 
9428
9466
  .info-helper-clickable .bp3-popover-target {
@@ -0,0 +1 @@
1
+ export function isEqualIgnoreFunctions(o1: any, o2: any): boolean;
@@ -1,7 +0,0 @@
1
- export function EditableCell({ cancelEdit, dataTest, finishEdit, isNumeric, initialValue }: {
2
- cancelEdit: any;
3
- dataTest: any;
4
- finishEdit: any;
5
- isNumeric: any;
6
- initialValue: any;
7
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,78 +0,0 @@
1
- export function ReactTable({ addFilters, cellRenderer, change, columns, compact, contextMenu, currentParams, disabled, doNotShowEmptyRows, doNotValidateUntouchedRows, editingCellSelectAll, entities, expandedEntityIdMap, extraCompact, filters, formName, getCellHoverText, getRowClassName, handleCellClick, handleCopySelectedRows, history, insertRows, isCellEditable, isCopyable, isEntityDisabled, isLoading, isLocalCall, isSelectionARectangle, isSimple, isSingleSelect, maxHeight, moveColumnPersist, mustClickCheckboxToSelect, noDeselectAll, noRowsFoundMessage, noSelect, noUserSelect, noVirtual, numRows, onDeselect, onDoubleClick, onlyShowRowsWErrors, onMultiRowSelect, onRowClick, onRowSelect, onSingleRowSelect, order, primarySelectedCellId, ReactTableProps, recordIdToIsVisibleMap, reduxFormCellValidation, reduxFormEditingCell, reduxFormSelectedEntityIdMap, refocusTable, removeSingleFilter, resizePersist, schema, selectedCells, setColumns, setExpandedEntityIdMap, setNewParams, setOrder, setRecordIdToIsVisibleMap, setSelectedCells, shouldShowSubComponent, startCellEdit, style, SubComponent, tableConfig, tableRef, updateEntitiesHelper, updateValidation, withCheckboxes, withExpandAndCollapseAllButton, withFilter, withSort }: {
2
- addFilters: any;
3
- cellRenderer: any;
4
- change: any;
5
- columns: any;
6
- compact: any;
7
- contextMenu: any;
8
- currentParams: any;
9
- disabled: any;
10
- doNotShowEmptyRows: any;
11
- doNotValidateUntouchedRows: any;
12
- editingCellSelectAll: any;
13
- entities: any;
14
- expandedEntityIdMap: any;
15
- extraCompact: any;
16
- filters: any;
17
- formName: any;
18
- getCellHoverText: any;
19
- getRowClassName: any;
20
- handleCellClick: any;
21
- handleCopySelectedRows: any;
22
- history: any;
23
- insertRows: any;
24
- isCellEditable: any;
25
- isCopyable: any;
26
- isEntityDisabled: any;
27
- isLoading: any;
28
- isLocalCall: any;
29
- isSelectionARectangle: any;
30
- isSimple: any;
31
- isSingleSelect: any;
32
- maxHeight: any;
33
- moveColumnPersist: any;
34
- mustClickCheckboxToSelect: any;
35
- noDeselectAll: any;
36
- noRowsFoundMessage: any;
37
- noSelect: any;
38
- noUserSelect: any;
39
- noVirtual: any;
40
- numRows: any;
41
- onDeselect: any;
42
- onDoubleClick: any;
43
- onlyShowRowsWErrors: any;
44
- onMultiRowSelect: any;
45
- onRowClick: any;
46
- onRowSelect: any;
47
- onSingleRowSelect: any;
48
- order: any;
49
- primarySelectedCellId: any;
50
- ReactTableProps: any;
51
- recordIdToIsVisibleMap: any;
52
- reduxFormCellValidation: any;
53
- reduxFormEditingCell: any;
54
- reduxFormSelectedEntityIdMap: any;
55
- refocusTable: any;
56
- removeSingleFilter: any;
57
- resizePersist: any;
58
- schema: any;
59
- selectedCells: any;
60
- setColumns: any;
61
- setExpandedEntityIdMap: any;
62
- setNewParams: any;
63
- setOrder: any;
64
- setRecordIdToIsVisibleMap: any;
65
- setSelectedCells: any;
66
- shouldShowSubComponent: any;
67
- startCellEdit: any;
68
- style: any;
69
- SubComponent: any;
70
- tableConfig: any;
71
- tableRef: any;
72
- updateEntitiesHelper: any;
73
- updateValidation: any;
74
- withCheckboxes: any;
75
- withExpandAndCollapseAllButton: any;
76
- withFilter: any;
77
- withSort: any;
78
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,43 +0,0 @@
1
- import { noop } from 'lodash-es';
2
- declare namespace _default {
3
- export { noop as addFilters };
4
- export let className: string;
5
- export { noop as clearFilters };
6
- export { noop as contextMenu };
7
- export let disabled: boolean;
8
- export let entities: never[];
9
- export let extraClasses: string;
10
- export let filters: never[];
11
- export let isCopyable: boolean;
12
- export { noop as isEntityDisabled };
13
- export let isLoading: boolean;
14
- export let isSimple: boolean;
15
- export let isSingleSelect: boolean;
16
- export let maxHeight: number;
17
- export let noHeader: boolean;
18
- export let noSelect: boolean;
19
- export let noUserSelect: boolean;
20
- export { noop as onDeselect };
21
- export { noop as onMultiRowSelect };
22
- export { noop as onRowClick };
23
- export { noop as onRowSelect };
24
- export { noop as onSingleRowSelect };
25
- export let page: number;
26
- export let pageSize: number;
27
- export let reduxFormExpandedEntityIdMap: {};
28
- export let reduxFormSearchInput: string;
29
- export let reduxFormSelectedEntityIdMap: {};
30
- export { noop as removeSingleFilter };
31
- export let resized: never[];
32
- export { noop as resizePersist };
33
- export { noop as setFilter };
34
- export { noop as setOrder };
35
- export { noop as setPage };
36
- export { noop as setPageSize };
37
- export { noop as setSearchTerm };
38
- export let showCount: boolean;
39
- export let style: {};
40
- export let withCheckboxes: boolean;
41
- export let withSort: boolean;
42
- }
43
- export default _default;
@@ -1 +0,0 @@
1
- export default function computePresets(props?: {}): import('lodash').Dictionary<any>;
@@ -1,9 +0,0 @@
1
- type SharedFields = {
2
- _isClean?: boolean;
3
- };
4
- export type Entity = ({
5
- id?: string | number;
6
- } | {
7
- code?: string;
8
- }) & SharedFields;
9
- export {};
@@ -1,4 +0,0 @@
1
- export type Field = {
2
- path: string;
3
- type: "genericSelect" | string;
4
- };
@@ -1,11 +0,0 @@
1
- type OrderByClause<T = {
2
- id: string;
3
- }> = {
4
- path?: string;
5
- direction?: "asc" | "desc";
6
- type?: string;
7
- sortFn?: ((record: T) => unknown) | string | Array<((record: T) => unknown) | string>;
8
- getValueToFilterOn?: (record: T) => unknown;
9
- };
10
- export type OrderBy = OrderByClause | OrderByClause[] | Record<string, "asc" | "desc">;
11
- export {};
@@ -1,4 +0,0 @@
1
- import { Field } from './Field';
2
- export type Schema = {
3
- fields: Field[];
4
- };
@@ -1 +0,0 @@
1
- export function useDeepEqualMemo(value: any): undefined;
@@ -1,29 +0,0 @@
1
- export function useHotKeysWrapper({ change, entities, entitiesUndoRedoStack, formatAndValidateEntities, handleCopySelectedRows, isCellEditable, isEntityDisabled, isSingleSelect, noDeselectAll, noSelect, onDeselect, onMultiRowSelect, onRowSelect, onSingleRowSelect, primarySelectedCellId, reduxFormCellValidation, reduxFormSelectedEntityIdMap, schema, selectedCells, setEntitiesUndoRedoStack, setNoVirtual, setSelectedCells, startCellEdit, tableRef, updateEntitiesHelper, updateValidation, waitUntilAllRowsAreRendered }: {
2
- change: any;
3
- entities: any;
4
- entitiesUndoRedoStack: any;
5
- formatAndValidateEntities: any;
6
- handleCopySelectedRows: any;
7
- isCellEditable: any;
8
- isEntityDisabled: any;
9
- isSingleSelect: any;
10
- noDeselectAll: any;
11
- noSelect: any;
12
- onDeselect: any;
13
- onMultiRowSelect: any;
14
- onRowSelect: any;
15
- onSingleRowSelect: any;
16
- primarySelectedCellId: any;
17
- reduxFormCellValidation: any;
18
- reduxFormSelectedEntityIdMap: any;
19
- schema: any;
20
- selectedCells: any;
21
- setEntitiesUndoRedoStack: any;
22
- setNoVirtual: any;
23
- setSelectedCells: any;
24
- startCellEdit: any;
25
- tableRef: any;
26
- updateEntitiesHelper: any;
27
- updateValidation: any;
28
- waitUntilAllRowsAreRendered: any;
29
- }): import('../../../../../node_modules/@blueprintjs/core').UseHotkeysReturnValue;
@@ -1,49 +0,0 @@
1
- /**
2
- * Note all these options can be passed at Design Time or at Runtime (like reduxForm())
3
- *
4
- * @export
5
- *
6
- * @param {compOrOpts} compOrOpts
7
- * @typedef {object} compOrOpts
8
- * @property {*string} formName - required unique identifier for the table
9
- * @property {Object | Function} schema - The data table schema or a function returning it. The function wll be called with props as the argument.
10
- * @property {boolean} urlConnected - whether the table should connect to/update the URL
11
- * @property {boolean} withSelectedEntities - whether or not to pass the selected entities
12
- * @property {boolean} isCodeModel - whether the model is keyed by code instead of id in the db
13
- * @property {object} defaults - tableParam defaults such as pageSize, filter, etc
14
- * @property {boolean} noOrderError - won't console an error if an order is not found on schema
15
- */
16
- export default function useTableParams(props: any): any;
17
- /**
18
- * Note all these options can be passed at Design Time or at Runtime (like reduxForm())
19
- */
20
- export type compOrOpts = {
21
- /**
22
- * } formName - required unique identifier for the table
23
- */
24
- string: any;
25
- /**
26
- * - The data table schema or a function returning it. The function wll be called with props as the argument.
27
- */
28
- schema: Object | Function;
29
- /**
30
- * - whether the table should connect to/update the URL
31
- */
32
- urlConnected: boolean;
33
- /**
34
- * - whether or not to pass the selected entities
35
- */
36
- withSelectedEntities: boolean;
37
- /**
38
- * - whether the model is keyed by code instead of id in the db
39
- */
40
- isCodeModel: boolean;
41
- /**
42
- * - tableParam defaults such as pageSize, filter, etc
43
- */
44
- defaults: object;
45
- /**
46
- * - won't console an error if an order is not found on schema
47
- */
48
- noOrderError: boolean;
49
- };