@vuu-ui/vuu-table-extras 4.0.0-alpha.9 → 4.0.0-beta.2
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 -18
- 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/column-language-parser/column-expression-parse-utils.js +1 -1
- package/src/column-expression-input/theme.js +1 -1
- package/src/column-expression-input/useColumnExpressionEditor.js +1 -0
- 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 +3 -2
- package/src/column-picker/ColumnPicker.js +1 -3
- 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/data-upload-preview/DataUploadPreview.js +1 -1
- 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/table-footer/TableFooter.js +3 -3
- package/types/calculated-column/CalculatedColumnPanel.d.ts +1 -1
- 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/column-expression-parse-utils.d.ts +1 -1
- package/types/column-expression-input/column-language-parser/test.d.mts +1 -1
- package/types/column-expression-input/useColumnExpressionEditor.d.ts +4 -4
- 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/ColumnPicker.d.ts +4 -4
- package/types/column-picker/ColumnPickerAction.d.ts +1 -1
- package/types/column-settings-panel/ColumnNameLabel.d.ts +1 -1
- package/types/column-settings-panel/ColumnSettingsPanel.d.ts +1 -1
- 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/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 +5 -5
- package/types/tabbed-table-config-panel/TabbedTableSettingsAction.d.ts +1 -1
- 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
- package/types/src/calculated-column/CalculatedColumnPanel.d.ts +0 -12
- package/types/src/calculated-column/useCalculatedColumnPanel.d.ts +0 -10
- package/types/src/calculated-column/useEditCalculatedColumn.d.ts +0 -13
- package/types/src/cell-edit-validators/CaseValidator.d.ts +0 -2
- package/types/src/cell-edit-validators/PatternValidator.d.ts +0 -2
- package/types/src/cell-edit-validators/index.d.ts +0 -2
- package/types/src/cell-renderers/background-cell/BackgroundCell.d.ts +0 -2
- package/types/src/cell-renderers/background-cell/BackgroundCellConfigurationEditor.d.ts +0 -2
- package/types/src/cell-renderers/background-cell/index.d.ts +0 -2
- package/types/src/cell-renderers/background-cell/useDirection.d.ts +0 -3
- package/types/src/cell-renderers/button-cell/IconButtonCell.d.ts +0 -6
- package/types/src/cell-renderers/dropdown-cell/DropdownCell.d.ts +0 -2
- package/types/src/cell-renderers/dropdown-cell/index.d.ts +0 -1
- package/types/src/cell-renderers/index.d.ts +0 -6
- package/types/src/cell-renderers/lookup-cell/LookupCell.d.ts +0 -2
- package/types/src/cell-renderers/lookup-cell/index.d.ts +0 -1
- package/types/src/cell-renderers/pct-progress-cell/PctProgressCell.d.ts +0 -2
- package/types/src/cell-renderers/pct-progress-cell/index.d.ts +0 -1
- package/types/src/cell-renderers/progress-cell/ProgressCell.d.ts +0 -1
- package/types/src/cell-renderers/progress-cell/index.d.ts +0 -1
- package/types/src/column-expression-input/ColumnExpressionInput.d.ts +0 -10
- package/types/src/column-expression-input/column-function-descriptors.d.ts +0 -15
- package/types/src/column-expression-input/column-language-parser/ColumnExpressionLanguage.d.ts +0 -2
- package/types/src/column-expression-input/column-language-parser/ColumnExpressionTreeWalker.d.ts +0 -57
- package/types/src/column-expression-input/column-language-parser/column-expression-parse-utils.d.ts +0 -5
- package/types/src/column-expression-input/column-language-parser/generated/column-parser.d.ts +0 -2
- package/types/src/column-expression-input/column-language-parser/generated/column-parser.terms.d.ts +0 -1
- package/types/src/column-expression-input/column-language-parser/index.d.ts +0 -3
- package/types/src/column-expression-input/column-language-parser/test.d.mts +0 -1
- package/types/src/column-expression-input/functionDocInfo.d.ts +0 -2
- package/types/src/column-expression-input/highlighting.d.ts +0 -1
- package/types/src/column-expression-input/index.d.ts +0 -4
- package/types/src/column-expression-input/theme.d.ts +0 -1
- package/types/src/column-expression-input/useColumnAutoComplete.d.ts +0 -6
- package/types/src/column-expression-input/useColumnExpressionEditor.d.ts +0 -25
- package/types/src/column-expression-input/useColumnExpressionSuggestionProvider.d.ts +0 -8
- package/types/src/column-formatting-settings/BaseNumericFormattingSettings.d.ts +0 -2
- package/types/src/column-formatting-settings/ColumnFormattingPanel.d.ts +0 -9
- package/types/src/column-formatting-settings/DateTimeFormattingSettings.d.ts +0 -3
- package/types/src/column-formatting-settings/LongTypeFormattingSettings.d.ts +0 -3
- package/types/src/column-formatting-settings/index.d.ts +0 -3
- package/types/src/column-menu/ColumnMenu.d.ts +0 -10
- package/types/src/column-menu/column-action-types.d.ts +0 -11
- package/types/src/column-menu/column-menu-utils.d.ts +0 -19
- package/types/src/column-menu/useColumnActions.d.ts +0 -16
- package/types/src/column-picker/ColumnModel.d.ts +0 -81
- package/types/src/column-picker/ColumnPicker.d.ts +0 -10
- package/types/src/column-picker/ColumnPickerAction.d.ts +0 -5
- package/types/src/column-picker/useColumnPicker.d.ts +0 -16
- package/types/src/column-picker/useTableColumnPicker.d.ts +0 -7
- package/types/src/column-picker/useTableColumnPickerDeprecated.d.ts +0 -14
- package/types/src/column-settings-panel/ColumnNameLabel.d.ts +0 -7
- package/types/src/column-settings-panel/ColumnSettingsPanel.d.ts +0 -5
- package/types/src/column-settings-panel/useColumnSettings.d.ts +0 -30
- package/types/src/csv-export/export-utils.d.ts +0 -42
- package/types/src/csv-export/index.d.ts +0 -2
- package/types/src/csv-export/useCsvExport.d.ts +0 -14
- package/types/src/csv-upload/CsvUpload.d.ts +0 -69
- package/types/src/csv-upload/data-upload-preview/DataUploadPreview.d.ts +0 -10
- package/types/src/csv-upload/data-upload-preview/useDataUploadPreview.d.ts +0 -17
- package/types/src/csv-upload/index.d.ts +0 -7
- package/types/src/csv-upload/parse/csv-constants.d.ts +0 -3
- package/types/src/csv-upload/parse/csv-errors.d.ts +0 -47
- package/types/src/csv-upload/parse/csv-parse.d.ts +0 -11
- package/types/src/csv-upload/parse/csv-schema-validation.d.ts +0 -18
- package/types/src/csv-upload/parse/csv-upload-utils.d.ts +0 -21
- package/types/src/csv-upload/parse/index.d.ts +0 -5
- package/types/src/csv-upload/useCsvUpload.d.ts +0 -43
- package/types/src/datasource-stats/DatasourceStats.d.ts +0 -17
- package/types/src/datasource-stats/useDatasourceStats.d.ts +0 -15
- package/types/src/freeze-control/FreezeControl.d.ts +0 -15
- package/types/src/freeze-control/FrozenBanner.d.ts +0 -6
- package/types/src/freeze-control/freezeControlBadge.d.ts +0 -11
- package/types/src/freeze-control/useFreezeControl.d.ts +0 -10
- package/types/src/index.d.ts +0 -26
- package/types/src/inline-add-row/InlineAddRow.d.ts +0 -3
- package/types/src/inline-add-row/index.d.ts +0 -2
- package/types/src/inline-add-row/useInlineAddRow.d.ts +0 -59
- package/types/src/tabbed-table-config-panel/TabbedTableConfigPanel.d.ts +0 -17
- package/types/src/tabbed-table-config-panel/TabbedTableSettingsAction.d.ts +0 -7
- package/types/src/tabbed-table-config-panel/useTabbedTableConfigPanel.d.ts +0 -13
- package/types/src/table-footer/TableFooter.d.ts +0 -10
- package/types/src/table-provider/TableProvider.d.ts +0 -18
- package/types/src/table-settings-panel/TableSettingsPanel.d.ts +0 -22
- package/types/src/table-settings-panel/useTableSettings.d.ts +0 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Completion } from "@vuu-ui/vuu-codemirror";
|
|
2
|
+
import { FocusEventHandler } from "react";
|
|
3
|
+
import { ColumnExpressionInputProps } from "./ColumnExpressionInput";
|
|
4
4
|
export type ColumnExpressionOperator = "Times" | "Divide" | "Minus" | "Plus";
|
|
5
5
|
export type ColumnExpressionSuggestionType = "column" | "columnValue" | "expression" | "condition-operator" | "operator" | "relational-operator";
|
|
6
6
|
export type ColumnExpressionSuggestionOptions = {
|
|
@@ -19,7 +19,7 @@ export interface ExpressionSuggestionConsumer {
|
|
|
19
19
|
suggestionProvider: IExpressionSuggestionProvider;
|
|
20
20
|
}
|
|
21
21
|
export declare const useColumnExpressionEditor: ({ onChange, onSubmitExpression, source, suggestionProvider, }: ColumnExpressionInputProps) => {
|
|
22
|
-
editorRef: RefObject<HTMLDivElement | null>;
|
|
22
|
+
editorRef: import("react").RefObject<HTMLDivElement | null>;
|
|
23
23
|
clearInput: () => void;
|
|
24
24
|
onBlur: FocusEventHandler;
|
|
25
25
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FormattingSettingsProps } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
export declare const BaseNumericFormattingSettings: ({ column, onChangeFormatting: onChange, }: FormattingSettingsProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const BaseNumericFormattingSettings: ({ column, onChangeFormatting: onChange, }: FormattingSettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,4 @@ export interface ColumnFormattingPanelProps extends HTMLAttributes<HTMLDivElemen
|
|
|
6
6
|
column: ColumnDescriptor;
|
|
7
7
|
onChangeRendering: (renderProps: ColumnTypeRendering) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const ColumnFormattingPanel: ({ availableRenderers, className, column, onChangeFormatting, onChangeColumnType, onChangeRendering, ...htmlAttributes }: ColumnFormattingPanelProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const ColumnFormattingPanel: ({ availableRenderers, className, column, onChangeFormatting, onChangeColumnType, onChangeRendering, ...htmlAttributes }: ColumnFormattingPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { FormattingSettingsProps } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
|
|
3
|
-
export declare const LongTypeFormattingSettings: (props: FormattingSettingsProps) => React.JSX.Element;
|
|
2
|
+
export declare const LongTypeFormattingSettings: (props: FormattingSettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,4 +7,4 @@ export interface ColumnMenuProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
7
7
|
menuActionHandler?: MenuActionHandler<ColumnMenuActionType, ColumnDescriptor>;
|
|
8
8
|
menuPermissions?: ColumnMenuPermissions;
|
|
9
9
|
}
|
|
10
|
-
export declare const ColumnMenu: ({ className, column, menuActionHandler: menuActionHandlerProp, menuPermissions: { allowSort, allowGroup, allowAggregation, allowHide, allowRemove, allowPin, }, }: ColumnMenuProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const ColumnMenu: ({ className, column, menuActionHandler: menuActionHandlerProp, menuPermissions: { allowSort, allowGroup, allowAggregation, allowHide, allowRemove, allowPin, }, }: ColumnMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
import { ListBoxProps } from "@salt-ds/core";
|
|
4
|
+
import { ColumnPickerHookProps } from "./useColumnPicker";
|
|
5
5
|
export declare const classBaseListItem = "vuuColumnPickerListItem";
|
|
6
6
|
export interface ColumnPickerProps extends ColumnPickerHookProps, Pick<ListBoxProps<ColumnDescriptor>, "selected" | "onSelectionChange">, HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
}
|
|
@@ -2,4 +2,4 @@ import { IconButtonProps } from "@vuu-ui/vuu-ui-controls";
|
|
|
2
2
|
import { ColumnPickerHookProps } from "./useColumnPicker";
|
|
3
3
|
export interface ColumnPickerActionProps extends Partial<IconButtonProps>, ColumnPickerHookProps {
|
|
4
4
|
}
|
|
5
|
-
export declare const ColumnPickerAction: ({ appearance, columnModel, icon, sentiment, ...IconButtonProps }: ColumnPickerActionProps) => import("react").JSX.Element;
|
|
5
|
+
export declare const ColumnPickerAction: ({ appearance, columnModel, icon, sentiment, ...IconButtonProps }: ColumnPickerActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,4 +4,4 @@ export interface ColumnNameLabelProps {
|
|
|
4
4
|
column: ColumnDescriptor;
|
|
5
5
|
onClick?: MouseEventHandler;
|
|
6
6
|
}
|
|
7
|
-
export declare const ColumnNameLabel: ({ column, onClick }: ColumnNameLabelProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const ColumnNameLabel: ({ column, onClick }: ColumnNameLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,4 +2,4 @@ import { ColumnSettingsProps } from "./useColumnSettings";
|
|
|
2
2
|
export interface ColumnSettinsPanelProps extends ColumnSettingsProps {
|
|
3
3
|
onClickEditCalculatedColumn?: () => void;
|
|
4
4
|
}
|
|
5
|
-
export declare const ColumnSettingsPanel: ({ column: columnProp, columnModel, onClickEditCalculatedColumn, onConfigChange, }: ColumnSettinsPanelProps) => import("react").JSX.Element;
|
|
5
|
+
export declare const ColumnSettingsPanel: ({ column: columnProp, columnModel, onClickEditCalculatedColumn, onConfigChange, }: ColumnSettinsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
2
2
|
import type { TableProps } from "@vuu-ui/vuu-table";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { HTMLAttributes } from "react";
|
|
4
|
+
import { ColumnPickerProps } from "../column-picker/ColumnPicker";
|
|
5
|
+
import { TableSettingsPanelProps } from "../table-settings-panel/TableSettingsPanel";
|
|
6
6
|
declare const TabLabels: {
|
|
7
7
|
readonly "table-settings": "Table";
|
|
8
8
|
readonly "table-columns": "Columns";
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
3
|
-
import { VuuColumnDataType, VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
-
import { ColumnModel } from "../column-picker/ColumnModel";
|
|
5
|
-
export interface CalculatedColumnPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
column: ColumnDescriptor;
|
|
7
|
-
columnModel: ColumnModel;
|
|
8
|
-
onChangeColumn: (column: ColumnDescriptor) => void;
|
|
9
|
-
onChangeServerDataType?: (name: VuuColumnDataType) => void;
|
|
10
|
-
vuuTable: VuuTable;
|
|
11
|
-
}
|
|
12
|
-
export declare const CalculatedColumnPanel: ({ column: columnProp, columnModel, onChangeColumn, onChangeServerDataType: onChangeServerDataTypeProp, vuuTable, }: CalculatedColumnPanelProps) => import("react").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
import { FormEventHandler, SyntheticEvent } from "react";
|
|
3
|
-
import { CalculatedColumnPanelProps } from "./CalculatedColumnPanel";
|
|
4
|
-
export type ColumnExpressionHookProps = Pick<CalculatedColumnPanelProps, "column" | "onChangeColumn" | "onChangeServerDataType">;
|
|
5
|
-
export declare const useCalculatedColumnPanel: ({ column: columnProp, onChangeColumn, onChangeServerDataType: onChangeServerDataTypeProp, }: ColumnExpressionHookProps) => {
|
|
6
|
-
column: ColumnDescriptor;
|
|
7
|
-
onChangeExpression: (value: string) => void;
|
|
8
|
-
onChangeName: FormEventHandler;
|
|
9
|
-
onChangeServerDataType: (_e: SyntheticEvent, [serverDataType]: string[]) => void;
|
|
10
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
-
import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
3
|
-
import { ColumnModel } from "../column-picker/ColumnModel";
|
|
4
|
-
export interface EditCalculatedColumnProps {
|
|
5
|
-
calculatedColumn?: ColumnDescriptor;
|
|
6
|
-
columnModel: ColumnModel;
|
|
7
|
-
onSaveColumn?: (caclulatedColumn: ColumnDescriptor) => void;
|
|
8
|
-
vuuTable?: VuuTable;
|
|
9
|
-
}
|
|
10
|
-
export declare const useEditCalculatedColumn: ({ calculatedColumn, columnModel, onSaveColumn, vuuTable, }: EditCalculatedColumnProps) => {
|
|
11
|
-
onCreateCalculatedColumn: () => void;
|
|
12
|
-
onEditCalculatedColumn: () => void;
|
|
13
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TableCellRendererProps } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
/**
|
|
3
|
-
* To assign an icon to the cell, give the columndescriptor
|
|
4
|
-
* a className. In css, assign an icon variable to --vuu-svg-icon.
|
|
5
|
-
*/
|
|
6
|
-
export declare const IconButtonCell: ({ column, dataRow }: TableCellRendererProps) => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./DropdownCell";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./LookupCell";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./PctProgressCell";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ProgressCell";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import { ColumnDefinitionExpression } from "./column-language-parser";
|
|
3
|
-
import { ExpressionSuggestionConsumer } from "./useColumnExpressionEditor";
|
|
4
|
-
export type ColumnExpressionSubmitHandler = (source: string, expression: ColumnDefinitionExpression | undefined) => void;
|
|
5
|
-
export interface ColumnExpressionInputProps extends ExpressionSuggestionConsumer, Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
6
|
-
onChange?: (source: string) => void;
|
|
7
|
-
onSubmitExpression?: ColumnExpressionSubmitHandler;
|
|
8
|
-
source?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const ColumnExpressionInput: import("react").MemoExoticComponent<({ onChange, onSubmitExpression, source, suggestionProvider, }: ColumnExpressionInputProps) => import("react").JSX.Element>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type ColumnFunctionDescriptor = {
|
|
2
|
-
accepts: "string" | "number" | "boolean" | "any" | Array<"string" | "number" | "boolean">;
|
|
3
|
-
description: string;
|
|
4
|
-
example: {
|
|
5
|
-
expression: string;
|
|
6
|
-
result: string;
|
|
7
|
-
};
|
|
8
|
-
name: string;
|
|
9
|
-
params: {
|
|
10
|
-
count?: number;
|
|
11
|
-
description: string;
|
|
12
|
-
};
|
|
13
|
-
type: "string" | "number" | "boolean" | "variable";
|
|
14
|
-
};
|
|
15
|
-
export declare const columnFunctionDescriptors: ColumnFunctionDescriptor[];
|