@teselagen/ui 0.4.13 → 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.
- package/DataTable/ColumnFilterMenu.d.ts +14 -0
- package/DataTable/DropdownCell.d.ts +8 -0
- package/DataTable/EditabelCell.d.ts +10 -0
- package/DataTable/index.d.ts +0 -5
- package/DataTable/utils/formatPasteData.d.ts +5 -0
- package/DataTable/utils/getAllRows.d.ts +1 -0
- package/DataTable/utils/getCellCopyText.d.ts +1 -0
- package/DataTable/utils/getCellInfo.d.ts +17 -0
- package/DataTable/utils/getFieldPathToField.d.ts +1 -0
- package/DataTable/utils/getIdOrCodeOrIndex.d.ts +1 -2
- package/DataTable/utils/getLastSelectedEntity.d.ts +1 -0
- package/DataTable/utils/getNewEntToSelect.d.ts +6 -0
- package/DataTable/utils/getRowCopyText.d.ts +3 -0
- package/DataTable/utils/handleCopyColumn.d.ts +1 -0
- package/DataTable/utils/handleCopyHelper.d.ts +1 -0
- package/DataTable/utils/handleCopyRows.d.ts +5 -0
- package/DataTable/utils/index.d.ts +21 -0
- package/DataTable/utils/isBottomRightCornerOfRectangle.d.ts +8 -0
- package/DataTable/utils/isEntityClean.d.ts +1 -0
- package/DataTable/utils/removeCleanRows.d.ts +4 -0
- package/DataTable/utils/rowClick.d.ts +10 -2
- package/DataTable/utils/utils.d.ts +5 -0
- package/FormComponents/Uploader.d.ts +29 -1
- package/README.md +18 -0
- package/index.cjs.js +14320 -12997
- package/index.d.ts +2 -2
- package/index.es.js +14335 -13012
- package/package.json +5 -4
- package/src/DataTable/CellDragHandle.js +6 -7
- package/src/DataTable/ColumnFilterMenu.js +60 -0
- package/src/DataTable/DropdownCell.js +61 -0
- package/src/DataTable/EditabelCell.js +55 -0
- package/src/DataTable/PagingTool.js +1 -1
- package/src/DataTable/SortableColumns.js +53 -18
- package/src/DataTable/dataTableEnhancer.js +1 -1
- package/src/DataTable/index.js +385 -759
- package/src/DataTable/utils/formatPasteData.js +16 -0
- package/src/DataTable/utils/getAllRows.js +11 -0
- package/src/DataTable/utils/getCellCopyText.js +7 -0
- package/src/DataTable/utils/getCellInfo.js +36 -0
- package/src/DataTable/utils/getFieldPathToField.js +7 -0
- package/src/DataTable/utils/getIdOrCodeOrIndex.js +1 -1
- package/src/DataTable/utils/getLastSelectedEntity.js +11 -0
- package/src/DataTable/utils/getNewEntToSelect.js +25 -0
- package/src/DataTable/utils/getRowCopyText.js +28 -0
- package/src/DataTable/utils/handleCopyColumn.js +21 -0
- package/src/DataTable/utils/handleCopyHelper.js +15 -0
- package/src/DataTable/utils/handleCopyRows.js +23 -0
- package/src/DataTable/utils/index.js +51 -0
- package/src/DataTable/utils/isBottomRightCornerOfRectangle.js +20 -0
- package/src/DataTable/utils/isEntityClean.js +15 -0
- package/src/DataTable/utils/removeCleanRows.js +22 -0
- package/src/DataTable/utils/rowClick.js +7 -4
- package/src/DataTable/utils/selection.js +1 -1
- package/src/DataTable/utils/utils.js +37 -0
- package/src/DataTable/validateTableWideErrors.js +1 -1
- package/src/FillWindow.js +2 -3
- package/src/FormComponents/Uploader.js +400 -400
- package/src/FormComponents/tryToMatchSchemas.js +0 -6
- package/src/UploadCsvWizard.js +312 -371
- package/src/index.js +3 -3
- package/src/showDialogOnDocBody.js +5 -9
- package/src/useDialog.js +7 -4
- package/src/utils/menuUtils.js +3 -2
- package/src/utils/renderOnDoc.js +8 -5
- package/style.css +7 -7
- package/utils/menuUtils.d.ts +7 -0
- package/utils/renderOnDoc.d.ts +1 -1
- package/src/ExcelCell.js +0 -38
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function ColumnFilterMenu({ addFilters, compact, currentFilter, currentParams, dataType, extraCompact, filterActiveForColumn, FilterMenu, filterOn, removeSingleFilter, schemaForField, setNewParams }: {
|
|
2
|
+
addFilters: any;
|
|
3
|
+
compact: any;
|
|
4
|
+
currentFilter: any;
|
|
5
|
+
currentParams: any;
|
|
6
|
+
dataType: any;
|
|
7
|
+
extraCompact: any;
|
|
8
|
+
filterActiveForColumn: any;
|
|
9
|
+
FilterMenu: any;
|
|
10
|
+
filterOn: any;
|
|
11
|
+
removeSingleFilter: any;
|
|
12
|
+
schemaForField: any;
|
|
13
|
+
setNewParams: any;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function EditableCell({ cancelEdit, dataTest, finishEdit, initialValue, isEditableCellInitialValue, isNumeric, shouldSelectAll, stopSelectAll }: {
|
|
2
|
+
cancelEdit: any;
|
|
3
|
+
dataTest: any;
|
|
4
|
+
finishEdit: any;
|
|
5
|
+
initialValue: any;
|
|
6
|
+
isEditableCellInitialValue: any;
|
|
7
|
+
isNumeric: any;
|
|
8
|
+
shouldSelectAll: any;
|
|
9
|
+
stopSelectAll: any;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/DataTable/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export function isEntityClean(e: any): boolean;
|
|
2
|
-
export function removeCleanRows(reduxFormEntities: any, reduxFormCellValidation: any): {
|
|
3
|
-
entsToUse: any;
|
|
4
|
-
validationToUse: {};
|
|
5
|
-
};
|
|
6
1
|
export default WrappedDT;
|
|
7
2
|
declare const WrappedDT: any;
|
|
8
3
|
export const ConnectedPagingTool: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getAllRows(e: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getCellCopyText(cellWrapper: any): any[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function getCellInfo({ columnIndex, columnPath, rowId, schema, entities, rowIndex, isEntityDisabled, entity }: {
|
|
2
|
+
columnIndex: any;
|
|
3
|
+
columnPath: any;
|
|
4
|
+
rowId: any;
|
|
5
|
+
schema: any;
|
|
6
|
+
entities: any;
|
|
7
|
+
rowIndex: any;
|
|
8
|
+
isEntityDisabled: any;
|
|
9
|
+
entity: any;
|
|
10
|
+
}): {
|
|
11
|
+
cellId: string;
|
|
12
|
+
cellIdAbove: any;
|
|
13
|
+
cellIdToRight: any;
|
|
14
|
+
cellIdBelow: any;
|
|
15
|
+
cellIdToLeft: any;
|
|
16
|
+
rowDisabled: any;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getFieldPathToField(schema: any): {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default _default;
|
|
1
|
+
export function getIdOrCodeOrIndex(record: any, rowIndex: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getLastSelectedEntity(idMap: any): undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function handleCopyColumn(e: any, cellWrapper: any, selectedRecords: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function handleCopyHelper(stringToCopy: any, jsonToCopy: any, message: any): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as computePresets } from './computePresets';
|
|
2
|
+
import { defaultParsePaste, getEntityIdToEntity, getFieldPathToIndex, getNumberStrAtEnd, stripNumberAtEnd } from './utils';
|
|
3
|
+
import { formatPasteData } from './formatPasteData';
|
|
4
|
+
import { getAllRows } from './getAllRows';
|
|
5
|
+
import { getCellCopyText } from './getCellCopyText';
|
|
6
|
+
import { getCellInfo } from './getCellInfo';
|
|
7
|
+
import { getFieldPathToField } from './getFieldPathToField';
|
|
8
|
+
import { getIdOrCodeOrIndex } from './getIdOrCodeOrIndex';
|
|
9
|
+
import { getLastSelectedEntity } from './getLastSelectedEntity';
|
|
10
|
+
import { getNewEntToSelect } from './getNewEntToSelect';
|
|
11
|
+
import { getRecordsFromIdMap } from './withSelectedEntities';
|
|
12
|
+
import { getRowCopyText } from './getRowCopyText';
|
|
13
|
+
import { getSelectedRowsFromEntities } from './selection';
|
|
14
|
+
import { handleCopyColumn } from './handleCopyColumn';
|
|
15
|
+
import { handleCopyHelper } from './handleCopyHelper';
|
|
16
|
+
import { handleCopyRows } from './handleCopyRows';
|
|
17
|
+
import { isBottomRightCornerOfRectangle } from './isBottomRightCornerOfRectangle';
|
|
18
|
+
import { isEntityClean } from './isEntityClean';
|
|
19
|
+
import { removeCleanRows } from './removeCleanRows';
|
|
20
|
+
|
|
21
|
+
export { computePresets, defaultParsePaste, formatPasteData, getAllRows, getCellCopyText, getCellInfo, getEntityIdToEntity, getFieldPathToIndex, getFieldPathToField, getIdOrCodeOrIndex, getLastSelectedEntity, getNewEntToSelect, getNumberStrAtEnd, getRecordsFromIdMap, getRowCopyText, getSelectedRowsFromEntities, handleCopyColumn, handleCopyHelper, handleCopyRows, isBottomRightCornerOfRectangle, isEntityClean, removeCleanRows, stripNumberAtEnd };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function isBottomRightCornerOfRectangle({ cellId, selectionGrid, lastRowIndex, lastCellIndex, entityMap, pathToIndex }: {
|
|
2
|
+
cellId: any;
|
|
3
|
+
selectionGrid: any;
|
|
4
|
+
lastRowIndex: any;
|
|
5
|
+
lastCellIndex: any;
|
|
6
|
+
entityMap: any;
|
|
7
|
+
pathToIndex: any;
|
|
8
|
+
}): boolean | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function isEntityClean(e: any): boolean;
|
|
@@ -4,8 +4,16 @@ export function changeSelectedEntities({ idMap, entities, change }: {
|
|
|
4
4
|
entities?: any[] | undefined;
|
|
5
5
|
change: any;
|
|
6
6
|
}): void;
|
|
7
|
-
export function finalizeSelection({ idMap, entities, props }: {
|
|
7
|
+
export function finalizeSelection({ idMap, entities, props: { onDeselect, onSingleRowSelect, onMultiRowSelect, noDeselectAll, onRowSelect, noSelect, change } }: {
|
|
8
8
|
idMap: any;
|
|
9
9
|
entities: any;
|
|
10
|
-
props:
|
|
10
|
+
props: {
|
|
11
|
+
onDeselect: any;
|
|
12
|
+
onSingleRowSelect: any;
|
|
13
|
+
onMultiRowSelect: any;
|
|
14
|
+
noDeselectAll: any;
|
|
15
|
+
onRowSelect: any;
|
|
16
|
+
noSelect: any;
|
|
17
|
+
change: any;
|
|
18
|
+
};
|
|
11
19
|
}): void;
|
|
@@ -1,2 +1,30 @@
|
|
|
1
1
|
export default Uploader;
|
|
2
|
-
declare
|
|
2
|
+
declare function Uploader({ accept: __accept, contentOverride: maybeContentOverride, innerIcon, innerText, action, className, minimal, validateAgainstSchema: _validateAgainstSchema, callout: _callout, fileLimit, readBeforeUpload, showUploadList, beforeUpload, fileList, onFileSuccess, onFieldSubmit, onRemove, onChange, onFileClick, dropzoneProps, overflowList, autoUnzip, disabled: _disabled, noBuildCsvOption, showFilesCount, threeDotMenuItems, onPreviewClick }: {
|
|
3
|
+
accept: any;
|
|
4
|
+
contentOverride: any;
|
|
5
|
+
innerIcon: any;
|
|
6
|
+
innerText: any;
|
|
7
|
+
action: any;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
minimal: any;
|
|
10
|
+
validateAgainstSchema: any;
|
|
11
|
+
callout: any;
|
|
12
|
+
fileLimit: any;
|
|
13
|
+
readBeforeUpload: any;
|
|
14
|
+
showUploadList?: boolean | undefined;
|
|
15
|
+
beforeUpload: any;
|
|
16
|
+
fileList: any;
|
|
17
|
+
onFileSuccess?: (() => Promise<void>) | undefined;
|
|
18
|
+
onFieldSubmit?: ((...args: any[]) => void) | undefined;
|
|
19
|
+
onRemove?: ((...args: any[]) => void) | undefined;
|
|
20
|
+
onChange?: ((...args: any[]) => void) | undefined;
|
|
21
|
+
onFileClick: any;
|
|
22
|
+
dropzoneProps?: {} | undefined;
|
|
23
|
+
overflowList: any;
|
|
24
|
+
autoUnzip: any;
|
|
25
|
+
disabled: any;
|
|
26
|
+
noBuildCsvOption: any;
|
|
27
|
+
showFilesCount: any;
|
|
28
|
+
threeDotMenuItems: any;
|
|
29
|
+
onPreviewClick: any;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/README.md
CHANGED
|
@@ -5,3 +5,21 @@ This library was generated with [Nx](https://nx.dev).
|
|
|
5
5
|
## Running unit tests
|
|
6
6
|
|
|
7
7
|
Run `nx test ui` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
8
|
+
|
|
9
|
+
## Installation (react)
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
yarn add @teselagen/ove react react-dom
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Running locally
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
nx run ui:start
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Publishing
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
nx run ui:publish
|
|
25
|
+
```
|