@oc-digital/react-component-library 9.0.0-beta.2 → 9.0.0-beta.20
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.
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V7 docs are not officially hosted anywhere anymore for react table v7
|
|
3
|
+
* it took a while but found someone self hosting them https://react-table-v7-docs.netlify.app/docs/api/useTable#column-options
|
|
4
|
+
*/
|
|
1
5
|
import React from "react";
|
|
2
6
|
import { IEditableTableProps } from "./EditableTable.types";
|
|
3
7
|
declare const EditableTable: React.FC<IEditableTableProps>;
|
|
@@ -6,28 +6,48 @@ export type RowData = {
|
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
};
|
|
8
8
|
export type ITableHeader = {
|
|
9
|
-
Header: string |
|
|
9
|
+
Header: string | JSX.Element;
|
|
10
|
+
accessor: string;
|
|
11
|
+
textAlign?: IAlignment;
|
|
12
|
+
stickyCell?: boolean;
|
|
13
|
+
shadedHeader?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type ITableHeaderComplexAccessor = {
|
|
16
|
+
Header: string | JSX.Element;
|
|
10
17
|
id: string;
|
|
11
|
-
accessor:
|
|
18
|
+
accessor: (originalRow: any, rowIndex: any) => any;
|
|
12
19
|
textAlign?: IAlignment;
|
|
13
20
|
stickyCell?: boolean;
|
|
21
|
+
shadedHeader?: boolean;
|
|
14
22
|
};
|
|
15
|
-
export type
|
|
16
|
-
Header: string |
|
|
23
|
+
export type IColumnsTableHeader = {
|
|
24
|
+
Header: string | JSX.Element;
|
|
25
|
+
textAlign?: IAlignment;
|
|
26
|
+
stickyCell?: boolean;
|
|
27
|
+
shadedHeaderGroup?: boolean;
|
|
28
|
+
accessor?: any;
|
|
29
|
+
columns: {
|
|
30
|
+
Header: string | JSX.Element;
|
|
31
|
+
shadedHeaderGroup?: boolean;
|
|
32
|
+
accessor: string;
|
|
33
|
+
textAlign?: IAlignment;
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
export type IColumnsTableHeaderComplexAccessor = {
|
|
37
|
+
Header: string | JSX.Element;
|
|
17
38
|
textAlign?: IAlignment;
|
|
18
39
|
stickyCell?: boolean;
|
|
19
40
|
shadedHeaderGroup?: boolean;
|
|
20
|
-
id: string;
|
|
21
41
|
accessor?: any;
|
|
22
42
|
columns: {
|
|
23
|
-
Header: string |
|
|
24
|
-
id
|
|
43
|
+
Header: string | JSX.Element;
|
|
44
|
+
id: string;
|
|
25
45
|
shadedHeaderGroup?: boolean;
|
|
26
|
-
accessor:
|
|
46
|
+
accessor: (originalRow: any, rowIndex: any) => any;
|
|
27
47
|
textAlign?: IAlignment;
|
|
28
48
|
}[];
|
|
29
49
|
};
|
|
30
|
-
export type ITableHeaders = ITableHeader |
|
|
50
|
+
export type ITableHeaders = ITableHeader | ITableHeaderComplexAccessor | IColumnsTableHeader | IColumnsTableHeaderComplexAccessor;
|
|
31
51
|
export type TableCellValues = null | undefined | string | number | Date | boolean | string[];
|
|
32
52
|
export type SynchCellWithStateFn = (rowIndex: number, columnId: string, value: TableCellValues, errorStatus: boolean, forceUpdate?: boolean, original?: RowData) => void;
|
|
33
53
|
export type FieldConfig = {
|
package/build/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import DatePicker from "./DatePicker/DatePicker";
|
|
|
17
17
|
import KeyboardDatePicker from "./KeyboardDatePicker/KeyboardDatePicker";
|
|
18
18
|
import ButtonWithConfirm from "./ButtonWithConfirm/ButtonWithConfirm";
|
|
19
19
|
import EditableTable from "./EditableTable/EditableTable";
|
|
20
|
-
import { FieldConfig, RowData, ITableHeader,
|
|
20
|
+
import { FieldConfig, RowData, ITableHeader, ITableHeaderComplexAccessor, IColumnsTableHeader, IColumnsTableHeaderComplexAccessor, ITableHeaders, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps } from "./EditableTable/EditableTable.types";
|
|
21
21
|
import { tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableCheckbox, TableSelect, TableMultipleSelect, NonEditableField } from "./EditableTable/defaultCells";
|
|
22
22
|
import { useDebounceEffect, useInterval, useWhyDidYouUpdate } from "./hooks";
|
|
23
23
|
import { didCellValueChange } from "./utils";
|
|
@@ -35,4 +35,4 @@ import { TableDateInput } from "./EditableTable/components/TableDateInput";
|
|
|
35
35
|
import { TableTextInput } from "./EditableTable/components/TableTextInput";
|
|
36
36
|
import type { ITableTextInputProps } from "./EditableTable/components/TableTextInput";
|
|
37
37
|
export { ImageDisplayAndUpload, Alert, Button, ContentLabel, ContentBox, StaticTable, LoadingSpinner, Breadcrumbs, EntityList, ErrorIndicator, LeftNavigation, MainLayout, SearchBar, TextField, Select, DatePicker, AutoSaveTextField, AutoSaveSelectField, KeyboardDatePicker, MobileDatePicker, ButtonWithConfirm, EditableTable, TableSelect, TableMultipleSelect, NonEditableField, TableDateInput as TableDatePicker, TableTextInput as TableTextField, tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableCheckbox, didCellValueChange, useDebounceEffect, useInterval, useWhyDidYouUpdate, AlphabeticalList, NumberFormatField, NavbarLayout, OptionalTooltip, FORM_SUCCESS, FORM_ERROR, FORM_LOADING, FORM_ENABLED, FORM_WARNING, FORM_DELETING, };
|
|
38
|
-
export type { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps, ISelectProps, IEntity, INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem, NavbarLayoutTabs, FormStatuses, ITableTextInputProps,
|
|
38
|
+
export type { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps, ISelectProps, IEntity, INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem, NavbarLayoutTabs, FormStatuses, ITableTextInputProps, ITableHeaderComplexAccessor, IColumnsTableHeader, IColumnsTableHeaderComplexAccessor, ITableHeaders, };
|