@teselagen/ui 0.5.23-beta.3 → 0.5.23-beta.30
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/DataTable/Columns.d.ts +51 -1
- package/DataTable/EditabelCell.d.ts +2 -3
- package/DataTable/EditableCell.d.ts +7 -0
- package/DataTable/RenderCell.d.ts +18 -0
- package/DataTable/utils/index.d.ts +2 -1
- package/DataTable/utils/queryParams.d.ts +7 -8
- package/DataTable/utils/useTableEntities.d.ts +5 -0
- package/DataTable/utils/withTableParams.d.ts +3 -16
- package/DataTable/viewColumn.d.ts +11 -4
- package/index.cjs.js +6873 -2660
- package/index.d.ts +2 -2
- package/index.es.js +6893 -2680
- package/package.json +5 -4
- package/src/DataTable/ColumnFilterMenu.js +7 -7
- package/src/DataTable/Columns.js +399 -520
- package/src/DataTable/Columns.jsx +945 -0
- package/src/DataTable/EditabelCell.js +1 -2
- package/src/DataTable/EditabelCell.jsx +44 -0
- package/src/DataTable/EditableCell.js +44 -0
- package/src/DataTable/FilterAndSortMenu.js +4 -2
- package/src/DataTable/RenderCell.js +191 -0
- package/src/DataTable/RenderCell.jsx +191 -0
- package/src/DataTable/SearchBar.js +2 -2
- package/src/DataTable/index.js +406 -391
- package/src/DataTable/utils/index.js +3 -1
- package/src/DataTable/utils/queryParams.js +68 -72
- package/src/DataTable/utils/useTableEntities.js +38 -0
- package/src/DataTable/utils/withTableParams.js +241 -214
- package/src/DataTable/viewColumn.js +5 -9
- package/src/FormComponents/index.js +85 -56
- package/src/TgSelect/index.js +2 -2
- package/src/enhancers/withDialog/tg_modalState.js +1 -0
- package/src/index.js +5 -2
package/DataTable/Columns.d.ts
CHANGED
|
@@ -1 +1,51 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function useColumns({ addFilters, cellRenderer, columns, currentParams, compact, editingCell, editingCellSelectAll, entities, expandedEntityIdMap, extraCompact, filters, formName, getCellHoverText, isCellEditable, isEntityDisabled, isLocalCall, isSimple, isSingleSelect, isSelectionARectangle, noDeselectAll, noSelect, noUserSelect, onDeselect, onMultiRowSelect, onRowClick, onRowSelect, onSingleRowSelect, order, primarySelectedCellId, reduxFormCellValidation, reduxFormSelectedEntityIdMap, refocusTable, removeSingleFilter, schema, selectedCells, setExpandedEntityIdMap, setNewParams, setOrder, setSelectedCells, shouldShowSubComponent, startCellEdit, SubComponent, tableRef, updateEntitiesHelper, updateValidation, withCheckboxes, withExpandAndCollapseAllButton, withFilter: _withFilter, withSort }: {
|
|
2
|
+
addFilters: any;
|
|
3
|
+
cellRenderer: any;
|
|
4
|
+
columns: any;
|
|
5
|
+
currentParams: any;
|
|
6
|
+
compact: any;
|
|
7
|
+
editingCell: any;
|
|
8
|
+
editingCellSelectAll: any;
|
|
9
|
+
entities: any;
|
|
10
|
+
expandedEntityIdMap: any;
|
|
11
|
+
extraCompact: any;
|
|
12
|
+
filters: any;
|
|
13
|
+
formName: any;
|
|
14
|
+
getCellHoverText: any;
|
|
15
|
+
isCellEditable: any;
|
|
16
|
+
isEntityDisabled: any;
|
|
17
|
+
isLocalCall: any;
|
|
18
|
+
isSimple: any;
|
|
19
|
+
isSingleSelect: any;
|
|
20
|
+
isSelectionARectangle: any;
|
|
21
|
+
noDeselectAll: any;
|
|
22
|
+
noSelect: any;
|
|
23
|
+
noUserSelect: any;
|
|
24
|
+
onDeselect: any;
|
|
25
|
+
onMultiRowSelect: any;
|
|
26
|
+
onRowClick: any;
|
|
27
|
+
onRowSelect: any;
|
|
28
|
+
onSingleRowSelect: any;
|
|
29
|
+
order: any;
|
|
30
|
+
primarySelectedCellId: any;
|
|
31
|
+
reduxFormCellValidation: any;
|
|
32
|
+
reduxFormSelectedEntityIdMap: any;
|
|
33
|
+
refocusTable: any;
|
|
34
|
+
removeSingleFilter?: ((...args: any[]) => void) | undefined;
|
|
35
|
+
schema: any;
|
|
36
|
+
selectedCells: any;
|
|
37
|
+
setExpandedEntityIdMap: any;
|
|
38
|
+
setNewParams: any;
|
|
39
|
+
setOrder?: ((...args: any[]) => void) | undefined;
|
|
40
|
+
setSelectedCells: any;
|
|
41
|
+
shouldShowSubComponent: any;
|
|
42
|
+
startCellEdit: any;
|
|
43
|
+
SubComponent: any;
|
|
44
|
+
tableRef: any;
|
|
45
|
+
updateEntitiesHelper: any;
|
|
46
|
+
updateValidation: any;
|
|
47
|
+
withCheckboxes: any;
|
|
48
|
+
withExpandAndCollapseAllButton: any;
|
|
49
|
+
withFilter: any;
|
|
50
|
+
withSort?: boolean | undefined;
|
|
51
|
+
}): any;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export function EditableCell({
|
|
2
|
-
value: any;
|
|
3
|
-
setValue: any;
|
|
1
|
+
export function EditableCell({ cancelEdit, dataTest, finishEdit, isNumeric, initialValue }: {
|
|
4
2
|
cancelEdit: any;
|
|
5
3
|
dataTest: any;
|
|
6
4
|
finishEdit: any;
|
|
7
5
|
isNumeric: any;
|
|
6
|
+
initialValue: any;
|
|
8
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function RenderCell({ oldFunc, getCopyTextForCell, column, isCellEditable, isEntityDisabled, finishCellEdit, formName, noEllipsis, cancelCellEdit, getCellHoverText, selectedCells, isSelectionARectangle, startCellEdit, tableRef, onDragEnd, args }: {
|
|
2
|
+
oldFunc: any;
|
|
3
|
+
getCopyTextForCell: any;
|
|
4
|
+
column: any;
|
|
5
|
+
isCellEditable: any;
|
|
6
|
+
isEntityDisabled: any;
|
|
7
|
+
finishCellEdit: any;
|
|
8
|
+
formName: any;
|
|
9
|
+
noEllipsis: any;
|
|
10
|
+
cancelCellEdit: any;
|
|
11
|
+
getCellHoverText: any;
|
|
12
|
+
selectedCells: any;
|
|
13
|
+
isSelectionARectangle: any;
|
|
14
|
+
startCellEdit: any;
|
|
15
|
+
tableRef: any;
|
|
16
|
+
onDragEnd: any;
|
|
17
|
+
args: any;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,5 +19,6 @@ import { isEntityClean } from './isEntityClean';
|
|
|
19
19
|
import { PRIMARY_SELECTED_VAL } from './primarySelectedValue';
|
|
20
20
|
import { removeCleanRows } from './removeCleanRows';
|
|
21
21
|
import { useDeepEqualMemo } from './useDeepEqualMemo';
|
|
22
|
+
import { useTableEntities } from './useTableEntities';
|
|
22
23
|
|
|
23
|
-
export { defaultParsePaste, formatPasteData, getAllRows, getCellCopyText, getCellInfo, getEntityIdToEntity, getFieldPathToIndex, getFieldPathToField, getIdOrCodeOrIndex, getLastSelectedEntity, getNewEntToSelect, getNumberStrAtEnd, getRecordsFromIdMap, getRowCopyText, getSelectedRowsFromEntities, handleCopyColumn, handleCopyHelper, handleCopyRows, handleCopyTable, isBottomRightCornerOfRectangle, isEntityClean, PRIMARY_SELECTED_VAL, removeCleanRows, stripNumberAtEnd, useDeepEqualMemo };
|
|
24
|
+
export { defaultParsePaste, formatPasteData, getAllRows, getCellCopyText, getCellInfo, getEntityIdToEntity, getFieldPathToIndex, getFieldPathToField, getIdOrCodeOrIndex, getLastSelectedEntity, getNewEntToSelect, getNumberStrAtEnd, getRecordsFromIdMap, getRowCopyText, getSelectedRowsFromEntities, handleCopyColumn, handleCopyHelper, handleCopyRows, handleCopyTable, isBottomRightCornerOfRectangle, isEntityClean, PRIMARY_SELECTED_VAL, removeCleanRows, stripNumberAtEnd, useDeepEqualMemo, useTableEntities };
|
|
@@ -11,19 +11,18 @@ export function getMergedOpts(topLevel?: {}, instanceLevel?: {}): {
|
|
|
11
11
|
export function getCCDisplayName(field: object): string;
|
|
12
12
|
export function getCurrentParamsFromUrl(location: any, isSimple: any): any;
|
|
13
13
|
export function setCurrentParamsOnUrl(newParams: any, replace: any, isSimple: any): void;
|
|
14
|
-
export function makeDataTableHandlers({ setNewParams,
|
|
14
|
+
export function makeDataTableHandlers({ setNewParams, defaults, onlyOneFilter }: {
|
|
15
15
|
setNewParams: any;
|
|
16
|
-
updateSearch: any;
|
|
17
16
|
defaults: any;
|
|
18
17
|
onlyOneFilter: any;
|
|
19
18
|
}): {
|
|
20
|
-
setSearchTerm: (searchTerm: any
|
|
21
|
-
addFilters: (newFilters: any
|
|
19
|
+
setSearchTerm: (searchTerm: any) => void;
|
|
20
|
+
addFilters: (newFilters: any) => void;
|
|
22
21
|
clearFilters: (additionalFilterKeys?: any[]) => void;
|
|
23
|
-
removeSingleFilter: (filterOn: any
|
|
24
|
-
setPageSize: (pageSize: any
|
|
25
|
-
setPage: (page: any
|
|
26
|
-
setOrder: (order: any, isRemove: any, shiftHeld: any
|
|
22
|
+
removeSingleFilter: (filterOn: any) => any;
|
|
23
|
+
setPageSize: (pageSize: any) => any;
|
|
24
|
+
setPage: (page: any) => void;
|
|
25
|
+
setOrder: (order: any, isRemove: any, shiftHeld: any) => any;
|
|
27
26
|
setNewParams: any;
|
|
28
27
|
};
|
|
29
28
|
export function getQueryParams({ currentParams, urlConnected, defaults, schema, isInfinite, entities, isLocalCall, additionalFilter, additionalOrFilter, doNotCoercePageSize, noOrderError, isCodeModel, ownProps }: {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 withTableParams(compOrOpts: compOrOpts, pTopLevelOpts: any): any;
|
|
1
|
+
export function useTableParams(props: any): any;
|
|
2
|
+
export default withTableParams;
|
|
17
3
|
/**
|
|
18
4
|
* Note all these options can be passed at Design Time or at Runtime (like reduxForm())
|
|
19
5
|
*/
|
|
@@ -47,3 +33,4 @@ export type compOrOpts = {
|
|
|
47
33
|
*/
|
|
48
34
|
noOrderError: boolean;
|
|
49
35
|
};
|
|
36
|
+
declare function withTableParams(topLevelOptions: any): any;
|
|
@@ -6,7 +6,14 @@ export namespace viewColumn {
|
|
|
6
6
|
let type: string;
|
|
7
7
|
function render(): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
9
|
+
export function openColumn({ onDoubleClick, history }: {
|
|
10
|
+
onDoubleClick: any;
|
|
11
|
+
history: any;
|
|
12
|
+
}): {
|
|
13
|
+
render: (val: any, record: any, rowInfo: any) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
width: number;
|
|
15
|
+
noEllipsis: boolean;
|
|
16
|
+
hideInMenu: boolean;
|
|
17
|
+
immovable: boolean;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|