@vuu-ui/vuu-table-extras 4.0.0-alpha.2 → 4.0.0-alpha.21
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/package.json +18 -17
- package/src/calculated-column/CalculatedColumnPanel.js +2 -2
- package/src/calculated-column/useEditCalculatedColumn.js +1 -1
- package/src/cell-renderers/pct-progress-cell/PctProgressCell.css.js +2 -2
- package/src/cell-renderers/progress-cell/ProgressCell.css.js +2 -2
- package/src/column-expression-input/ColumnExpressionInput.css.js +5 -5
- package/src/column-expression-input/theme.js +1 -1
- package/src/column-expression-input/useColumnExpressionSuggestionProvider.js +2 -2
- package/src/column-formatting-settings/ColumnFormattingPanel.js +12 -9
- package/src/column-formatting-settings/DateTimeFormattingSettings.js +107 -3
- package/src/column-formatting-settings/LongTypeFormattingSettings.js +8 -3
- package/src/column-picker/ColumnModel.js +14 -25
- package/src/column-picker/ColumnPicker.css.js +0 -86
- package/src/column-picker/ColumnPicker.js +12 -180
- package/src/column-picker/useColumnPicker.js +28 -22
- package/src/column-settings-panel/ColumnNameLabel.css.js +1 -1
- package/src/csv-export/export-utils.js +76 -20
- package/src/csv-export/index.js +1 -1
- package/src/csv-export/useCsvExport.js +9 -1
- package/src/csv-upload/CsvUpload.css.js +36 -2
- package/src/csv-upload/CsvUpload.js +107 -63
- package/src/csv-upload/parse/csv-errors.js +1 -1
- package/src/csv-upload/parse/csv-parse.js +1 -1
- package/src/csv-upload/parse/csv-schema-validation.js +46 -7
- package/src/csv-upload/parse/csv-upload-utils.js +47 -2
- package/src/csv-upload/session/index.js +2 -0
- package/src/csv-upload/session/useImportSchema.js +44 -0
- package/src/csv-upload/session/useImportSession.js +204 -0
- package/src/csv-upload/useCsvUpload.js +54 -199
- package/src/freeze-control/FreezeControl.css.js +4 -4
- package/src/freeze-control/FrozenBanner.css.js +2 -2
- package/src/tabbed-table-config-panel/TabbedTableConfigPanel.js +17 -8
- package/src/tabbed-table-config-panel/useTabbedTableConfigPanel.js +1 -1
- package/src/table-footer/TableFooter.js +3 -3
- package/types/calculated-column/CalculatedColumnPanel.d.ts +3 -3
- package/types/cell-renderers/background-cell/BackgroundCell.d.ts +1 -1
- package/types/cell-renderers/background-cell/BackgroundCellConfigurationEditor.d.ts +1 -1
- package/types/cell-renderers/button-cell/IconButtonCell.d.ts +1 -1
- package/types/cell-renderers/dropdown-cell/DropdownCell.d.ts +1 -1
- package/types/cell-renderers/lookup-cell/LookupCell.d.ts +1 -1
- package/types/cell-renderers/pct-progress-cell/PctProgressCell.d.ts +1 -1
- package/types/column-expression-input/ColumnExpressionInput.d.ts +1 -1
- package/types/column-expression-input/column-language-parser/test.d.mts +1 -1
- package/types/column-formatting-settings/BaseNumericFormattingSettings.d.ts +1 -1
- package/types/column-formatting-settings/ColumnFormattingPanel.d.ts +1 -1
- package/types/column-formatting-settings/DateTimeFormattingSettings.d.ts +1 -1
- package/types/column-formatting-settings/LongTypeFormattingSettings.d.ts +1 -2
- package/types/column-menu/ColumnMenu.d.ts +1 -1
- package/types/column-picker/ColumnModel.d.ts +4 -3
- package/types/column-picker/ColumnPicker.d.ts +4 -6
- package/types/column-picker/ColumnPickerAction.d.ts +1 -1
- package/types/column-picker/useColumnPicker.d.ts +7 -10
- package/types/column-settings-panel/ColumnNameLabel.d.ts +1 -1
- package/types/column-settings-panel/ColumnSettingsPanel.d.ts +1 -1
- package/types/column-settings-panel/useColumnSettings.d.ts +3 -3
- package/types/csv-export/export-utils.d.ts +22 -9
- package/types/csv-export/index.d.ts +1 -1
- package/types/csv-export/useCsvExport.d.ts +5 -2
- package/types/csv-upload/CsvUpload.d.ts +2 -6
- package/types/csv-upload/data-upload-preview/DataUploadPreview.d.ts +1 -1
- package/types/csv-upload/parse/csv-errors.d.ts +1 -1
- package/types/csv-upload/parse/csv-schema-validation.d.ts +8 -2
- package/types/csv-upload/parse/csv-upload-utils.d.ts +9 -0
- package/types/csv-upload/session/index.d.ts +2 -0
- package/types/csv-upload/session/useImportSchema.d.ts +13 -0
- package/types/csv-upload/session/useImportSession.d.ts +26 -0
- package/types/csv-upload/useCsvUpload.d.ts +3 -3
- package/types/datasource-stats/DatasourceStats.d.ts +1 -1
- package/types/freeze-control/FreezeControl.d.ts +1 -1
- package/types/freeze-control/FrozenBanner.d.ts +1 -1
- package/types/index.d.ts +0 -1
- package/types/inline-add-row/InlineAddRow.d.ts +1 -1
- package/types/inline-add-row/useInlineAddRow.d.ts +2 -1
- package/types/tabbed-table-config-panel/TabbedTableConfigPanel.d.ts +1 -1
- package/types/tabbed-table-config-panel/TabbedTableSettingsAction.d.ts +1 -1
- package/types/tabbed-table-config-panel/useTabbedTableConfigPanel.d.ts +4 -3
- package/types/table-footer/TableFooter.d.ts +4 -4
- package/types/table-provider/TableProvider.d.ts +1 -1
- package/types/table-settings-panel/TableSettingsPanel.d.ts +1 -1
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import type { CopyOption, DataSource, SessionDataSourceOverrides } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { ColumnDescriptor, RowAccessor } from "@vuu-ui/vuu-table-types";
|
|
3
|
+
export type { RowAccessor };
|
|
4
|
+
export type ExportServerColumnDescriptor = Omit<ColumnDescriptor, "source" | "exportFormatter"> & {
|
|
5
|
+
name: string;
|
|
6
|
+
source?: "server";
|
|
5
7
|
label?: string;
|
|
6
|
-
|
|
8
|
+
exportable?: boolean;
|
|
9
|
+
exportFormatter?: (value: unknown, row: RowAccessor) => string;
|
|
7
10
|
};
|
|
8
|
-
export
|
|
11
|
+
export type ExportClientColumnDescriptor = Omit<ColumnDescriptor, "source" | "exportFormatter"> & {
|
|
12
|
+
name: string;
|
|
13
|
+
source: "client";
|
|
14
|
+
label?: string;
|
|
15
|
+
exportable?: boolean;
|
|
16
|
+
exportFormatter: (value: unknown, row: RowAccessor) => string;
|
|
17
|
+
};
|
|
18
|
+
export type ExportColumnDescriptor = ExportServerColumnDescriptor | ExportClientColumnDescriptor;
|
|
19
|
+
export interface ExportToCsvOptions {
|
|
9
20
|
filename?: string;
|
|
10
21
|
copyOption?: CopyOption;
|
|
11
22
|
excludeColumns?: string[];
|
|
12
23
|
maxRows?: number;
|
|
13
|
-
columnDescriptors?: ExportColumnDescriptor
|
|
24
|
+
columnDescriptors?: readonly (ExportColumnDescriptor | ColumnDescriptor)[];
|
|
25
|
+
columns?: readonly (string | ExportColumnDescriptor | ColumnDescriptor)[];
|
|
14
26
|
overrides?: SessionDataSourceOverrides;
|
|
15
27
|
/** Timeout in milliseconds before the export times out. Default: 30_000ms (0 to disable). */
|
|
16
28
|
timeout?: number;
|
|
@@ -20,13 +32,14 @@ export interface ExportToCsvOptions<TName extends string = string> {
|
|
|
20
32
|
export interface ExportCsvTemplateOptions {
|
|
21
33
|
filename?: string;
|
|
22
34
|
excludeColumns?: string[];
|
|
23
|
-
columns?: string[];
|
|
35
|
+
columns?: readonly (string | ColumnDescriptor)[];
|
|
24
36
|
overrides?: SessionDataSourceOverrides;
|
|
25
37
|
/** Timeout in milliseconds before template generation times out. Default: 10_000ms (0 to disable). */
|
|
26
38
|
timeout?: number;
|
|
27
39
|
onError?: (error: Error) => void;
|
|
28
40
|
onSuccess?: () => void;
|
|
29
41
|
}
|
|
42
|
+
export declare const isExportableColumn: (descriptor?: ExportColumnDescriptor | ColumnDescriptor) => boolean;
|
|
30
43
|
/** Downloads a single-row CSV containing only the column headers, for use as an import template. */
|
|
31
44
|
export declare const exportCsvTemplate: (dataSource: DataSource, options?: ExportCsvTemplateOptions) => Promise<void>;
|
|
32
45
|
/**
|
|
@@ -35,8 +48,8 @@ export declare const exportCsvTemplate: (dataSource: DataSource, options?: Expor
|
|
|
35
48
|
* then triggers a browser download. The session data source is unsubscribed automatically once the download
|
|
36
49
|
* is initiated.
|
|
37
50
|
*/
|
|
38
|
-
export declare const exportSessionTableToCsv:
|
|
51
|
+
export declare const exportSessionTableToCsv: (dataSource: DataSource, options?: ExportToCsvOptions) => Promise<void>;
|
|
39
52
|
/**
|
|
40
53
|
* Creates an export session table from `dataSource`, collects all rows in memory, then triggers a CSV download.
|
|
41
54
|
*/
|
|
42
|
-
export declare const exportToCsv:
|
|
55
|
+
export declare const exportToCsv: (dataSource: DataSource, options?: ExportToCsvOptions) => Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { exportCsvTemplate, exportSessionTableToCsv, exportToCsv, type ExportColumnDescriptor, type ExportCsvTemplateOptions, type ExportToCsvOptions, } from "./export-utils";
|
|
1
|
+
export { exportCsvTemplate, exportSessionTableToCsv, exportToCsv, isExportableColumn, type ExportClientColumnDescriptor, type ExportColumnDescriptor, type ExportCsvTemplateOptions, type ExportServerColumnDescriptor, type ExportToCsvOptions, type RowAccessor, } from "./export-utils";
|
|
2
2
|
export { useCsvExport, type UseCsvExportProps, type UseCsvExportResult, } from "./useCsvExport";
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { DataSource } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import {
|
|
2
|
+
import type { ColumnDescriptor, TableConfig } from "@vuu-ui/vuu-table-types";
|
|
3
|
+
import { type ExportColumnDescriptor, type ExportCsvTemplateOptions, type ExportToCsvOptions } from "./export-utils";
|
|
3
4
|
export interface UseCsvExportProps {
|
|
4
5
|
dataSource?: DataSource;
|
|
6
|
+
tableConfig?: TableConfig;
|
|
7
|
+
columns?: readonly (string | ExportColumnDescriptor | ColumnDescriptor)[];
|
|
5
8
|
onError?: (error: Error) => void;
|
|
6
9
|
onSuccess?: () => void;
|
|
7
10
|
}
|
|
8
11
|
export interface UseCsvExportResult {
|
|
9
12
|
isExporting: boolean;
|
|
10
13
|
error: Error | null;
|
|
11
|
-
exportCsv:
|
|
14
|
+
exportCsv: (options?: ExportToCsvOptions, overrideDataSource?: DataSource) => Promise<void>;
|
|
12
15
|
exportTemplate: (options?: ExportCsvTemplateOptions, overrideDataSource?: DataSource) => Promise<void>;
|
|
13
16
|
}
|
|
14
17
|
export declare function useCsvExport(propsOrDataSource?: DataSource | UseCsvExportProps): UseCsvExportResult;
|
|
@@ -46,7 +46,7 @@ export interface CsvUploadProps {
|
|
|
46
46
|
importSchema?: TableSchema;
|
|
47
47
|
/** Expected import table, used to validate the session table returned by the server. */
|
|
48
48
|
importTable?: VuuTable;
|
|
49
|
-
|
|
49
|
+
onImportSessionReady?: (dataSource: DataSource) => void;
|
|
50
50
|
onImportSessionEnded?: (result: CsvUploadSessionEndResult) => void;
|
|
51
51
|
onError?: (result: CsvUploadErrorResult | undefined) => void;
|
|
52
52
|
onImported?: (result: CsvUploadImportedResult) => void;
|
|
@@ -61,9 +61,5 @@ export interface CsvUploadProps {
|
|
|
61
61
|
importMode?: "direct" | "preview";
|
|
62
62
|
rowDefaults?: RowDefaultDataItemValues;
|
|
63
63
|
validators?: Record<string, CsvColumnValidator>;
|
|
64
|
-
/**
|
|
65
|
-
* Custom renderer for the error panel.
|
|
66
|
-
*/
|
|
67
|
-
renderError?: (error: CsvUploadErrorResult) => ReactNode;
|
|
68
64
|
}
|
|
69
|
-
export declare const CsvUpload: (props: CsvUploadProps) => import("react").JSX.Element;
|
|
65
|
+
export declare const CsvUpload: (props: CsvUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,4 +7,4 @@ export interface DataUploadPreviewProps extends Omit<HTMLAttributes<HTMLDivEleme
|
|
|
7
7
|
saveLabel?: string;
|
|
8
8
|
tableSchema: TableSchema;
|
|
9
9
|
}
|
|
10
|
-
export declare const DataUploadPreview: ({ className, editSession, onClose, saveLabel, tableSchema, ...htmlAttributes }: DataUploadPreviewProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const DataUploadPreview: ({ className, editSession, onClose, saveLabel, tableSchema, ...htmlAttributes }: DataUploadPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,7 +11,7 @@ export declare enum CsvValidationErrorEnum {
|
|
|
11
11
|
MISSING_KEY_COLUMN = "MISSING_KEY_COLUMN",
|
|
12
12
|
UNKNOWN_COLUMN = "UNKNOWN_COLUMN",
|
|
13
13
|
MAX_ROWS_EXCEEDED = "MAX_ROWS_EXCEEDED",
|
|
14
|
-
|
|
14
|
+
REQUIRED_FIELD_MISSING = "REQUIRED_FIELD_MISSING",
|
|
15
15
|
TYPE_MISMATCH = "TYPE_MISMATCH",
|
|
16
16
|
CUSTOM_VALIDATION = "CUSTOM_VALIDATION"
|
|
17
17
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import type { TableSchema } from "@vuu-ui/vuu-data-types";
|
|
1
|
+
import type { TableSchema, SchemaColumn } from "@vuu-ui/vuu-data-types";
|
|
2
2
|
import type { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
3
3
|
import type { CsvValidationError, CsvValidationErrorMap, CsvParseError } from "./csv-errors";
|
|
4
4
|
import type { CsvParseResult } from "./csv-parse";
|
|
5
5
|
export { CsvValidationErrorEnum, type CsvValidationError, type CsvValidationErrorMap, type CsvValidationErrorType, type CsvValidationStructuredError, } from "./csv-errors";
|
|
6
|
+
export interface ImportSchemaColumn extends SchemaColumn {
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ImportTableSchema extends Omit<TableSchema, "columns"> {
|
|
10
|
+
readonly columns: readonly ImportSchemaColumn[];
|
|
11
|
+
}
|
|
6
12
|
export type CsvColumnValidator = (value: string, columnName: string, row: Record<string, string>) => boolean | string;
|
|
7
13
|
export type CsvValidationResult = {
|
|
8
14
|
columns: string[];
|
|
@@ -15,4 +21,4 @@ export type CsvValidationOptions = {
|
|
|
15
21
|
maxRows?: number;
|
|
16
22
|
validators?: Record<string, CsvColumnValidator>;
|
|
17
23
|
};
|
|
18
|
-
export declare const validateCsvAgainstSchema: (parsed: CsvParseResult, tableSchema: TableSchema, options?: CsvValidationOptions) => CsvValidationResult;
|
|
24
|
+
export declare const validateCsvAgainstSchema: (parsed: CsvParseResult, tableSchema: TableSchema | ImportTableSchema, options?: CsvValidationOptions) => CsvValidationResult;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
import type { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
3
|
import type { CsvUploadError } from "../CsvUpload";
|
|
3
4
|
import type { CsvParseError } from "./csv-parse";
|
|
4
5
|
import type { CsvValidationError, CsvValidationResult } from "./csv-schema-validation";
|
|
@@ -19,3 +20,11 @@ export type RpcBatchResult = {
|
|
|
19
20
|
results: unknown[];
|
|
20
21
|
};
|
|
21
22
|
export declare const executeBatchRpcCalls: <T>(items: T[], executor: (item: T) => Promise<unknown>, errorFormatter: (item: T, error: string) => string) => Promise<RpcBatchResult>;
|
|
23
|
+
export type SessionRowError = {
|
|
24
|
+
rowNum: number;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
export type SessionRowUpdateListener = () => void;
|
|
28
|
+
export declare const getInlineRowErrorMessage: (result: unknown) => string | undefined;
|
|
29
|
+
export declare const getRowVuuMsgError: (row: DataSourceRow, vuuMsgDataIndex: number, vuuRowNumDataIndex: number) => SessionRowError | undefined;
|
|
30
|
+
export declare const waitForSessionErrors: (isRemote: boolean, sessionErrors: Map<string | number, SessionRowError>, receivedRowKeys: Set<string | number>, expectedRowCount: number, listeners: Set<SessionRowUpdateListener>, timeoutMs?: number) => Promise<SessionRowError[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DataSource, SessionDataSourceOverrides, TableSchema } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import type { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
+
export interface UseImportSchemaProps {
|
|
4
|
+
dataSource: DataSource;
|
|
5
|
+
importSchema?: TableSchema;
|
|
6
|
+
importTable?: VuuTable;
|
|
7
|
+
}
|
|
8
|
+
export interface UseImportSchemaResult {
|
|
9
|
+
resolvedImportSchema: TableSchema | undefined;
|
|
10
|
+
schema: TableSchema | undefined;
|
|
11
|
+
sessionOverrides: SessionDataSourceOverrides | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const useImportSchema: ({ dataSource, importSchema, importTable, }: UseImportSchemaProps) => UseImportSchemaResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DataSource, SessionDataSourceOverrides } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { EditSession, type RowDefaultDataItemValues } from "@vuu-ui/vuu-data-editing";
|
|
3
|
+
import { type RefObject } from "react";
|
|
4
|
+
import type { CsvValidationResult } from "../parse/csv-schema-validation";
|
|
5
|
+
import { type SessionRowError } from "../parse/csv-upload-utils";
|
|
6
|
+
import type { CsvUploadSessionEndReason, CsvUploadSessionEndResult, CsvUploadSessionTable } from "../CsvUpload";
|
|
7
|
+
export interface UseImportSessionProps {
|
|
8
|
+
dataSource: DataSource;
|
|
9
|
+
sessionOverrides?: SessionDataSourceOverrides;
|
|
10
|
+
rowDefaults?: RowDefaultDataItemValues;
|
|
11
|
+
processingPromiseRef?: RefObject<Promise<void> | undefined>;
|
|
12
|
+
onImportSessionEnded?: (result: CsvUploadSessionEndResult) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface UseImportSessionReturn {
|
|
15
|
+
addAllRows: (mergedValidation: CsvValidationResult, isCancelled: () => boolean) => Promise<number | false>;
|
|
16
|
+
beginEditSession: () => Promise<DataSource>;
|
|
17
|
+
checkSessionTableErrors: (sessionDs: DataSource, expectedRowCount: number) => Promise<SessionRowError[]>;
|
|
18
|
+
closePendingEditSession: (save: boolean) => Promise<void>;
|
|
19
|
+
editSession: EditSession;
|
|
20
|
+
endEditSessionAndNotify: (save: boolean, reason: CsvUploadSessionEndReason) => Promise<void>;
|
|
21
|
+
releaseEditSessionOwnership: () => void;
|
|
22
|
+
sessionDataSourceRef: React.MutableRefObject<DataSource | undefined>;
|
|
23
|
+
sessionTable: CsvUploadSessionTable | undefined;
|
|
24
|
+
setActiveSessionDataSource: (sessionDataSource?: DataSource) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const useImportSession: ({ dataSource, sessionOverrides, rowDefaults, processingPromiseRef, onImportSessionEnded, }: UseImportSessionProps) => UseImportSessionReturn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataSource, TableSchema } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import {
|
|
2
|
+
import type { RowDefaultDataItemValues } from "@vuu-ui/vuu-data-editing";
|
|
3
3
|
import type { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
4
4
|
import { type CsvParseOptions } from "./parse/csv-parse";
|
|
5
5
|
import { type CsvValidationResult, type CsvColumnValidator } from "./parse/csv-schema-validation";
|
|
@@ -17,7 +17,7 @@ export interface CsvUploadHookProps {
|
|
|
17
17
|
importTable?: VuuTable;
|
|
18
18
|
maxRows?: number;
|
|
19
19
|
onImportSessionEnded?: (result: CsvUploadSessionEndResult) => void;
|
|
20
|
-
|
|
20
|
+
onImportSessionReady?: (dataSource: DataSource) => void;
|
|
21
21
|
onError?: (result: CsvUploadErrorResult | undefined) => void;
|
|
22
22
|
onImported?: (result: CsvUploadImportedResult) => void;
|
|
23
23
|
onPreview?: (result: CsvUploadPreviewResult) => void;
|
|
@@ -40,4 +40,4 @@ export type UseCsvUploadReturn = {
|
|
|
40
40
|
validation: CsvValidationResult | undefined;
|
|
41
41
|
error: CsvUploadErrorResult | undefined;
|
|
42
42
|
};
|
|
43
|
-
export declare const useCsvUpload: ({ dataSource, importMode, importSchema, importTable, onImportSessionEnded,
|
|
43
|
+
export declare const useCsvUpload: ({ dataSource, importMode, importSchema, importTable, onImportSessionEnded, onImportSessionReady, onError, onImported, onPreview, onProcessingStarted, maxRows, parseOptions, rowDefaults, validators, }: CsvUploadHookProps) => UseCsvUploadReturn;
|
|
@@ -14,4 +14,4 @@ export interface DataSourceStatsProps extends DatasourceStatsHookProps, Omit<HTM
|
|
|
14
14
|
selectionActions?: ReactNode;
|
|
15
15
|
tooltrayActions?: ReactNode;
|
|
16
16
|
}
|
|
17
|
-
export declare const DataSourceStats: ({ children, className, dataSource, showRowStats, tooltrayActions, ...htmlAttributes }: DataSourceStatsProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const DataSourceStats: ({ children, className, dataSource, showRowStats, tooltrayActions, ...htmlAttributes }: DataSourceStatsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,4 +12,4 @@ export interface FreezeControlProps extends HTMLAttributes<HTMLDivElement>, Free
|
|
|
12
12
|
*/
|
|
13
13
|
flashDuration?: number;
|
|
14
14
|
}
|
|
15
|
-
export declare const FreezeControl: ({ dataSource, className, newItemsLabel, flashDuration, ...htmlAttributes }: FreezeControlProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const FreezeControl: ({ dataSource, className, newItemsLabel, flashDuration, ...htmlAttributes }: FreezeControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,4 +3,4 @@ import { DataSource } from "@vuu-ui/vuu-data-types";
|
|
|
3
3
|
export interface FrozenBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
dataSource: DataSource;
|
|
5
5
|
}
|
|
6
|
-
export declare const FrozenBanner: ({ dataSource, className, ...htmlAttributes }: FrozenBannerProps) => import("react").JSX.Element | null;
|
|
6
|
+
export declare const FrozenBanner: ({ dataSource, className, ...htmlAttributes }: FrozenBannerProps) => import("react/jsx-runtime").JSX.Element | null;
|
package/types/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { useColumnActions } from "./column-menu/useColumnActions";
|
|
|
11
11
|
export { ColumnChangeSource, ColumnModel, isColumnAdded, isColumnRemoved, isColumnsReordered, SelectedColumnChangeType, type ColumnEvents, type ColumnsChangeHandler, } from "./column-picker/ColumnModel";
|
|
12
12
|
export { ColumnPicker, type ColumnPickerProps, } from "./column-picker/ColumnPicker";
|
|
13
13
|
export { ColumnPickerAction } from "./column-picker/ColumnPickerAction";
|
|
14
|
-
export type { SelectedColumnsChangeHandler } from "./column-picker/useColumnPicker";
|
|
15
14
|
export { useTableColumnPicker } from "./column-picker/useTableColumnPicker";
|
|
16
15
|
export { ColumnSettingsPanel } from "./column-settings-panel/ColumnSettingsPanel";
|
|
17
16
|
export { useColumnSettings } from "./column-settings-panel/useColumnSettings";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { BaseRowProps } from "@vuu-ui/vuu-table-types";
|
|
2
2
|
export type InlineAddRowProps = BaseRowProps;
|
|
3
|
-
export declare const InlineAddRow: ({ ariaRowIndex, className, columns, style, }: InlineAddRowProps) => import("react").JSX.Element;
|
|
3
|
+
export declare const InlineAddRow: ({ ariaRowIndex, className, columns, style, }: InlineAddRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,8 @@ export declare const useInlineAddRow: ({ columns }: UseInlineAddRowProps) => {
|
|
|
16
16
|
allowColumnHeaderMenu?: false;
|
|
17
17
|
colHeaderContentRenderer?: string;
|
|
18
18
|
colHeaderLabelRenderer?: string;
|
|
19
|
-
|
|
19
|
+
exportable?: boolean;
|
|
20
|
+
exportFormatter?: (value: unknown, row: import("@vuu-ui/vuu-table-types").RowAccessor) => string;
|
|
20
21
|
getIcon?: (row: DataRow) => string | undefined;
|
|
21
22
|
groupable?: boolean;
|
|
22
23
|
hidden?: boolean;
|
|
@@ -13,5 +13,5 @@ export interface TabbedTableConfigPanelProps extends ColumnPickerProps, Pick<Tab
|
|
|
13
13
|
selectedTab?: TabName;
|
|
14
14
|
vuuTable?: VuuTable;
|
|
15
15
|
}
|
|
16
|
-
export declare const TabbedTableConfigPanel: ({ allowCreateCalculatedColumn, className, columnModel, config, onDisplayAttributeChange, selectedTab, vuuTable, ...htmlAttributes }: TabbedTableConfigPanelProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const TabbedTableConfigPanel: ({ allowCreateCalculatedColumn, className, columnModel, config, onDisplayAttributeChange, selectedTab, vuuTable, ...htmlAttributes }: TabbedTableConfigPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -4,4 +4,4 @@ import { TableDisplayAttributeChangeHandler } from "../table-settings-panel/Tabl
|
|
|
4
4
|
export interface TabbedTableSettingsActionProps extends Partial<IconButtonProps>, TabbedTableConfigPanelHookProps {
|
|
5
5
|
onDisplayAttributeChange: TableDisplayAttributeChangeHandler;
|
|
6
6
|
}
|
|
7
|
-
export declare const TabbedTableSettingsAction: ({ allowCreateCalculatedColumn, appearance, columnModel, config, icon, onDisplayAttributeChange, sentiment, vuuTable, ...IconButtonProps }: TabbedTableSettingsActionProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const TabbedTableSettingsAction: ({ allowCreateCalculatedColumn, appearance, columnModel, config, icon, onDisplayAttributeChange, sentiment, vuuTable, ...IconButtonProps }: TabbedTableSettingsActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
2
2
|
import { TableProps } from "@vuu-ui/vuu-table";
|
|
3
3
|
import { ColumnPickerProps } from "../column-picker/ColumnPicker";
|
|
4
|
-
import {
|
|
5
|
-
export interface TabbedTableConfigPanelHookProps extends Pick<ColumnPickerProps, "
|
|
4
|
+
import { TableSettingsPanelProps } from "../table-settings-panel/TableSettingsPanel";
|
|
5
|
+
export interface TabbedTableConfigPanelHookProps extends Pick<ColumnPickerProps, "columnModel">, Pick<TableSettingsPanelProps, "onDisplayAttributeChange">, Pick<TableProps, "config"> {
|
|
6
6
|
/**
|
|
7
7
|
* only required for calculated columns
|
|
8
8
|
*/
|
|
9
9
|
vuuTable?: VuuTable;
|
|
10
|
+
allowCreateCalculatedColumn?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const useTabbedTableConfigPanel: ({ allowCreateCalculatedColumn, columnModel, config, onDisplayAttributeChange, vuuTable, }: TabbedTableConfigPanelHookProps) => {
|
|
12
13
|
showTabbedTableConfigPanel: (title?: string) => void;
|
|
@@ -3,8 +3,8 @@ export interface TableFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3
3
|
onInvokeAction?: (action: string) => void;
|
|
4
4
|
tooltrayActions?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare const TableFooterTray: ({ children, position }: {
|
|
6
|
+
export declare const TableFooterTray: ({ children, position, }: {
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
position?:
|
|
9
|
-
}) => import("react").JSX.Element;
|
|
10
|
-
export declare const TableFooter: ({ children, className, onInvokeAction, tooltrayActions, ...htmlAttributes }: TableFooterProps) => import("react").JSX.Element;
|
|
8
|
+
position?: "center" | "end";
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const TableFooter: ({ children, className, onInvokeAction, tooltrayActions, ...htmlAttributes }: TableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ export interface TableContextProps extends Pick<TableProps, "dataSource" | "rowA
|
|
|
10
10
|
export declare const TableContext: import("react").Context<TableContextProps>;
|
|
11
11
|
export declare const TableProvider: ({ children, dataSource, menuActionHandler, rowActionHandlers, }: TableContextProps & {
|
|
12
12
|
children: ReactNode;
|
|
13
|
-
}) => import("react").JSX.Element;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare function useTableContext(throwIfNoDataSource?: boolean): {
|
|
15
15
|
dataSource: DataSource;
|
|
16
16
|
menuActionHandler: MenuActionHandler<ColumnMenuActionType, ColumnDescriptor>;
|
|
@@ -19,4 +19,4 @@ export interface TableSettingsPanelProps {
|
|
|
19
19
|
It updates the settings in state locally and notifies caller of
|
|
20
20
|
every change via onChange callback
|
|
21
21
|
*/
|
|
22
|
-
export declare const TableSettingsPanel: ({ onDisplayAttributeChange, tableDisplayAttributes: tableDisplayAttributesProp, permissions: permissionsProp, }: TableSettingsPanelProps) => import("react").JSX.Element;
|
|
22
|
+
export declare const TableSettingsPanel: ({ onDisplayAttributeChange, tableDisplayAttributes: tableDisplayAttributesProp, permissions: permissionsProp, }: TableSettingsPanelProps) => import("react/jsx-runtime").JSX.Element;
|