@vuu-ui/vuu-ui-controls 0.8.8-debug → 0.8.9-debug
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 +5705 -3779
- package/cjs/index.js.map +4 -4
- package/esm/index.js +5754 -3781
- package/esm/index.js.map +4 -4
- package/index.css +419 -105
- package/index.css.map +3 -3
- package/package.json +8 -6
- package/types/vuu-popups/src/dialog/Dialog.d.ts +8 -0
- package/types/vuu-popups/src/dialog/index.d.ts +1 -0
- package/types/vuu-popups/src/index.d.ts +8 -0
- package/types/vuu-popups/src/menu/ContextMenu.d.ts +16 -0
- package/types/vuu-popups/src/menu/MenuList.d.ts +43 -0
- package/types/vuu-popups/src/menu/context-menu-provider.d.ts +10 -0
- package/types/vuu-popups/src/menu/index.d.ts +4 -0
- package/types/vuu-popups/src/menu/key-code.d.ts +12 -0
- package/types/vuu-popups/src/menu/list-dom-utils.d.ts +4 -0
- package/types/vuu-popups/src/menu/use-cascade.d.ts +25 -0
- package/types/vuu-popups/src/menu/use-items-with-ids-next.d.ts +13 -0
- package/types/vuu-popups/src/menu/use-keyboard-navigation.d.ts +27 -0
- package/types/vuu-popups/src/menu/useContextMenu.d.ts +20 -0
- package/types/vuu-popups/src/menu/utils.d.ts +2 -0
- package/types/vuu-popups/src/popup/Popup.d.ts +10 -0
- package/types/vuu-popups/src/popup/index.d.ts +3 -0
- package/types/vuu-popups/src/popup/popup-service.d.ts +59 -0
- package/types/vuu-popups/src/popup/useAnchoredPosition.d.ts +12 -0
- package/types/vuu-popups/src/popup-menu/PopupMenu.d.ts +16 -0
- package/types/vuu-popups/src/popup-menu/index.d.ts +1 -0
- package/types/vuu-popups/src/portal/Portal.d.ts +30 -0
- package/types/vuu-popups/src/portal/index.d.ts +1 -0
- package/types/vuu-popups/src/portal-deprecated/PortalDeprecated.d.ts +8 -0
- package/types/vuu-popups/src/portal-deprecated/index.d.ts +3 -0
- package/types/vuu-popups/src/portal-deprecated/portal-utils.d.ts +1 -0
- package/types/vuu-popups/src/portal-deprecated/render-portal.d.ts +10 -0
- package/types/vuu-popups/src/prompt/Prompt.d.ts +14 -0
- package/types/vuu-popups/src/prompt/index.d.ts +1 -0
- package/types/vuu-popups/src/tooltip/Tooltip.d.ts +12 -0
- package/types/vuu-popups/src/tooltip/index.d.ts +2 -0
- package/types/vuu-popups/src/tooltip/useAnchoredPosition.d.ts +12 -0
- package/types/vuu-popups/src/tooltip/useTooltip.d.ts +16 -0
- package/types/vuu-ui-controls/src/combo-box/ComboBox.d.ts +18 -0
- package/types/vuu-ui-controls/src/combo-box/index.d.ts +1 -0
- package/types/vuu-ui-controls/src/combo-box/useCombobox.d.ts +22 -0
- package/types/{list → vuu-ui-controls/src}/common-hooks/collectionTypes.d.ts +1 -0
- package/types/vuu-ui-controls/src/common-hooks/index.d.ts +8 -0
- package/types/{list → vuu-ui-controls/src}/common-hooks/navigationTypes.d.ts +5 -3
- package/types/{list → vuu-ui-controls/src}/common-hooks/selectionTypes.d.ts +16 -12
- package/types/{list → vuu-ui-controls/src}/common-hooks/useCollectionItems.d.ts +1 -1
- package/types/vuu-ui-controls/src/common-hooks/useControlled.d.ts +24 -0
- package/types/{list → vuu-ui-controls/src}/common-hooks/useSelection.d.ts +1 -1
- package/types/vuu-ui-controls/src/drag-drop/DragDropProvider.d.ts +37 -0
- package/types/vuu-ui-controls/src/drag-drop/DragDropState.d.ts +15 -0
- package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/dragDropTypesNext.d.ts +24 -5
- package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/drop-target-utils.d.ts +8 -9
- package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/useDragDisplacers.d.ts +3 -2
- package/types/vuu-ui-controls/src/drag-drop/useDragDropIndicator.d.ts +2 -0
- package/types/vuu-ui-controls/src/drag-drop/useDragDropNaturalMovementNext.d.ts +2 -0
- package/types/vuu-ui-controls/src/drag-drop/useGlobalDragDrop.d.ts +10 -0
- package/types/vuu-ui-controls/src/dropdown/Dropdown.d.ts +10 -0
- package/types/vuu-ui-controls/src/dropdown/DropdownBase.d.ts +10 -0
- package/types/vuu-ui-controls/src/dropdown/DropdownButton.d.ts +42 -0
- package/types/vuu-ui-controls/src/dropdown/dropdownTypes.d.ts +45 -0
- package/types/vuu-ui-controls/src/dropdown/index.d.ts +5 -0
- package/types/vuu-ui-controls/src/dropdown/useClickAway.d.ts +8 -0
- package/types/vuu-ui-controls/src/dropdown/useDropdown.d.ts +13 -0
- package/types/vuu-ui-controls/src/dropdown/useDropdownBase.d.ts +2 -0
- package/types/vuu-ui-controls/src/editable/editable-utils.d.ts +4 -0
- package/types/vuu-ui-controls/src/editable/index.d.ts +2 -0
- package/types/vuu-ui-controls/src/editable/useEditableText.d.ts +16 -0
- package/types/vuu-ui-controls/src/expando-input/ExpandoInput.d.ts +4 -0
- package/types/vuu-ui-controls/src/expando-input/index.d.ts +1 -0
- package/types/vuu-ui-controls/src/index.d.ts +15 -0
- package/types/vuu-ui-controls/src/inputs/Checkbox.d.ts +10 -0
- package/types/vuu-ui-controls/src/inputs/RadioButton.d.ts +10 -0
- package/types/vuu-ui-controls/src/inputs/index.d.ts +2 -0
- package/types/vuu-ui-controls/src/instrument-search/InstrumentSearch.d.ts +11 -0
- package/types/vuu-ui-controls/src/instrument-search/SearchCell.d.ts +4 -0
- package/types/vuu-ui-controls/src/instrument-search/index.d.ts +1 -0
- package/types/vuu-ui-controls/src/instrument-search/moving-window.d.ts +14 -0
- package/types/vuu-ui-controls/src/instrument-search/useDataSource.d.ts +7 -0
- package/types/vuu-ui-controls/src/list/ChevronIcon.d.ts +8 -0
- package/types/{list → vuu-ui-controls/src/list}/List.d.ts +2 -2
- package/types/{list → vuu-ui-controls/src/list}/ListItem.d.ts +3 -1
- package/types/vuu-ui-controls/src/list/RadioIcon.d.ts +6 -0
- package/types/{list → vuu-ui-controls/src/list}/VirtualizedList.d.ts +1 -1
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/index.d.ts +2 -7
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/keyUtils.d.ts +0 -1
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/list-dom-utils.d.ts +0 -1
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/useCollapsibleGroups.d.ts +2 -2
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/useImperativeScrollingAPI.d.ts +1 -1
- package/types/vuu-ui-controls/src/list/common-hooks/useKeyboardNavigation.d.ts +3 -0
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/useTypeahead.d.ts +1 -1
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/useViewportTracking.d.ts +1 -1
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/utils/collection-item-utils.d.ts +1 -1
- package/types/{list → vuu-ui-controls/src/list}/common-hooks/utils/index.d.ts +1 -0
- package/types/vuu-ui-controls/src/list/common-hooks/utils/isSelected.d.ts +2 -0
- package/types/{list → vuu-ui-controls/src/list}/index.d.ts +3 -0
- package/types/{list → vuu-ui-controls/src/list}/listTypes.d.ts +15 -15
- package/types/{list → vuu-ui-controls/src/list}/useList.d.ts +2 -2
- package/types/{list → vuu-ui-controls/src/list}/useListHeight.d.ts +5 -4
- package/types/{list → vuu-ui-controls/src/list}/useVirtualization.d.ts +1 -1
- package/types/vuu-ui-controls/src/price-ticker/PriceTicker.d.ts +8 -0
- package/types/vuu-ui-controls/src/price-ticker/index.d.ts +1 -0
- package/types/vuu-ui-controls/src/tabstrip/TabMenu.d.ts +16 -0
- package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/TabsTypes.d.ts +2 -2
- package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/tabstrip-dom-utils.d.ts +0 -1
- package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/useSelection.d.ts +0 -1
- package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/useTabstrip.d.ts +1 -1
- package/types/vuu-ui-controls/src/utils/forwardCallbackProps.d.ts +3 -0
- package/types/vuu-ui-controls/src/utils/index.d.ts +2 -0
- package/types/vuu-ui-controls/src/vuu-input/VuuInput.d.ts +10 -0
- package/types/vuu-ui-controls/src/vuu-input/index.d.ts +1 -0
- package/types/vuu-utils/src/DataWindow.d.ts +39 -0
- package/types/vuu-utils/src/array-utils.d.ts +6 -0
- package/types/vuu-utils/src/box-utils.d.ts +9 -0
- package/types/vuu-utils/src/column-utils.d.ts +130 -0
- package/types/vuu-utils/src/common-types.d.ts +6 -0
- package/types/vuu-utils/src/component-registry.d.ts +23 -0
- package/types/vuu-utils/src/cookie-utils.d.ts +1 -0
- package/types/vuu-utils/src/data-utils.d.ts +14 -0
- package/types/vuu-utils/src/date-utils.d.ts +7 -0
- package/types/vuu-utils/src/debug-utils.d.ts +9 -0
- package/types/vuu-utils/src/event-emitter.d.ts +13 -0
- package/types/vuu-utils/src/filter-utils.d.ts +14 -0
- package/types/vuu-utils/src/formatting-utils.d.ts +9 -0
- package/types/vuu-utils/src/getUniqueId.d.ts +1 -0
- package/types/vuu-utils/src/group-utils.d.ts +3 -0
- package/types/vuu-utils/src/html-utils.d.ts +12 -0
- package/types/vuu-utils/src/index.d.ts +34 -0
- package/types/vuu-utils/src/input-utils.d.ts +2 -0
- package/types/vuu-utils/src/invariant.d.ts +1 -0
- package/types/vuu-utils/src/itemToString.d.ts +2 -0
- package/types/vuu-utils/src/json-utils.d.ts +6 -0
- package/types/vuu-utils/src/keyboard-utils.d.ts +12 -0
- package/types/vuu-utils/src/keyset.d.ts +11 -0
- package/types/vuu-utils/src/logging-utils.d.ts +44 -0
- package/types/vuu-utils/src/menu-utils.d.ts +2 -0
- package/types/vuu-utils/src/nanoid/index.d.ts +1 -0
- package/types/vuu-utils/src/perf-utils.d.ts +5 -0
- package/types/vuu-utils/src/range-utils.d.ts +24 -0
- package/types/vuu-utils/src/round-decimal.d.ts +1 -0
- package/types/vuu-utils/src/row-utils.d.ts +7 -0
- package/types/vuu-utils/src/screenshot-utils.d.ts +6 -0
- package/types/vuu-utils/src/selection-utils.d.ts +27 -0
- package/types/vuu-utils/src/sort-utils.d.ts +5 -0
- package/types/vuu-utils/src/text-utils.d.ts +2 -0
- package/types/vuu-utils/src/url-utils.d.ts +2 -0
- package/types/common-hooks/index.d.ts +0 -1
- package/types/drag-drop/DragDropProvider.d.ts +0 -22
- package/types/drag-drop/drag-utils.d.ts +0 -49
- package/types/drag-drop/useDragDropIndicator.d.ts +0 -2
- package/types/drag-drop/useDragDropNaturalMovementNext.d.ts +0 -2
- package/types/drag-drop/useDragSpacers.d.ts +0 -7
- package/types/index.d.ts +0 -5
- package/types/list/common-hooks/useKeyboardNavigation.d.ts +0 -4
- package/types/list/common-hooks/utils/isSelected.d.ts +0 -2
- package/types/tabstrip/TabMenu.d.ts +0 -12
- package/types/utils/index.d.ts +0 -1
- /package/types/{list → vuu-ui-controls/src}/common-hooks/collectionProvider.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src}/common-hooks/itemToString.d.ts +0 -0
- /package/types/{common-hooks → vuu-ui-controls/src/common-hooks}/use-resize-observer.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/Draggable.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/DropIndicator.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/index.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/useAutoScroll.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/useDragDropNext.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/useDropIndicator.d.ts +0 -0
- /package/types/{drag-drop → vuu-ui-controls/src/drag-drop}/useTransition.d.ts +0 -0
- /package/types/{editable-label → vuu-ui-controls/src/editable-label}/EditableLabel.d.ts +0 -0
- /package/types/{editable-label → vuu-ui-controls/src/editable-label}/index.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/CheckboxIcon.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/Highlighter.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/ListItemGroup.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/ListItemHeader.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/common-hooks/utils/filter-utils.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/keyset.d.ts +0 -0
- /package/types/{list → vuu-ui-controls/src/list}/useScrollPosition.d.ts +0 -0
- /package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/Tab.d.ts +0 -0
- /package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/TabMenuOptions.d.ts +0 -0
- /package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/Tabstrip.d.ts +0 -0
- /package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/index.d.ts +0 -0
- /package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/useAnimatedSelectionThumb.d.ts +0 -0
- /package/types/{tabstrip → vuu-ui-controls/src/tabstrip}/useKeyboardNavigation.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/Tree.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/hierarchical-data-utils.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/index.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/key-code.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/list-dom-utils.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-collapsible-groups.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-hierarchical-data.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-items-with-ids.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-keyboard-navigation.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-selection.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-tree-keyboard-navigation.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/use-viewport-tracking.d.ts +0 -0
- /package/types/{tree → vuu-ui-controls/src/tree}/useTree.d.ts +0 -0
- /package/types/{utils → vuu-ui-controls/src/utils}/escapeRegExp.d.ts +0 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { DataSourceFilter, DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import type { ColumnAlignment, ColumnDescriptor, ColumnType, ColumnTypeDescriptor, ColumnTypeRenderer, ColumnTypeWithValidationRules, GroupColumnDescriptor, KeyedColumnDescriptor, MappedValueTypeRenderer, PinLocation, TableHeadings, TypeFormatting } from "@vuu-ui/vuu-datagrid-types";
|
|
3
|
+
import type { Filter } from "@vuu-ui/vuu-filter-types";
|
|
4
|
+
import type { VuuAggregation, VuuAggType, VuuColumnDataType, VuuDataRow, VuuGroupBy, VuuRowRecord, VuuSort } from "@vuu-ui/vuu-protocol-types";
|
|
5
|
+
import type { SchemaColumn } from "@vuu-ui/vuu-data";
|
|
6
|
+
import type { CSSProperties } from "react";
|
|
7
|
+
import type { CellRendererDescriptor } from "./component-registry";
|
|
8
|
+
export interface ColumnMap {
|
|
9
|
+
[columnName: string]: number;
|
|
10
|
+
}
|
|
11
|
+
export type SortCriteriaItem = string | [string, "asc"];
|
|
12
|
+
export declare const AggregationType: {
|
|
13
|
+
[key: string]: VuuAggType;
|
|
14
|
+
};
|
|
15
|
+
export declare function mapSortCriteria(sortCriteria: SortCriteriaItem[], columnMap: ColumnMap, metadataOffset?: number): [number, "asc"][];
|
|
16
|
+
export declare const getDefaultAlignment: (serverDataType?: VuuColumnDataType) => ColumnAlignment;
|
|
17
|
+
export declare const isValidColumnAlignment: (v: string) => v is ColumnAlignment;
|
|
18
|
+
export declare const isValidPinLocation: (v: string) => v is PinLocation;
|
|
19
|
+
export declare const isKeyedColumn: (column: ColumnDescriptor) => column is KeyedColumnDescriptor;
|
|
20
|
+
export declare const fromServerDataType: (serverDataType: VuuColumnDataType) => ColumnTypeSimple;
|
|
21
|
+
export declare const isNumericColumn: ({ serverDataType, type }: ColumnDescriptor) => boolean;
|
|
22
|
+
export declare const isDateColumn: ({ type }: ColumnDescriptor) => boolean;
|
|
23
|
+
export declare const isTimeColumn: ({ type }: ColumnDescriptor) => boolean;
|
|
24
|
+
export declare const isDateTimeColumn: (column: ColumnDescriptor) => boolean;
|
|
25
|
+
export declare const notHidden: (column: ColumnDescriptor) => boolean;
|
|
26
|
+
export declare const isPinned: (column: ColumnDescriptor) => boolean;
|
|
27
|
+
export declare const hasHeadings: (column: ColumnDescriptor) => boolean;
|
|
28
|
+
export declare const isResizing: (column: KeyedColumnDescriptor) => boolean | undefined;
|
|
29
|
+
export declare const isTextColumn: ({ serverDataType }: ColumnDescriptor) => boolean;
|
|
30
|
+
export declare const toColumnDescriptor: (name: string) => ColumnDescriptor;
|
|
31
|
+
export declare const isSimpleColumnType: (value: unknown) => value is ColumnTypeSimple;
|
|
32
|
+
export declare type ColumnTypeSimple = "string" | "number" | "boolean" | "json" | "date" | "time" | "checkbox";
|
|
33
|
+
export declare const isTypeDescriptor: (type?: ColumnType) => type is ColumnTypeDescriptor;
|
|
34
|
+
export declare const isColumnTypeRenderer: (renderer?: unknown) => renderer is ColumnTypeRenderer;
|
|
35
|
+
export declare const hasValidationRules: (type?: ColumnType) => type is ColumnTypeWithValidationRules;
|
|
36
|
+
export declare const isMappedValueTypeRenderer: (renderer?: unknown) => renderer is MappedValueTypeRenderer;
|
|
37
|
+
export declare function buildColumnMap(columns?: (KeyedColumnDescriptor | SchemaColumn | string)[]): ColumnMap;
|
|
38
|
+
export declare function projectUpdates(updates: number[]): number[];
|
|
39
|
+
export declare const metadataKeys: {
|
|
40
|
+
readonly IDX: 0;
|
|
41
|
+
readonly RENDER_IDX: 1;
|
|
42
|
+
readonly IS_LEAF: 2;
|
|
43
|
+
readonly IS_EXPANDED: 3;
|
|
44
|
+
readonly DEPTH: 4;
|
|
45
|
+
readonly COUNT: 5;
|
|
46
|
+
readonly KEY: 6;
|
|
47
|
+
readonly SELECTED: 7;
|
|
48
|
+
readonly count: 8;
|
|
49
|
+
readonly PARENT_IDX: "parent_idx";
|
|
50
|
+
readonly IDX_POINTER: "idx_pointer";
|
|
51
|
+
readonly FILTER_COUNT: "filter_count";
|
|
52
|
+
readonly NEXT_FILTER_IDX: "next_filter_idx";
|
|
53
|
+
};
|
|
54
|
+
export declare const flattenColumnGroup: (columns: KeyedColumnDescriptor[]) => KeyedColumnDescriptor[];
|
|
55
|
+
export declare function extractGroupColumn(columns: KeyedColumnDescriptor[], groupBy?: VuuGroupBy, confirmed?: boolean): [GroupColumnDescriptor | null, KeyedColumnDescriptor[]];
|
|
56
|
+
export declare const isGroupColumn: (column: KeyedColumnDescriptor) => column is GroupColumnDescriptor;
|
|
57
|
+
export declare const isJsonAttribute: (value: unknown) => boolean;
|
|
58
|
+
export declare const isJsonGroup: (column: KeyedColumnDescriptor, row: VuuDataRow) => boolean;
|
|
59
|
+
export declare const isJsonColumn: (column: KeyedColumnDescriptor) => boolean;
|
|
60
|
+
export declare const sortPinnedColumns: (columns: KeyedColumnDescriptor[]) => KeyedColumnDescriptor[];
|
|
61
|
+
export declare const getTableHeadings: (columns: KeyedColumnDescriptor[]) => TableHeadings;
|
|
62
|
+
export declare const getColumnStyle: ({ pin, pinnedOffset, width, }: KeyedColumnDescriptor) => CSSProperties;
|
|
63
|
+
export declare const setAggregations: (aggregations: VuuAggregation[], column: KeyedColumnDescriptor, aggType: VuuAggType) => VuuAggregation[];
|
|
64
|
+
export declare const extractFilterForColumn: (filter: Filter | undefined, columnName: string) => Filter | undefined;
|
|
65
|
+
export declare const applyGroupByToColumns: (columns: KeyedColumnDescriptor[], groupBy: VuuGroupBy, confirmed?: boolean) => KeyedColumnDescriptor[];
|
|
66
|
+
export declare const applySortToColumns: (colunms: KeyedColumnDescriptor[], sort: VuuSort) => KeyedColumnDescriptor[];
|
|
67
|
+
export declare const applyFilterToColumns: (columns: KeyedColumnDescriptor[], { filterStruct }: DataSourceFilter) => KeyedColumnDescriptor[];
|
|
68
|
+
export declare const isFilteredColumn: (column: KeyedColumnDescriptor) => boolean;
|
|
69
|
+
export declare const stripFilterFromColumns: (columns: KeyedColumnDescriptor[]) => {
|
|
70
|
+
align?: "left" | "right" | undefined;
|
|
71
|
+
CellRenderer?: import("react").FunctionComponent<import("@vuu-ui/vuu-datagrid-types").TableCellRendererProps> | undefined;
|
|
72
|
+
className?: string | undefined;
|
|
73
|
+
clientSideEditValidationCheck?: import("packages/vuu-ui-controls/src").ClientSideValidationChecker | undefined;
|
|
74
|
+
endPin?: true | undefined;
|
|
75
|
+
flex?: number | undefined;
|
|
76
|
+
heading?: string[] | undefined;
|
|
77
|
+
isGroup?: boolean | undefined;
|
|
78
|
+
isSystemColumn?: boolean | undefined;
|
|
79
|
+
key: number;
|
|
80
|
+
label: string;
|
|
81
|
+
locked?: boolean | undefined;
|
|
82
|
+
marginLeft?: number | undefined;
|
|
83
|
+
moving?: boolean | undefined;
|
|
84
|
+
originalIdx?: number | undefined;
|
|
85
|
+
pinnedOffset?: number | undefined;
|
|
86
|
+
resizeable?: boolean | undefined;
|
|
87
|
+
resizing?: boolean | undefined;
|
|
88
|
+
sortable?: boolean | undefined;
|
|
89
|
+
sorted?: import("@vuu-ui/vuu-datagrid-types").ColumnSort | undefined;
|
|
90
|
+
type?: ColumnType | undefined;
|
|
91
|
+
valueFormatter: ValueFormatter;
|
|
92
|
+
width: number;
|
|
93
|
+
aggregate?: VuuAggType | undefined;
|
|
94
|
+
editable?: boolean | undefined;
|
|
95
|
+
expression?: string | undefined;
|
|
96
|
+
hidden?: boolean | undefined;
|
|
97
|
+
minWidth?: number | undefined;
|
|
98
|
+
name: string;
|
|
99
|
+
pin?: PinLocation | undefined;
|
|
100
|
+
serverDataType?: VuuColumnDataType | undefined;
|
|
101
|
+
}[];
|
|
102
|
+
export declare const getColumnName: (name: string) => string;
|
|
103
|
+
export declare const findColumn: (columns: KeyedColumnDescriptor[], columnName: string) => KeyedColumnDescriptor | undefined;
|
|
104
|
+
export declare function updateColumn(columns: KeyedColumnDescriptor[], column: KeyedColumnDescriptor): KeyedColumnDescriptor[];
|
|
105
|
+
export declare function updateColumn(columns: KeyedColumnDescriptor[], column: string, options: Partial<ColumnDescriptor>): KeyedColumnDescriptor[];
|
|
106
|
+
export declare const toDataSourceColumns: (column: ColumnDescriptor) => string;
|
|
107
|
+
export declare const getRowRecord: (row: DataSourceRow, columnMap: ColumnMap) => VuuRowRecord;
|
|
108
|
+
export declare const isDataLoading: (columns: KeyedColumnDescriptor[]) => boolean;
|
|
109
|
+
export declare const getColumnsInViewport: (columns: KeyedColumnDescriptor[], vpStart: number, vpEnd: number) => [KeyedColumnDescriptor[], number];
|
|
110
|
+
export declare const visibleColumnAtIndex: (columns: KeyedColumnDescriptor[], index: number) => KeyedColumnDescriptor | undefined;
|
|
111
|
+
export declare const getGroupValueAndOffset: (columns: KeyedColumnDescriptor[], row: DataSourceRow) => [unknown, number];
|
|
112
|
+
export declare const getDefaultColumnType: (serverDataType?: VuuColumnDataType) => ColumnTypeSimple;
|
|
113
|
+
export declare const updateColumnType: <T extends ColumnDescriptor = ColumnDescriptor>(column: T, formatting: TypeFormatting) => T;
|
|
114
|
+
export declare const updateColumnRenderer: <T extends ColumnDescriptor = ColumnDescriptor>(column: T, cellRenderer: CellRendererDescriptor) => T;
|
|
115
|
+
export declare const getTypeSettingsFromColumn: (column: ColumnDescriptor) => TypeFormatting;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* return a filter predicate that will reject columns, names of which
|
|
119
|
+
* are not in provided list.
|
|
120
|
+
*/
|
|
121
|
+
export declare const subscribedOnly: (columnNames?: string[]) => (column: ColumnDescriptor) => boolean | undefined;
|
|
122
|
+
export declare const addColumnToSubscribedColumns: (subscribedColumns: ColumnDescriptor[], availableColumns: SchemaColumn[], columnName: string) => ColumnDescriptor[];
|
|
123
|
+
export declare const isCalculatedColumn: (columnName?: string) => boolean;
|
|
124
|
+
export declare const getCalculatedColumnDetails: (column: ColumnDescriptor) => string[];
|
|
125
|
+
export declare const getCalculatedColumnName: (column: ColumnDescriptor) => string;
|
|
126
|
+
export declare const getCalculatedColumnExpression: (column: ColumnDescriptor) => string;
|
|
127
|
+
export declare const getCalculatedColumnType: (column: ColumnDescriptor) => VuuColumnDataType;
|
|
128
|
+
export declare const setCalculatedColumnName: (column: ColumnDescriptor, name: string) => ColumnDescriptor;
|
|
129
|
+
export declare const setCalculatedColumnExpression: (column: ColumnDescriptor, expression: string) => ColumnDescriptor;
|
|
130
|
+
export declare const setCalculatedColumnType: (column: ColumnDescriptor, type: string) => ColumnDescriptor;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FunctionComponent as FC, HTMLAttributes } from "react";
|
|
2
|
+
import { ColumnTypeRenderer, EditValidationRule, MappedValueTypeRenderer, TableCellRendererProps } from "@vuu-ui/vuu-datagrid-types";
|
|
3
|
+
import { VuuColumnDataType, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
+
export interface CellConfigPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
onConfigChange: () => void;
|
|
6
|
+
}
|
|
7
|
+
export type EditRuleValidator = (editRule: EditValidationRule, value: VuuRowDataItemType) => boolean | string;
|
|
8
|
+
export type ComponentType = "cell-renderer" | "cell-config-panel" | "data-edit-validator";
|
|
9
|
+
type CellRendererOptions = {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
description?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
serverDataType?: VuuColumnDataType | VuuColumnDataType[] | "json" | "private";
|
|
14
|
+
};
|
|
15
|
+
export interface CellRendererDescriptor extends CellRendererOptions {
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function registerComponent<T extends TableCellRendererProps | CellConfigPanelProps | EditRuleValidator = TableCellRendererProps>(componentName: string, component: T extends EditRuleValidator ? T : FC<T>, type: ComponentType | undefined, options: CellRendererOptions): void;
|
|
19
|
+
export declare const getRegisteredCellRenderers: (serverDataType?: VuuColumnDataType | "json") => CellRendererDescriptor[];
|
|
20
|
+
export declare function getCellRenderer(renderer?: ColumnTypeRenderer | MappedValueTypeRenderer): FC<TableCellRendererProps> | undefined;
|
|
21
|
+
export declare function getCellConfigPanelRenderer(name: string): FC<CellConfigPanelProps> | undefined;
|
|
22
|
+
export declare function getEditRuleValidator(name: string): EditRuleValidator | undefined;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCookieValue: (name: string) => string | number | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type valueChangeDirection = "up1" | "up2" | "down1" | "down2" | "";
|
|
2
|
+
export declare const UP1 = "up1";
|
|
3
|
+
export declare const UP2 = "up2";
|
|
4
|
+
export declare const DOWN1 = "down1";
|
|
5
|
+
export declare const DOWN2 = "down2";
|
|
6
|
+
export declare const isValidNumber: (n: unknown) => n is number;
|
|
7
|
+
export declare const shallowEquals: (o1?: {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}, o2?: {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}) => boolean;
|
|
12
|
+
export declare function getMovingValueDirection(newValue?: number, direction?: valueChangeDirection, prevValue?: number,
|
|
13
|
+
/** the number of decimal places to take into account when highlighting a change */
|
|
14
|
+
decimalPlaces?: number): valueChangeDirection;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type DatePattern = "dd.mm.yyyy";
|
|
2
|
+
export type TimePattern = "kk:mm:ss";
|
|
3
|
+
export type DateTimePattern = DatePattern | TimePattern;
|
|
4
|
+
export declare const isDatePattern: (pattern?: string) => pattern is "dd.mm.yyyy";
|
|
5
|
+
export declare const isTimePattern: (pattern?: string) => pattern is "kk:mm:ss";
|
|
6
|
+
export declare const isDateTimePattern: (pattern?: string) => pattern is DateTimePattern;
|
|
7
|
+
export declare const formatDate: (date: Date, format?: DateTimePattern) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Listener = (...args: any[]) => void;
|
|
2
|
+
export type EmittedEvents = Record<string, Listener>;
|
|
3
|
+
export declare class EventEmitter<Events extends EmittedEvents> {
|
|
4
|
+
#private;
|
|
5
|
+
addListener<E extends keyof Events>(event: E, listener: Events[E]): void;
|
|
6
|
+
removeListener<E extends keyof Events>(event: E, listener: Events[E]): void;
|
|
7
|
+
removeAllListeners<E extends keyof Events>(event?: E): void;
|
|
8
|
+
emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): void;
|
|
9
|
+
once<E extends keyof Events>(event: E, listener: Events[E]): void;
|
|
10
|
+
on<E extends keyof Events>(event: E, listener: Events[E]): void;
|
|
11
|
+
private invokeHandler;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KeyedColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
|
|
2
|
+
import { AndFilter, Filter, FilterClauseOp, FilterWithPartialClause, MultiClauseFilter, MultiValueFilterClause, OrFilter, SingleValueFilterClause } from "@vuu-ui/vuu-filter-types";
|
|
3
|
+
export declare const isValidFilterClauseOp: (op?: string) => op is FilterClauseOp;
|
|
4
|
+
export declare const isNamedFilter: (f?: Filter) => boolean;
|
|
5
|
+
export declare const isSingleValueFilter: (f?: Partial<Filter>) => f is SingleValueFilterClause<string | number | boolean>;
|
|
6
|
+
export declare const isFilterClause: (f?: Partial<Filter>) => f is MultiValueFilterClause | SingleValueFilterClause<string | number | boolean>;
|
|
7
|
+
export declare const isMultiValueFilter: (f?: Partial<Filter>) => f is MultiValueFilterClause;
|
|
8
|
+
export declare const isInFilter: (f: Partial<Filter>) => f is MultiValueFilterClause;
|
|
9
|
+
export declare const isAndFilter: (f: Partial<Filter>) => f is AndFilter;
|
|
10
|
+
export declare const isOrFilter: (f: Partial<Filter>) => f is OrFilter;
|
|
11
|
+
export declare const isCompleteFilter: (filter: Partial<Filter>) => filter is Filter;
|
|
12
|
+
export declare function isMultiClauseFilter(f?: Partial<Filter> | FilterWithPartialClause): f is MultiClauseFilter;
|
|
13
|
+
export declare const filterAsQuery: (f: Filter) => string;
|
|
14
|
+
export declare const removeColumnFromFilter: (column: KeyedColumnDescriptor, filter: Filter) => [Filter | undefined, string];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
|
|
2
|
+
export type ValueFormatter = (value: unknown) => string;
|
|
3
|
+
export type ValueFormatters = {
|
|
4
|
+
[key: string]: ValueFormatter;
|
|
5
|
+
};
|
|
6
|
+
export declare const defaultValueFormatter: (value: unknown) => string;
|
|
7
|
+
export declare const dateFormatter: (column: ColumnDescriptor) => (value: unknown) => string;
|
|
8
|
+
export declare const numericFormatter: ({ align, type, }: Partial<ColumnDescriptor>) => (value: unknown) => string;
|
|
9
|
+
export declare const getValueFormatter: (column: ColumnDescriptor) => ValueFormatter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getUniqueId: () => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const createEl: (elementType: "div" | "p" | "span", className?: string, textContent?: string) => HTMLElement;
|
|
2
|
+
export declare const getFocusableElement: (el: HTMLElement | null, tabIndex?: number) => HTMLElement | undefined;
|
|
3
|
+
export declare const getElementDataIndex: (el: HTMLElement | null) => number;
|
|
4
|
+
export declare const getClosest: (el: HTMLElement, dataProperty: string) => HTMLElement;
|
|
5
|
+
export declare const getClosestIndexItem: (el: HTMLElement) => HTMLElement;
|
|
6
|
+
export declare function getElementByDataIndex(c: HTMLElement | null, i: number | string, throwIfNotFound: true): HTMLElement;
|
|
7
|
+
export declare function getElementByDataIndex(c: HTMLElement | null, i: number | string, throwIfNotFound?: false): HTMLElement | undefined;
|
|
8
|
+
export declare const focusFirstFocusableElement: (el: HTMLElement | null, tabIndex?: number) => void;
|
|
9
|
+
export declare const isSelectableElement: (el?: HTMLElement) => boolean;
|
|
10
|
+
export declare function getScrollbarSize(): number;
|
|
11
|
+
export type MouseEventTypes = "dblclick" | "click";
|
|
12
|
+
export declare const dispatchMouseEvent: (el: HTMLElement, type: MouseEventTypes) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * from "./array-utils";
|
|
2
|
+
export * from "./box-utils";
|
|
3
|
+
export * from "./column-utils";
|
|
4
|
+
export * from "./cookie-utils";
|
|
5
|
+
export * from "./component-registry";
|
|
6
|
+
export * from "./DataWindow";
|
|
7
|
+
export * from "./common-types";
|
|
8
|
+
export * from "./data-utils";
|
|
9
|
+
export * from "./date-utils";
|
|
10
|
+
export * from "./debug-utils";
|
|
11
|
+
export * from "./filter-utils";
|
|
12
|
+
export * from "./html-utils";
|
|
13
|
+
export * from "./event-emitter";
|
|
14
|
+
export * from "./formatting-utils";
|
|
15
|
+
export * from "./getUniqueId";
|
|
16
|
+
export * from "./group-utils";
|
|
17
|
+
export * from "./input-utils";
|
|
18
|
+
export * from "./invariant";
|
|
19
|
+
export * from "./itemToString";
|
|
20
|
+
export * from "./json-utils";
|
|
21
|
+
export * from "./keyboard-utils";
|
|
22
|
+
export * from "./keyset";
|
|
23
|
+
export * from "./logging-utils";
|
|
24
|
+
export * from "./menu-utils";
|
|
25
|
+
export * from "./nanoid";
|
|
26
|
+
export * from "./round-decimal";
|
|
27
|
+
export * from "./perf-utils";
|
|
28
|
+
export * from "./range-utils";
|
|
29
|
+
export * from "./row-utils";
|
|
30
|
+
export * from "./selection-utils";
|
|
31
|
+
export * from "./sort-utils";
|
|
32
|
+
export * from "./text-utils";
|
|
33
|
+
export * from "./url-utils";
|
|
34
|
+
export * from "./screenshot-utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function invariant(condition: boolean, message: string): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { ColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
|
|
3
|
+
export type JsonData = {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
} | JsonData[];
|
|
6
|
+
export declare const jsonToDataSourceRows: (json: JsonData) => [ColumnDescriptor[], DataSourceRow[]];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ArrowUp = "ArrowUp";
|
|
2
|
+
export declare const ArrowDown = "ArrowDown";
|
|
3
|
+
export declare const ArrowLeft = "ArrowLeft";
|
|
4
|
+
export declare const ArrowRight = "ArrowRight";
|
|
5
|
+
export declare const Enter = "Enter";
|
|
6
|
+
export declare const Escape = "Escape";
|
|
7
|
+
export declare const Home = "Home";
|
|
8
|
+
export declare const End = "End";
|
|
9
|
+
export declare const PageUp = "PageUp";
|
|
10
|
+
export declare const PageDown = "PageDown";
|
|
11
|
+
export declare const Space = " ";
|
|
12
|
+
export declare const Tab = "Tab";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VuuRange } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
export declare class KeySet {
|
|
3
|
+
private keys;
|
|
4
|
+
private free;
|
|
5
|
+
private nextKeyValue;
|
|
6
|
+
constructor(range: VuuRange);
|
|
7
|
+
next(): number;
|
|
8
|
+
reset({ from, to }: VuuRange): void;
|
|
9
|
+
keyFor(rowIndex: number): number;
|
|
10
|
+
toDebugString(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
const loggingSettings: loggingSettings;
|
|
3
|
+
}
|
|
4
|
+
export interface LogFn {
|
|
5
|
+
(message?: unknown, ...optionalParams: unknown[]): void;
|
|
6
|
+
}
|
|
7
|
+
export interface AssertLogFn {
|
|
8
|
+
(condition: boolean, message?: unknown, errorMessaage?: unknown): void;
|
|
9
|
+
}
|
|
10
|
+
export interface TableLogFn {
|
|
11
|
+
(properties?: object): void;
|
|
12
|
+
}
|
|
13
|
+
type loggingSettings = {
|
|
14
|
+
loggingLevel: LogLevel;
|
|
15
|
+
};
|
|
16
|
+
export interface Logger {
|
|
17
|
+
warn: LogFn;
|
|
18
|
+
error: LogFn;
|
|
19
|
+
debug: LogFn;
|
|
20
|
+
info: LogFn;
|
|
21
|
+
}
|
|
22
|
+
export type LogLevel = keyof Logger;
|
|
23
|
+
export type BuildEnv = "production" | "development";
|
|
24
|
+
export declare const logger: (category: string) => {
|
|
25
|
+
errorEnabled: boolean;
|
|
26
|
+
error: (message: string) => void;
|
|
27
|
+
debugEnabled?: undefined;
|
|
28
|
+
infoEnabled?: undefined;
|
|
29
|
+
warnEnabled?: undefined;
|
|
30
|
+
info?: undefined;
|
|
31
|
+
warn?: undefined;
|
|
32
|
+
debug?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
debugEnabled: boolean;
|
|
35
|
+
infoEnabled: boolean;
|
|
36
|
+
warnEnabled: boolean;
|
|
37
|
+
errorEnabled: boolean;
|
|
38
|
+
info: (message: string) => void;
|
|
39
|
+
warn: (message: string) => void;
|
|
40
|
+
debug: (message: string) => void;
|
|
41
|
+
error: (message: string) => void;
|
|
42
|
+
};
|
|
43
|
+
export declare const getLoggingConfigForWorker: () => string;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const uuid: (size?: number) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type VoidFunction = (...args: any) => void;
|
|
2
|
+
export type PerfFunction<T extends VoidFunction> = (...args: Parameters<T>) => void;
|
|
3
|
+
export declare function debounce<T extends VoidFunction>(callback: T, timeInterval: number): PerfFunction<T>;
|
|
4
|
+
export declare function throttle<T extends VoidFunction>(callback: T, limit: number): PerfFunction<T>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface VuuRange {
|
|
2
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
bufferSize?: number;
|
|
5
|
+
reset?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface FromToRange {
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const NULL_RANGE: VuuRange;
|
|
12
|
+
export declare function getFullRange({ from, to }: VuuRange, bufferSize?: number, rowCount?: number): FromToRange;
|
|
13
|
+
export declare function resetRange({ from, to, bufferSize }: VuuRange): VuuRange;
|
|
14
|
+
export declare const withinRange: (value: number, { from, to }: VuuRange) => boolean;
|
|
15
|
+
export declare const rangeNewItems: ({ from: from1, to: to1 }: VuuRange, newRange: VuuRange) => VuuRange;
|
|
16
|
+
export declare class WindowRange {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
constructor(from: number, to: number);
|
|
20
|
+
isWithin(index: number): boolean;
|
|
21
|
+
overlap(from: number, to: number): [number, number];
|
|
22
|
+
copy(): WindowRange;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function roundDecimal(value?: number, align?: string, decimals?: number, zeroPad?: boolean, alignOnDecimals?: boolean): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { MutableRefObject } from "react";
|
|
3
|
+
export type RowOffsetFunc = (row: DataSourceRow, pctScrollTop?: number) => number;
|
|
4
|
+
export type RowAtPositionFunc = (position: number) => number;
|
|
5
|
+
export type RowPositioning = [RowOffsetFunc, RowAtPositionFunc];
|
|
6
|
+
export declare const actualRowPositioning: (rowHeight: number) => RowPositioning;
|
|
7
|
+
export declare const virtualRowPositioning: (rowHeight: number, additionalPixelsNeeded: number, pctScrollTop: MutableRefObject<number>) => RowPositioning;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { Selection, SelectionItem, TableSelectionModel } from "@vuu-ui/vuu-datagrid-types";
|
|
3
|
+
export declare const RowSelected: {
|
|
4
|
+
False: number;
|
|
5
|
+
True: number;
|
|
6
|
+
First: number;
|
|
7
|
+
Last: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const isRowSelected: (row: DataSourceRow) => boolean;
|
|
10
|
+
export declare const deselectItem: (selectionModel: TableSelectionModel, selected: Selection, itemIndex: number, rangeSelect: boolean, keepExistingSelection?: boolean) => Selection;
|
|
11
|
+
export declare const selectItem: (selectionModel: TableSelectionModel, selected: Selection, itemIndex: number, rangeSelect: boolean, keepExistingSelection?: boolean, activeItemIndex?: number) => Selection;
|
|
12
|
+
/**
|
|
13
|
+
* Determine the value for selected. We use a bitmap to represent a number of selection states
|
|
14
|
+
* a row might exhibit. selected/not-selected is the fundamental value. We also identify first
|
|
15
|
+
* row of a selected block, last row of a selected block;
|
|
16
|
+
*/
|
|
17
|
+
export declare const getSelectionStatus: (selected: Selection, itemIndex: number) => number;
|
|
18
|
+
export declare const isSelected: (selected: Selection, itemIndex: number) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Vuu server expects a full list if indexes of selected rows. Client represents selection in a more
|
|
21
|
+
* efficient structure. This converts client structure to full server format.
|
|
22
|
+
*/
|
|
23
|
+
export declare const expandSelection: (selected: Selection) => number[];
|
|
24
|
+
export type SelectionDiff = {
|
|
25
|
+
added: SelectionItem[];
|
|
26
|
+
removed: SelectionItem[];
|
|
27
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ColumnDescriptor, KeyedColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
|
|
2
|
+
import { VuuSort, VuuSortType } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
+
export declare const applySort: ({ sortDefs }: VuuSort, { name: column }: ColumnDescriptor, extendSort?: boolean, sortType?: VuuSortType) => VuuSort;
|
|
4
|
+
export declare const setSortColumn: ({ sortDefs }: VuuSort, column: KeyedColumnDescriptor, sortType?: "A" | "D") => VuuSort;
|
|
5
|
+
export declare const addSortColumn: ({ sortDefs }: VuuSort, column: KeyedColumnDescriptor, sortType?: "A" | "D") => VuuSort;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./use-resize-observer";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export interface DragDropContextProps {
|
|
3
|
-
dragSources?: Map<string, string[]>;
|
|
4
|
-
dropTargets?: Map<string, string[]>;
|
|
5
|
-
registerDragDropParty: (id: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export type DragSources = {
|
|
8
|
-
[key: string]: {
|
|
9
|
-
dropTargets: string | string[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export interface DragDropProviderProps {
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
dragSources: DragSources;
|
|
15
|
-
}
|
|
16
|
-
export declare const DragDropProvider: ({ children, dragSources: dragSourcesProp, }: DragDropProviderProps) => JSX.Element;
|
|
17
|
-
export interface DragDropProviderResult {
|
|
18
|
-
isDragSource: boolean;
|
|
19
|
-
isDropTarget: boolean;
|
|
20
|
-
register: (id: string) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const useDragDropProvider: (id?: string) => DragDropProviderResult;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { orientationType } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { Direction } from "./dragDropTypesNext";
|
|
3
|
-
export type MeasuredDropTarget = {
|
|
4
|
-
currentIndex: number;
|
|
5
|
-
dataIndex?: number;
|
|
6
|
-
element: HTMLElement;
|
|
7
|
-
index: number;
|
|
8
|
-
order: number | undefined;
|
|
9
|
-
isDraggedElement: boolean;
|
|
10
|
-
isOverflowIndicator?: boolean;
|
|
11
|
-
start: number;
|
|
12
|
-
end: number;
|
|
13
|
-
mid: number;
|
|
14
|
-
size: number;
|
|
15
|
-
};
|
|
16
|
-
export type targetType = {
|
|
17
|
-
element: HTMLElement | null;
|
|
18
|
-
index: number;
|
|
19
|
-
isLast?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type Dimension = keyof Pick<DOMRect, "width" | "height">;
|
|
22
|
-
export declare const measureElementSizePositionAndOrder: (element: HTMLElement, dimension?: Dimension, includeAutoMargin?: boolean) => [number, number, number | undefined];
|
|
23
|
-
export declare const dimensions: (orientation: orientationType) => {
|
|
24
|
-
CLIENT_SIZE: "scrollTop" | "scrollHeight" | "scrollLeft" | "scrollWidth" | "clientWidth" | "clientHeight";
|
|
25
|
-
CONTRA: "x" | "y" | "width" | "left" | "right" | "top" | "bottom" | "height";
|
|
26
|
-
CONTRA_POS: "clientX" | "clientY";
|
|
27
|
-
DIMENSION: "width" | "height";
|
|
28
|
-
END: "x" | "y" | "width" | "left" | "right" | "top" | "bottom" | "height";
|
|
29
|
-
POS: "clientX" | "clientY";
|
|
30
|
-
SCROLL_POS: "scrollTop" | "scrollHeight" | "scrollLeft" | "scrollWidth" | "clientWidth" | "clientHeight";
|
|
31
|
-
SCROLL_SIZE: "scrollTop" | "scrollHeight" | "scrollLeft" | "scrollWidth" | "clientWidth" | "clientHeight";
|
|
32
|
-
START: "x" | "y" | "width" | "left" | "right" | "top" | "bottom" | "height";
|
|
33
|
-
} | {
|
|
34
|
-
CLIENT_SIZE: "scrollTop" | "scrollHeight" | "scrollLeft" | "scrollWidth" | "clientWidth" | "clientHeight";
|
|
35
|
-
CONTRA: "x" | "y" | "width" | "left" | "right" | "top" | "bottom" | "height";
|
|
36
|
-
CONTRA_POS: "clientX" | "clientY";
|
|
37
|
-
DIMENSION: "width" | "height";
|
|
38
|
-
END: "x" | "y" | "width" | "left" | "right" | "top" | "bottom" | "height";
|
|
39
|
-
POS: "clientX" | "clientY";
|
|
40
|
-
SCROLL_POS: "scrollTop" | "scrollHeight" | "scrollLeft" | "scrollWidth" | "clientWidth" | "clientHeight";
|
|
41
|
-
SCROLL_SIZE: "scrollTop" | "scrollHeight" | "scrollLeft" | "scrollWidth" | "clientWidth" | "clientHeight";
|
|
42
|
-
START: "x" | "y" | "width" | "left" | "right" | "top" | "bottom" | "height";
|
|
43
|
-
};
|
|
44
|
-
export declare const getDraggedItem: (measuredItems: MeasuredDropTarget[]) => MeasuredDropTarget;
|
|
45
|
-
export declare const moveDragItem: (measuredItems: MeasuredDropTarget[], dropTarget: MeasuredDropTarget) => MeasuredDropTarget[];
|
|
46
|
-
export declare const isDraggedElement: (item: MeasuredDropTarget) => boolean;
|
|
47
|
-
export declare const measureDropTargets: (container: HTMLElement, orientation: orientationType, draggedItem: HTMLElement, itemQuery?: string) => MeasuredDropTarget[];
|
|
48
|
-
export declare const getNextDropTarget: (dropTargets: MeasuredDropTarget[], pos: number, direction: Direction) => MeasuredDropTarget | null;
|
|
49
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MeasuredDropTarget } from "./drag-utils";
|
|
2
|
-
import { Direction } from "./dragDropTypesNext";
|
|
3
|
-
export declare const useDragSpacers: () => {
|
|
4
|
-
displaceItem: (item: MeasuredDropTarget | null | undefined, draggedItem: MeasuredDropTarget, useTransition?: any, direction?: Direction) => void;
|
|
5
|
-
displaceLastItem: (item: MeasuredDropTarget, size: number, useTransition?: any) => void;
|
|
6
|
-
clearSpacers: () => void;
|
|
7
|
-
};
|
package/types/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { NavigationHookProps, NavigationHookResult } from "./navigationTypes";
|
|
2
|
-
import { SelectionStrategy } from "./selectionTypes";
|
|
3
|
-
export declare const LIST_FOCUS_VISIBLE = -2;
|
|
4
|
-
export declare const useKeyboardNavigation: <Item, Selection_1 extends SelectionStrategy>({ containerRef, defaultHighlightedIndex, disableHighlightOnFocus, highlightedIndex: highlightedIndexProp, indexPositions, onHighlight, onKeyboardNavigation, restoreLastFocus, selected, }: NavigationHookProps<Item, Selection_1>) => NavigationHookResult;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MenuActionHandler } from "packages/vuu-data-types";
|
|
3
|
-
import "./TabMenu.css";
|
|
4
|
-
export interface TabMenuProps {
|
|
5
|
-
allowClose: boolean;
|
|
6
|
-
allowRename: boolean;
|
|
7
|
-
location?: string;
|
|
8
|
-
onMenuAction: MenuActionHandler;
|
|
9
|
-
onMenuClose?: () => void;
|
|
10
|
-
index: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const TabMenu: ({ allowClose, allowRename, location, onMenuAction, onMenuClose, index, }: TabMenuProps) => JSX.Element;
|
package/types/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./escapeRegExp";
|