@vuu-ui/vuu-table-extras 0.8.11 → 0.8.12
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/cjs/index.js +1 -1
- package/cjs/index.js.map +4 -4
- package/esm/index.js +1 -1
- package/esm/index.js.map +4 -4
- package/index.css +1 -1
- package/index.css.map +3 -3
- package/package.json +11 -11
- package/types/column-expression-input/ColumnExpressionInput.d.ts +3 -2
- package/types/column-expression-input/useColumnExpressionEditor.d.ts +2 -1
- package/types/column-expression-panel/ColumnExpressionPanel.d.ts +6 -2
- package/types/column-expression-panel/useColumnExpression.d.ts +2 -3
- package/types/column-list/ColumnList.d.ts +2 -1
- package/types/column-settings/ColumnNameLabel.d.ts +8 -0
- package/types/column-settings/ColumnSettingsPanel.d.ts +2 -1
- package/types/column-settings/useColumnSettings.d.ts +6 -2
- package/types/table-settings/TableSettingsPanel.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-table-extras",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "0.8.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "0.8.12",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.8.12"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@vuu-ui/vuu-codemirror": "0.8.
|
|
12
|
-
"@vuu-ui/vuu-data": "0.8.
|
|
13
|
-
"@vuu-ui/vuu-data-react": "0.8.
|
|
14
|
-
"@vuu-ui/vuu-datagrid-types": "0.8.
|
|
15
|
-
"@vuu-ui/vuu-layout": "0.8.
|
|
16
|
-
"@vuu-ui/vuu-popups": "0.8.
|
|
17
|
-
"@vuu-ui/vuu-utils": "0.8.
|
|
18
|
-
"@vuu-ui/vuu-ui-controls": "0.8.
|
|
11
|
+
"@vuu-ui/vuu-codemirror": "0.8.12",
|
|
12
|
+
"@vuu-ui/vuu-data": "0.8.12",
|
|
13
|
+
"@vuu-ui/vuu-data-react": "0.8.12",
|
|
14
|
+
"@vuu-ui/vuu-datagrid-types": "0.8.12",
|
|
15
|
+
"@vuu-ui/vuu-layout": "0.8.12",
|
|
16
|
+
"@vuu-ui/vuu-popups": "0.8.12",
|
|
17
|
+
"@vuu-ui/vuu-utils": "0.8.12",
|
|
18
|
+
"@vuu-ui/vuu-ui-controls": "0.8.12",
|
|
19
19
|
"@lezer/lr": "1.3.4",
|
|
20
20
|
"@salt-ds/core": "1.8.0",
|
|
21
21
|
"@salt-ds/lab": "1.0.0-alpha.15"
|
|
@@ -2,9 +2,10 @@ import { HTMLAttributes } from "react";
|
|
|
2
2
|
import { ColumnDefinitionExpression } from "./column-language-parser";
|
|
3
3
|
import { ExpressionSuggestionConsumer } from "./useColumnExpressionEditor";
|
|
4
4
|
import "./ColumnExpressionInput.css";
|
|
5
|
+
export type ColumnExpressionSubmitHandler = (source: string, expression: ColumnDefinitionExpression | undefined) => void;
|
|
5
6
|
export interface ColumnExpressionInputProps extends ExpressionSuggestionConsumer, Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
6
7
|
onChange?: (source: string) => void;
|
|
7
|
-
onSubmitExpression?:
|
|
8
|
+
onSubmitExpression?: ColumnExpressionSubmitHandler;
|
|
8
9
|
source?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare const ColumnExpressionInput: ({ onChange, onSubmitExpression, source, suggestionProvider, }: ColumnExpressionInputProps) => JSX.Element
|
|
11
|
+
export declare const ColumnExpressionInput: import("react").MemoExoticComponent<({ onChange, onSubmitExpression, source, suggestionProvider, }: ColumnExpressionInputProps) => JSX.Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Completion } from "@vuu-ui/vuu-codemirror";
|
|
2
|
+
import { FocusEventHandler } from "react";
|
|
3
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";
|
|
@@ -21,4 +21,5 @@ export interface ExpressionSuggestionConsumer {
|
|
|
21
21
|
export declare const useColumnExpressionEditor: ({ onChange, onSubmitExpression, source, suggestionProvider, }: ColumnExpressionInputProps) => {
|
|
22
22
|
editorRef: import("react").RefObject<HTMLDivElement>;
|
|
23
23
|
clearInput: () => void;
|
|
24
|
+
onBlur: FocusEventHandler<Element>;
|
|
24
25
|
};
|
|
@@ -3,6 +3,10 @@ import { HTMLAttributes } from "react";
|
|
|
3
3
|
import { ColumnSettingsProps } from "../column-settings";
|
|
4
4
|
export interface ColumnExpressionPanelProps extends HTMLAttributes<HTMLDivElement>, Pick<ColumnSettingsProps, "tableConfig" | "vuuTable"> {
|
|
5
5
|
column: ColumnDescriptor;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Callback prop, invoked on every change to calculated column definition
|
|
8
|
+
* @param calculatedColumnName the full calculated column name
|
|
9
|
+
*/
|
|
10
|
+
onChangeName?: (name: string) => void;
|
|
7
11
|
}
|
|
8
|
-
export declare const ColumnExpressionPanel: ({ column: columnProp,
|
|
12
|
+
export declare const ColumnExpressionPanel: ({ column: columnProp, onChangeName: onChangeNameProp, tableConfig, vuuTable, }: ColumnExpressionPanelProps) => JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
|
|
2
2
|
import { FormEventHandler } from "react";
|
|
3
3
|
import { ColumnExpressionPanelProps } from "./ColumnExpressionPanel";
|
|
4
|
-
export type ColumnExpressionHookProps = Pick<ColumnExpressionPanelProps, "column" | "
|
|
5
|
-
export declare const useColumnExpression: ({ column: columnProp,
|
|
4
|
+
export type ColumnExpressionHookProps = Pick<ColumnExpressionPanelProps, "column" | "onChangeName">;
|
|
5
|
+
export declare const useColumnExpression: ({ column: columnProp, onChangeName: onChangeNameProp, }: ColumnExpressionHookProps) => {
|
|
6
6
|
column: ColumnDescriptor;
|
|
7
7
|
onChangeExpression: (value: string) => void;
|
|
8
8
|
onChangeName: FormEventHandler<Element>;
|
|
9
9
|
onChangeType: (evt: any, value: string | null) => void;
|
|
10
|
-
onSave: () => void;
|
|
11
10
|
};
|
|
@@ -8,5 +8,6 @@ export interface ColumnListProps extends Omit<HTMLAttributes<HTMLDivElement>, "o
|
|
|
8
8
|
columnItems: ColumnItem[];
|
|
9
9
|
onChange: ColumnChangeHandler;
|
|
10
10
|
onMoveListItem: ListProps["onMoveListItem"];
|
|
11
|
+
onNavigateToColumn?: (columnName: string) => void;
|
|
11
12
|
}
|
|
12
|
-
export declare const ColumnList: ({ columnItems, onChange, onMoveListItem, ...htmlAttributes }: ColumnListProps) => JSX.Element;
|
|
13
|
+
export declare const ColumnList: ({ columnItems, onChange, onMoveListItem, onNavigateToColumn, ...htmlAttributes }: ColumnListProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
|
|
2
|
+
import "./ColumnNameLabel.css";
|
|
3
|
+
import { MouseEventHandler } from "react";
|
|
4
|
+
export interface ColumnNameLabelProps {
|
|
5
|
+
column: ColumnDescriptor;
|
|
6
|
+
onClick: MouseEventHandler;
|
|
7
|
+
}
|
|
8
|
+
export declare const ColumnNameLabel: ({ column, onClick }: ColumnNameLabelProps) => JSX.Element;
|
|
@@ -5,8 +5,9 @@ import "./ColumnSettingsPanel.css";
|
|
|
5
5
|
export interface ColumnSettingsProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
column: ColumnDescriptor;
|
|
7
7
|
onConfigChange: (config: TableConfig) => void;
|
|
8
|
+
onCancelCreateColumn: () => void;
|
|
8
9
|
onCreateCalculatedColumn: (column: ColumnDescriptor) => void;
|
|
9
10
|
tableConfig: TableConfig;
|
|
10
11
|
vuuTable: VuuTable;
|
|
11
12
|
}
|
|
12
|
-
export declare const ColumnSettingsPanel: ({ column: columnProp, onConfigChange, onCreateCalculatedColumn, tableConfig, vuuTable, }: ColumnSettingsProps) => JSX.Element;
|
|
13
|
+
export declare const ColumnSettingsPanel: ({ column: columnProp, onCancelCreateColumn, onConfigChange, onCreateCalculatedColumn, tableConfig, vuuTable, }: ColumnSettingsProps) => JSX.Element;
|
|
@@ -3,15 +3,19 @@ import { CellRendererDescriptor } from "@vuu-ui/vuu-utils";
|
|
|
3
3
|
import { SingleSelectionHandler } from "@vuu-ui/vuu-ui-controls";
|
|
4
4
|
import { FormEventHandler } from "react";
|
|
5
5
|
import { ColumnSettingsProps } from "./ColumnSettingsPanel";
|
|
6
|
-
export declare const useColumnSettings: ({ column: columnProp, onConfigChange, onCreateCalculatedColumn, tableConfig, }: Omit<ColumnSettingsProps, "vuuTable">) => {
|
|
6
|
+
export declare const useColumnSettings: ({ column: columnProp, onCancelCreateColumn, onConfigChange, onCreateCalculatedColumn, tableConfig, }: Omit<ColumnSettingsProps, "vuuTable">) => {
|
|
7
7
|
availableRenderers: CellRendererDescriptor[];
|
|
8
|
+
editCalculatedColumn: boolean;
|
|
8
9
|
selectedCellRenderer: CellRendererDescriptor | undefined;
|
|
9
10
|
column: ColumnDescriptor;
|
|
10
11
|
navigateNextColumn: () => void;
|
|
11
12
|
navigatePrevColumn: () => void;
|
|
13
|
+
onCancel: () => void;
|
|
12
14
|
onChange: FormEventHandler<Element>;
|
|
15
|
+
onChangeCalculatedColumnName: (name: string) => void;
|
|
13
16
|
onChangeFormatting: (formatting: TypeFormatting) => void;
|
|
14
17
|
onChangeRenderer: SingleSelectionHandler<CellRendererDescriptor>;
|
|
18
|
+
onEditCalculatedColumn: () => void;
|
|
15
19
|
onInputCommit: () => void;
|
|
16
|
-
onSave: (
|
|
20
|
+
onSave: () => void;
|
|
17
21
|
};
|
|
@@ -7,6 +7,7 @@ export interface TableSettingsProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
onAddCalculatedColumn: () => void;
|
|
8
8
|
onConfigChange: (config: TableConfig) => void;
|
|
9
9
|
onDataSourceConfigChange: (dataSOurceConfig: DataSourceConfig) => void;
|
|
10
|
+
onNavigateToColumn?: (columnName: string) => void;
|
|
10
11
|
tableConfig: TableConfig;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
@@ -14,4 +15,4 @@ export interface TableSettingsProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
15
|
It updates the settings in state locally and notifies caller of
|
|
15
16
|
every change via onChange callback
|
|
16
17
|
*/
|
|
17
|
-
export declare const TableSettingsPanel: ({ availableColumns, onAddCalculatedColumn, onConfigChange, onDataSourceConfigChange, tableConfig: tableConfigProp, ...htmlAttributes }: TableSettingsProps) => JSX.Element;
|
|
18
|
+
export declare const TableSettingsPanel: ({ availableColumns, onAddCalculatedColumn, onConfigChange, onDataSourceConfigChange, onNavigateToColumn, tableConfig: tableConfigProp, ...htmlAttributes }: TableSettingsProps) => JSX.Element;
|