@vuu-ui/vuu-table-extras 4.1.0 → 5.0.0-alpha.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/calculated-column/useEditCalculatedColumn.js +1 -1
- package/src/cell-renderers/dropdown-cell/DropdownCell.css.js +29 -5
- package/src/cell-renderers/dropdown-cell/DropdownCell.js +4 -1
- package/src/column-expression-input/column-language-parser/column-expression-parse-utils.js +1 -1
- package/src/column-expression-input/useColumnExpressionEditor.js +0 -1
- package/src/column-picker/ColumnPicker.js +3 -1
- package/src/csv-upload/data-upload-preview/DataUploadPreview.js +1 -1
- package/types/column-expression-input/column-language-parser/column-expression-parse-utils.d.ts +1 -1
- package/types/column-expression-input/useColumnExpressionEditor.d.ts +4 -4
- package/types/column-picker/ColumnPicker.d.ts +4 -4
- package/types/inline-add-row/useInlineAddRow.d.ts +1 -0
- package/types/tabbed-table-config-panel/TabbedTableConfigPanel.d.ts +4 -4
- 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
package/package.json
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "5.0.0-alpha.2",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"prebuild": "npm run lezer-generate:column",
|
|
8
|
-
"build:dev": "node ../../scripts/run-build.mjs",
|
|
9
9
|
"build": "node ../../scripts/run-build-rslib.ts",
|
|
10
10
|
"type-defs": "node ../../scripts/build-type-defs.mjs",
|
|
11
|
-
"lezer-generate:column": "lezer-generator --output ./src/column-expression-input/column-language-parser/generated/column-parser.
|
|
11
|
+
"lezer-generate:column": "lezer-generator --output ./src/column-expression-input/column-language-parser/generated/column-parser.ts ./src/column-expression-input/column-language-parser/grammar/column.grammar"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@vuu-ui/vuu-filter-types": "
|
|
15
|
-
"@vuu-ui/vuu-protocol-types": "
|
|
14
|
+
"@vuu-ui/vuu-filter-types": "5.0.0-alpha.2",
|
|
15
|
+
"@vuu-ui/vuu-protocol-types": "5.0.0-alpha.2"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@vuu-ui/vuu-codemirror": "
|
|
19
|
-
"@vuu-ui/vuu-data-editing": "
|
|
20
|
-
"@vuu-ui/vuu-data-react": "
|
|
21
|
-
"@vuu-ui/vuu-data-types": "
|
|
22
|
-
"@vuu-ui/vuu-table-types": "
|
|
23
|
-
"@vuu-ui/vuu-popups": "
|
|
24
|
-
"@vuu-ui/vuu-table": "
|
|
25
|
-
"@vuu-ui/vuu-utils": "
|
|
26
|
-
"@vuu-ui/vuu-ui-controls": "
|
|
18
|
+
"@vuu-ui/vuu-codemirror": "5.0.0-alpha.2",
|
|
19
|
+
"@vuu-ui/vuu-data-editing": "5.0.0-alpha.2",
|
|
20
|
+
"@vuu-ui/vuu-data-react": "5.0.0-alpha.2",
|
|
21
|
+
"@vuu-ui/vuu-data-types": "5.0.0-alpha.2",
|
|
22
|
+
"@vuu-ui/vuu-table-types": "5.0.0-alpha.2",
|
|
23
|
+
"@vuu-ui/vuu-popups": "5.0.0-alpha.2",
|
|
24
|
+
"@vuu-ui/vuu-table": "5.0.0-alpha.2",
|
|
25
|
+
"@vuu-ui/vuu-utils": "5.0.0-alpha.2",
|
|
26
|
+
"@vuu-ui/vuu-ui-controls": "5.0.0-alpha.2",
|
|
27
27
|
"@lezer/lr": "1.4.2",
|
|
28
28
|
"@salt-ds/core": "1.74.0",
|
|
29
29
|
"@salt-ds/styles": "0.4.2",
|
|
30
30
|
"@salt-ds/window": "0.1.2",
|
|
31
|
-
"csv-parse": "^7.0.0"
|
|
31
|
+
"csv-parse": "^7.0.0",
|
|
32
|
+
"@vuu-ui/core": "5.0.0-alpha.2"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"@floating-ui/react": "^0.27.19",
|
|
@@ -36,7 +37,6 @@
|
|
|
36
37
|
"react": "^19.2.3",
|
|
37
38
|
"react-dom": "^19.2.3"
|
|
38
39
|
},
|
|
39
|
-
"type": "module",
|
|
40
40
|
"files": [
|
|
41
41
|
"README.md",
|
|
42
42
|
"src",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
],
|
|
45
45
|
"exports": {
|
|
46
46
|
".": {
|
|
47
|
+
"types": "./types/index.d.ts",
|
|
47
48
|
"import": "./src/index.js",
|
|
48
|
-
"default": "./src/index.js"
|
|
49
|
-
"types": "./types/index.d.ts"
|
|
49
|
+
"default": "./src/index.js"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"module": "./src/index.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModal } from "@vuu-ui/
|
|
2
|
+
import { useModal } from "@vuu-ui/core";
|
|
3
3
|
import { useCallback, useRef } from "react";
|
|
4
4
|
import { CalculatedColumnPanel } from "./CalculatedColumnPanel.js";
|
|
5
5
|
const useEditCalculatedColumn = ({ calculatedColumn, columnModel, onSaveColumn, vuuTable })=>{
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
const css = `
|
|
2
2
|
.vuuTableCell {
|
|
3
3
|
& .vuuTableDropdownCell {
|
|
4
|
-
--vuu-icon-height: 15px;
|
|
5
|
-
--vuu-icon-left: calc(100% - var(--salt-spacing-300));
|
|
6
|
-
--vuu-icon-size: 8px;
|
|
7
|
-
--vuu-icon-top: -3px;
|
|
8
4
|
--salt-focused-outlineStyle: none;
|
|
9
5
|
--saltButton-borderRadius: 2px;
|
|
10
6
|
border: solid 1px var(--salt-editable-borderColor);
|
|
11
7
|
height: var(--vuu-table-embedded-control-height);
|
|
12
8
|
min-height: var(--vuu-table-embedded-control-height);
|
|
13
9
|
text-align: left;
|
|
14
|
-
border-radius: 2px;
|
|
15
10
|
font-weight: 500;
|
|
11
|
+
font-size: inherit;
|
|
12
|
+
border-radius: 2px;
|
|
13
|
+
gap: 3px;
|
|
14
|
+
padding: 0 3px 0 4px;
|
|
15
|
+
line-height: normal;
|
|
16
16
|
position: relative;
|
|
17
17
|
|
|
18
|
+
& .saltDropdown-content {
|
|
19
|
+
min-width: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
& button:focus-visible {
|
|
19
23
|
--saltButton-borderColor: var(--salt-focused-outlineColor);
|
|
20
24
|
--saltButton-borderWidth: 2px;
|
|
@@ -31,6 +35,26 @@ const css = `
|
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
.salt-theme.vuu-theme .vuuTableCell .vuuTableDropdownCell .saltDropdown-toggle {
|
|
39
|
+
flex: 0 0 12px;
|
|
40
|
+
width: 12px;
|
|
41
|
+
height: 12px;
|
|
42
|
+
margin-left: 0;
|
|
43
|
+
display: inline-block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.vuuTableDropdownCell-options .saltOption {
|
|
47
|
+
align-items: center;
|
|
48
|
+
min-height: 21px;
|
|
49
|
+
padding: 2px 8px;
|
|
50
|
+
font-size: 11px;
|
|
51
|
+
line-height: 17px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.salt-theme.vuu-theme .saltOptionList.vuuTableDropdownCell-options .saltOption[aria-selected="true"] {
|
|
55
|
+
box-shadow: inset calc(var(--salt-spacing-100) / 2) 0 0 0 var(--salt-selectable-borderColor-selected);
|
|
56
|
+
}
|
|
57
|
+
|
|
34
58
|
|
|
35
59
|
`;
|
|
36
60
|
export default css;
|
|
@@ -64,7 +64,10 @@ const DropdownCell_DropdownCell = /*#__PURE__*/ memo(function({ column, dataRow,
|
|
|
64
64
|
className: clsx(classBase, {
|
|
65
65
|
[`${classBase}-edited`]: true === editedDuringCurrentSession
|
|
66
66
|
}),
|
|
67
|
-
|
|
67
|
+
OverlayProps: {
|
|
68
|
+
className: `${classBase}-options`
|
|
69
|
+
},
|
|
70
|
+
title: selectedOption?.label,
|
|
68
71
|
onClick: handleClick,
|
|
69
72
|
onKeyDownCapture: handleKeyDown,
|
|
70
73
|
onOpenChange: handleOpenChange,
|
|
@@ -28,7 +28,9 @@ const ColumnPicker_ColumnPicker = /*#__PURE__*/ forwardRef(function({ columnMode
|
|
|
28
28
|
selectedItems: selectedItems,
|
|
29
29
|
itemTypeName: "column",
|
|
30
30
|
onSelectedItemsChange: handleSelectedItemsChange,
|
|
31
|
-
|
|
31
|
+
onSelectionChange: onSelectionChange,
|
|
32
|
+
ref: forwardedRef,
|
|
33
|
+
selected: selected
|
|
32
34
|
});
|
|
33
35
|
});
|
|
34
36
|
export { ColumnPicker_ColumnPicker as ColumnPicker, classBaseListItem };
|
package/types/column-expression-input/column-language-parser/column-expression-parse-utils.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import type { SyntaxNode } from "@vuu-ui/vuu-codemirror";
|
|
|
2
2
|
export declare const ColumnNamedTerms: readonly string[];
|
|
3
3
|
export declare const isCompleteExpression: (src: string) => boolean;
|
|
4
4
|
export declare const lastNamedChild: (node: SyntaxNode) => SyntaxNode | null;
|
|
5
|
-
export declare const isCompleteRelationalExpression: (node?:
|
|
5
|
+
export declare const isCompleteRelationalExpression: (node?: any) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Completion } from "@vuu-ui/vuu-codemirror";
|
|
2
|
-
import { FocusEventHandler } from "react";
|
|
3
|
-
import { ColumnExpressionInputProps } from "./ColumnExpressionInput";
|
|
1
|
+
import { type Completion } from "@vuu-ui/vuu-codemirror";
|
|
2
|
+
import { type FocusEventHandler, type RefObject } from "react";
|
|
3
|
+
import type { 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:
|
|
22
|
+
editorRef: RefObject<HTMLDivElement | null>;
|
|
23
23
|
clearInput: () => void;
|
|
24
24
|
onBlur: FocusEventHandler;
|
|
25
25
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ColumnPickerHookProps } from "./useColumnPicker";
|
|
1
|
+
import type { ListBoxProps } from "@salt-ds/core";
|
|
2
|
+
import type { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
3
|
+
import { type HTMLAttributes } from "react";
|
|
4
|
+
import { type 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
|
}
|
|
@@ -19,6 +19,7 @@ export declare const useInlineAddRow: ({ columns }: UseInlineAddRowProps) => {
|
|
|
19
19
|
exportable?: boolean;
|
|
20
20
|
exportFormatter?: (value: unknown, row: import("@vuu-ui/vuu-table-types").RowAccessor) => string;
|
|
21
21
|
getIcon?: (row: DataRow) => string | undefined;
|
|
22
|
+
getGroupAdornment?: (row: DataRow) => import("react").ReactNode;
|
|
22
23
|
groupable?: boolean;
|
|
23
24
|
hidden?: boolean;
|
|
24
25
|
locked?: Exclude<import("@vuu-ui/vuu-table-types").PinLocation, "left"> | false;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
1
|
+
import type { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
2
2
|
import type { TableProps } from "@vuu-ui/vuu-table";
|
|
3
|
-
import { HTMLAttributes } from "react";
|
|
4
|
-
import { ColumnPickerProps } from "../column-picker/ColumnPicker";
|
|
5
|
-
import { TableSettingsPanelProps } from "../table-settings-panel/TableSettingsPanel";
|
|
3
|
+
import { type HTMLAttributes } from "react";
|
|
4
|
+
import { type ColumnPickerProps } from "../column-picker/ColumnPicker";
|
|
5
|
+
import { type TableSettingsPanelProps } from "../table-settings-panel/TableSettingsPanel";
|
|
6
6
|
declare const TabLabels: {
|
|
7
7
|
readonly "table-settings": "Table";
|
|
8
8
|
readonly "table-columns": "Columns";
|
|
@@ -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[];
|
package/types/src/column-expression-input/column-language-parser/ColumnExpressionTreeWalker.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { Tree } from "@vuu-ui/vuu-codemirror";
|
|
2
|
-
type expressionType = "arithmeticExpression" | "booleanCondition" | "booleanLiteralExpression" | "callExpression" | "colExpression" | "conditionalExpression" | "numericLiteralExpression" | "relationalExpression" | "stringLiteralExpression" | "unknown";
|
|
3
|
-
type arithmeticOp = "*" | "/" | "+" | "-" | "unknown";
|
|
4
|
-
type booleanOp = "and" | "or";
|
|
5
|
-
type relationalOp = "=" | "!=" | ">" | ">=" | "<" | "<=" | "unknown";
|
|
6
|
-
export interface Expression {
|
|
7
|
-
type: expressionType;
|
|
8
|
-
expressions?: Expression[];
|
|
9
|
-
toJSON?: () => unknown;
|
|
10
|
-
value?: string | number | boolean;
|
|
11
|
-
}
|
|
12
|
-
interface BooleanLiteralExpression {
|
|
13
|
-
type: "booleanLiteralExpression";
|
|
14
|
-
value: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface NumericLiteralExpression {
|
|
17
|
-
type: "numericLiteralExpression";
|
|
18
|
-
value: number;
|
|
19
|
-
}
|
|
20
|
-
interface StringLiteralExpression {
|
|
21
|
-
type: "stringLiteralExpression";
|
|
22
|
-
value: string;
|
|
23
|
-
}
|
|
24
|
-
interface ArithmeticExpression extends Expression {
|
|
25
|
-
expressions: [Expression, Expression];
|
|
26
|
-
op: arithmeticOp;
|
|
27
|
-
type: "arithmeticExpression";
|
|
28
|
-
}
|
|
29
|
-
interface BooleanCondition extends Expression {
|
|
30
|
-
expressions: Expression[];
|
|
31
|
-
op: booleanOp;
|
|
32
|
-
type: "booleanCondition";
|
|
33
|
-
}
|
|
34
|
-
interface RelationalExpression extends Expression {
|
|
35
|
-
expressions: Expression[];
|
|
36
|
-
op: relationalOp;
|
|
37
|
-
type: "relationalExpression";
|
|
38
|
-
}
|
|
39
|
-
interface ColExpression extends Expression {
|
|
40
|
-
column?: string;
|
|
41
|
-
type: "colExpression";
|
|
42
|
-
}
|
|
43
|
-
interface CallExpression extends Expression {
|
|
44
|
-
arguments: Expression[];
|
|
45
|
-
functionName?: string;
|
|
46
|
-
type: "callExpression";
|
|
47
|
-
}
|
|
48
|
-
type ConditionExpression = RelationalExpression | BooleanCondition;
|
|
49
|
-
interface ConditionalExpression extends Expression {
|
|
50
|
-
type: "conditionalExpression";
|
|
51
|
-
condition: ConditionExpression;
|
|
52
|
-
truthyExpression: Expression;
|
|
53
|
-
falsyExpression: Expression;
|
|
54
|
-
}
|
|
55
|
-
export type ColumnDefinitionExpression = ArithmeticExpression | BooleanLiteralExpression | CallExpression | ColExpression | ConditionalExpression | NumericLiteralExpression | StringLiteralExpression;
|
|
56
|
-
export declare const walkTree: (tree: Tree, source: string) => ColumnDefinitionExpression;
|
|
57
|
-
export {};
|
package/types/src/column-expression-input/column-language-parser/column-expression-parse-utils.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SyntaxNode } from "@vuu-ui/vuu-codemirror";
|
|
2
|
-
export declare const ColumnNamedTerms: readonly string[];
|
|
3
|
-
export declare const isCompleteExpression: (src: string) => boolean;
|
|
4
|
-
export declare const lastNamedChild: (node: SyntaxNode) => SyntaxNode | null;
|
|
5
|
-
export declare const isCompleteRelationalExpression: (node?: SyntaxNode) => boolean;
|
package/types/src/column-expression-input/column-language-parser/generated/column-parser.terms.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ColumnDefinitionExpression = 1, Column = 2, Number = 3, String = 4, True = 5, False = 6, ParenthesizedExpression = 7, OpenBrace = 8, CloseBrace = 9, ArithmeticExpression = 10, Divide = 11, Times = 12, Plus = 13, Minus = 14, ConditionalExpression = 15, If = 16, RelationalExpression = 17, RelationalOperator = 18, AndCondition = 19, OrCondition = 20, Comma = 21, CallExpression = 22, Function = 23, ArgList = 24;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const walkTree: (tree: any, source: any) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const vuuHighlighting: import("@codemirror/state").Extension;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const vuuTheme: import("@codemirror/state").Extension;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type CompletionSource } from "@vuu-ui/vuu-codemirror";
|
|
2
|
-
import { type RefObject } from "react";
|
|
3
|
-
import type { IExpressionSuggestionProvider } from "./useColumnExpressionEditor";
|
|
4
|
-
export type ApplyCompletion = (mode?: "add" | "replace") => void;
|
|
5
|
-
export type Operator = "";
|
|
6
|
-
export declare const useColumnAutoComplete: (suggestionProvider: IExpressionSuggestionProvider, onSubmit: RefObject<ApplyCompletion>) => CompletionSource;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Completion } from "@vuu-ui/vuu-codemirror";
|
|
2
|
-
import { FocusEventHandler } from "react";
|
|
3
|
-
import { ColumnExpressionInputProps } from "./ColumnExpressionInput";
|
|
4
|
-
export type ColumnExpressionOperator = "Times" | "Divide" | "Minus" | "Plus";
|
|
5
|
-
export type ColumnExpressionSuggestionType = "column" | "columnValue" | "expression" | "condition-operator" | "operator" | "relational-operator";
|
|
6
|
-
export type ColumnExpressionSuggestionOptions = {
|
|
7
|
-
columnName?: string;
|
|
8
|
-
functionName?: string;
|
|
9
|
-
operator?: ColumnExpressionOperator;
|
|
10
|
-
prefix?: string;
|
|
11
|
-
startsWith?: string;
|
|
12
|
-
selection?: string[];
|
|
13
|
-
};
|
|
14
|
-
export interface IExpressionSuggestionProvider {
|
|
15
|
-
getSuggestions: (valueType: ColumnExpressionSuggestionType, options?: ColumnExpressionSuggestionOptions) => Promise<Completion[]>;
|
|
16
|
-
isPartialMatch: (valueType: ColumnExpressionSuggestionType, columnName?: string, text?: string | undefined) => Promise<boolean>;
|
|
17
|
-
}
|
|
18
|
-
export interface ExpressionSuggestionConsumer {
|
|
19
|
-
suggestionProvider: IExpressionSuggestionProvider;
|
|
20
|
-
}
|
|
21
|
-
export declare const useColumnExpressionEditor: ({ onChange, onSubmitExpression, source, suggestionProvider, }: ColumnExpressionInputProps) => {
|
|
22
|
-
editorRef: import("react").RefObject<HTMLDivElement | null>;
|
|
23
|
-
clearInput: () => void;
|
|
24
|
-
onBlur: FocusEventHandler;
|
|
25
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
-
import { IExpressionSuggestionProvider } from "./useColumnExpressionEditor";
|
|
4
|
-
export interface SuggestionProviderHookProps {
|
|
5
|
-
columns: readonly ColumnDescriptor[];
|
|
6
|
-
table: VuuTable;
|
|
7
|
-
}
|
|
8
|
-
export declare const useColumnExpressionSuggestionProvider: ({ columns, table, }: SuggestionProviderHookProps) => IExpressionSuggestionProvider;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ColumnDescriptor, ColumnTypeRendering, FormattingSettingsProps } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
import { CellRendererDescriptor } from "@vuu-ui/vuu-utils";
|
|
3
|
-
import { HTMLAttributes } from "react";
|
|
4
|
-
export interface ColumnFormattingPanelProps extends HTMLAttributes<HTMLDivElement>, FormattingSettingsProps {
|
|
5
|
-
availableRenderers: CellRendererDescriptor[];
|
|
6
|
-
column: ColumnDescriptor;
|
|
7
|
-
onChangeRendering: (renderProps: ColumnTypeRendering) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const ColumnFormattingPanel: ({ availableRenderers, className, column, onChangeFormatting, onChangeColumnType, onChangeRendering, ...htmlAttributes }: ColumnFormattingPanelProps) => import("react").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MenuActionHandler } from "@vuu-ui/vuu-context-menu";
|
|
2
|
-
import { ColumnDescriptor, ColumnMenuPermissions } from "@vuu-ui/vuu-table-types";
|
|
3
|
-
import { HTMLAttributes } from "react";
|
|
4
|
-
import { ColumnMenuActionType } from "./column-menu-utils";
|
|
5
|
-
export interface ColumnMenuProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
|
-
column: ColumnDescriptor;
|
|
7
|
-
menuActionHandler?: MenuActionHandler<ColumnMenuActionType, ColumnDescriptor>;
|
|
8
|
-
menuPermissions?: ColumnMenuPermissions;
|
|
9
|
-
}
|
|
10
|
-
export declare const ColumnMenu: ({ className, column, menuActionHandler: menuActionHandlerProp, menuPermissions: { allowSort, allowGroup, allowAggregation, allowHide, allowRemove, allowPin, }, }: ColumnMenuProps) => import("react").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
-
import { ColumnDescriptor, ColumnDisplayAction } from "@vuu-ui/vuu-table-types";
|
|
3
|
-
export type ColumnDisplayActionHandler = (action: ColumnDisplayAction) => void;
|
|
4
|
-
export type DisplayColumnSettingsAction = {
|
|
5
|
-
type: "column-settings";
|
|
6
|
-
column: ColumnDescriptor;
|
|
7
|
-
/** only for calculated columnn */
|
|
8
|
-
vuuTable?: VuuTable;
|
|
9
|
-
};
|
|
10
|
-
export type DisplaySettingsAction = DisplayColumnSettingsAction;
|
|
11
|
-
export type TableSettingsActionHandler = (action: DisplaySettingsAction) => void;
|