@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.
Files changed (69) hide show
  1. package/DataTable/ColumnFilterMenu.d.ts +14 -0
  2. package/DataTable/DropdownCell.d.ts +8 -0
  3. package/DataTable/EditabelCell.d.ts +10 -0
  4. package/DataTable/index.d.ts +0 -5
  5. package/DataTable/utils/formatPasteData.d.ts +5 -0
  6. package/DataTable/utils/getAllRows.d.ts +1 -0
  7. package/DataTable/utils/getCellCopyText.d.ts +1 -0
  8. package/DataTable/utils/getCellInfo.d.ts +17 -0
  9. package/DataTable/utils/getFieldPathToField.d.ts +1 -0
  10. package/DataTable/utils/getIdOrCodeOrIndex.d.ts +1 -2
  11. package/DataTable/utils/getLastSelectedEntity.d.ts +1 -0
  12. package/DataTable/utils/getNewEntToSelect.d.ts +6 -0
  13. package/DataTable/utils/getRowCopyText.d.ts +3 -0
  14. package/DataTable/utils/handleCopyColumn.d.ts +1 -0
  15. package/DataTable/utils/handleCopyHelper.d.ts +1 -0
  16. package/DataTable/utils/handleCopyRows.d.ts +5 -0
  17. package/DataTable/utils/index.d.ts +21 -0
  18. package/DataTable/utils/isBottomRightCornerOfRectangle.d.ts +8 -0
  19. package/DataTable/utils/isEntityClean.d.ts +1 -0
  20. package/DataTable/utils/removeCleanRows.d.ts +4 -0
  21. package/DataTable/utils/rowClick.d.ts +10 -2
  22. package/DataTable/utils/utils.d.ts +5 -0
  23. package/FormComponents/Uploader.d.ts +29 -1
  24. package/README.md +18 -0
  25. package/index.cjs.js +14320 -12997
  26. package/index.d.ts +2 -2
  27. package/index.es.js +14335 -13012
  28. package/package.json +5 -4
  29. package/src/DataTable/CellDragHandle.js +6 -7
  30. package/src/DataTable/ColumnFilterMenu.js +60 -0
  31. package/src/DataTable/DropdownCell.js +61 -0
  32. package/src/DataTable/EditabelCell.js +55 -0
  33. package/src/DataTable/PagingTool.js +1 -1
  34. package/src/DataTable/SortableColumns.js +53 -18
  35. package/src/DataTable/dataTableEnhancer.js +1 -1
  36. package/src/DataTable/index.js +385 -759
  37. package/src/DataTable/utils/formatPasteData.js +16 -0
  38. package/src/DataTable/utils/getAllRows.js +11 -0
  39. package/src/DataTable/utils/getCellCopyText.js +7 -0
  40. package/src/DataTable/utils/getCellInfo.js +36 -0
  41. package/src/DataTable/utils/getFieldPathToField.js +7 -0
  42. package/src/DataTable/utils/getIdOrCodeOrIndex.js +1 -1
  43. package/src/DataTable/utils/getLastSelectedEntity.js +11 -0
  44. package/src/DataTable/utils/getNewEntToSelect.js +25 -0
  45. package/src/DataTable/utils/getRowCopyText.js +28 -0
  46. package/src/DataTable/utils/handleCopyColumn.js +21 -0
  47. package/src/DataTable/utils/handleCopyHelper.js +15 -0
  48. package/src/DataTable/utils/handleCopyRows.js +23 -0
  49. package/src/DataTable/utils/index.js +51 -0
  50. package/src/DataTable/utils/isBottomRightCornerOfRectangle.js +20 -0
  51. package/src/DataTable/utils/isEntityClean.js +15 -0
  52. package/src/DataTable/utils/removeCleanRows.js +22 -0
  53. package/src/DataTable/utils/rowClick.js +7 -4
  54. package/src/DataTable/utils/selection.js +1 -1
  55. package/src/DataTable/utils/utils.js +37 -0
  56. package/src/DataTable/validateTableWideErrors.js +1 -1
  57. package/src/FillWindow.js +2 -3
  58. package/src/FormComponents/Uploader.js +400 -400
  59. package/src/FormComponents/tryToMatchSchemas.js +0 -6
  60. package/src/UploadCsvWizard.js +312 -371
  61. package/src/index.js +3 -3
  62. package/src/showDialogOnDocBody.js +5 -9
  63. package/src/useDialog.js +7 -4
  64. package/src/utils/menuUtils.js +3 -2
  65. package/src/utils/renderOnDoc.js +8 -5
  66. package/style.css +7 -7
  67. package/utils/menuUtils.d.ts +7 -0
  68. package/utils/renderOnDoc.d.ts +1 -1
  69. 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,8 @@
1
+ export function DropdownCell({ options, isMulti, initialValue, finishEdit, cancelEdit, dataTest }: {
2
+ options: any;
3
+ isMulti: any;
4
+ initialValue: any;
5
+ finishEdit: any;
6
+ cancelEdit: any;
7
+ dataTest: any;
8
+ }): 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;
@@ -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,5 @@
1
+ export function formatPasteData({ schema, newVal, path }: {
2
+ schema: any;
3
+ newVal: any;
4
+ path: any;
5
+ }): 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
- declare function _default(record: any, rowIndex: any): any;
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,6 @@
1
+ export function getNewEntToSelect({ type, lastSelectedIndex, entities, isEntityDisabled }: {
2
+ type: any;
3
+ lastSelectedIndex: any;
4
+ entities: any;
5
+ isEntityDisabled: any;
6
+ }): any;
@@ -0,0 +1,3 @@
1
+ export function getRowCopyText(rowEl: any, { specificColumn }?: {
2
+ specificColumn: any;
3
+ }): (string | any[])[];
@@ -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,5 @@
1
+ export function handleCopyRows(rowElsToCopy: any, { specificColumn, onFinishMsg, isDownload }?: {
2
+ specificColumn: any;
3
+ onFinishMsg: any;
4
+ isDownload: any;
5
+ }): any;
@@ -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;
@@ -0,0 +1,4 @@
1
+ export function removeCleanRows(reduxFormEntities: any, reduxFormCellValidation: any): {
2
+ entsToUse: any;
3
+ validationToUse: {};
4
+ };
@@ -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: any;
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;
@@ -0,0 +1,5 @@
1
+ export function getFieldPathToIndex(schema: any): {};
2
+ export function defaultParsePaste(str: any): any;
3
+ export function getEntityIdToEntity(entities: any): {};
4
+ export function getNumberStrAtEnd(str: any): any;
5
+ export function stripNumberAtEnd(str: any): any;
@@ -1,2 +1,30 @@
1
1
  export default Uploader;
2
- declare const Uploader: any;
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
+ ```