@vuu-ui/vuu-table 0.8.11-debug → 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.
Files changed (179) hide show
  1. package/LICENSE +201 -0
  2. package/cjs/index.js +1 -5126
  3. package/cjs/index.js.map +3 -3
  4. package/esm/index.js +1 -5237
  5. package/esm/index.js.map +3 -3
  6. package/index.css +1 -1027
  7. package/index.css.map +3 -3
  8. package/package.json +9 -9
  9. package/types/vuu-layout/src/Component.d.ts +7 -0
  10. package/types/vuu-layout/src/DraggableLayout.d.ts +7 -0
  11. package/types/vuu-layout/src/dock-layout/DockLayout.d.ts +10 -0
  12. package/types/vuu-layout/src/dock-layout/Drawer.d.ts +18 -0
  13. package/types/vuu-layout/src/dock-layout/index.d.ts +2 -0
  14. package/types/vuu-layout/src/drag-drop/BoxModel.d.ts +143 -0
  15. package/types/vuu-layout/src/drag-drop/DragState.d.ts +46 -0
  16. package/types/vuu-layout/src/drag-drop/Draggable.d.ts +24 -0
  17. package/types/vuu-layout/src/drag-drop/DropMenu.d.ts +10 -0
  18. package/types/vuu-layout/src/drag-drop/DropTarget.d.ts +61 -0
  19. package/types/vuu-layout/src/drag-drop/DropTargetRenderer.d.ts +18 -0
  20. package/types/vuu-layout/src/drag-drop/dragDropTypes.d.ts +51 -0
  21. package/types/vuu-layout/src/drag-drop/index.d.ts +4 -0
  22. package/types/vuu-layout/src/flexbox/Flexbox.d.ts +5 -0
  23. package/types/vuu-layout/src/flexbox/FlexboxLayout.d.ts +6 -0
  24. package/types/vuu-layout/src/flexbox/FluidGrid.d.ts +7 -0
  25. package/types/vuu-layout/src/flexbox/FluidGridLayout.d.ts +6 -0
  26. package/types/vuu-layout/src/flexbox/Splitter.d.ts +13 -0
  27. package/types/vuu-layout/src/flexbox/flexbox-utils.d.ts +12 -0
  28. package/types/vuu-layout/src/flexbox/flexboxTypes.d.ts +51 -0
  29. package/types/vuu-layout/src/flexbox/index.d.ts +4 -0
  30. package/types/vuu-layout/src/flexbox/useResponsiveSizing.d.ts +10 -0
  31. package/types/vuu-layout/src/flexbox/useSplitterResizing.d.ts +2 -0
  32. package/types/vuu-layout/src/index.d.ts +22 -0
  33. package/types/vuu-layout/src/layout-action.d.ts +22 -0
  34. package/types/vuu-layout/src/layout-header/Header.d.ts +13 -0
  35. package/types/vuu-layout/src/layout-header/index.d.ts +1 -0
  36. package/types/vuu-layout/src/layout-persistence/LayoutPersistenceManager.d.ts +53 -0
  37. package/types/vuu-layout/src/layout-persistence/LocalLayoutPersistenceManager.d.ts +18 -0
  38. package/types/vuu-layout/src/layout-persistence/data.d.ts +3 -0
  39. package/types/vuu-layout/src/layout-persistence/index.d.ts +4 -0
  40. package/types/vuu-layout/src/layout-persistence/useLayoutContextMenuItems.d.ts +8 -0
  41. package/types/vuu-layout/src/layout-provider/LayoutProvider.d.ts +15 -0
  42. package/types/vuu-layout/src/layout-provider/LayoutProviderContext.d.ts +9 -0
  43. package/types/vuu-layout/src/layout-provider/index.d.ts +2 -0
  44. package/types/vuu-layout/src/layout-provider/useLayoutDragDrop.d.ts +4 -0
  45. package/types/vuu-layout/src/layout-reducer/flexUtils.d.ts +22 -0
  46. package/types/vuu-layout/src/layout-reducer/index.d.ts +4 -0
  47. package/types/vuu-layout/src/layout-reducer/insert-layout-element.d.ts +8 -0
  48. package/types/vuu-layout/src/layout-reducer/layout-reducer.d.ts +3 -0
  49. package/types/vuu-layout/src/layout-reducer/layoutTypes.d.ts +168 -0
  50. package/types/vuu-layout/src/layout-reducer/layoutUtils.d.ts +31 -0
  51. package/types/vuu-layout/src/layout-reducer/move-layout-element.d.ts +3 -0
  52. package/types/vuu-layout/src/layout-reducer/remove-layout-element.d.ts +3 -0
  53. package/types/vuu-layout/src/layout-reducer/replace-layout-element.d.ts +6 -0
  54. package/types/vuu-layout/src/layout-reducer/resize-flex-children.d.ts +4 -0
  55. package/types/vuu-layout/src/layout-reducer/wrap-layout-element.d.ts +9 -0
  56. package/types/vuu-layout/src/layout-view/View.d.ts +11 -0
  57. package/types/vuu-layout/src/layout-view/ViewContext.d.ts +30 -0
  58. package/types/vuu-layout/src/layout-view/index.d.ts +4 -0
  59. package/types/vuu-layout/src/layout-view/useView.d.ts +21 -0
  60. package/types/vuu-layout/src/layout-view/useViewActionDispatcher.d.ts +9 -0
  61. package/types/vuu-layout/src/layout-view/useViewResize.d.ts +7 -0
  62. package/types/vuu-layout/src/layout-view/viewTypes.d.ts +21 -0
  63. package/types/vuu-layout/src/measured-container/MeasuredContainer.d.ts +9 -0
  64. package/types/vuu-layout/src/measured-container/index.d.ts +2 -0
  65. package/types/{table → vuu-layout/src/measured-container}/useMeasuredContainer.d.ts +6 -14
  66. package/types/vuu-layout/src/measured-container/useResizeObserver.d.ts +15 -0
  67. package/types/vuu-layout/src/overflow-container/OverflowContainer.d.ts +17 -0
  68. package/types/vuu-layout/src/overflow-container/index.d.ts +2 -0
  69. package/types/vuu-layout/src/overflow-container/overflow-utils.d.ts +49 -0
  70. package/types/vuu-layout/src/overflow-container/useOverflowContainer.d.ts +20 -0
  71. package/types/vuu-layout/src/palette/Palette.d.ts +22 -0
  72. package/types/vuu-layout/src/palette/index.d.ts +1 -0
  73. package/types/vuu-layout/src/placeholder/Placeholder.d.ts +12 -0
  74. package/types/vuu-layout/src/placeholder/index.d.ts +1 -0
  75. package/types/vuu-layout/src/registry/ComponentRegistry.d.ts +13 -0
  76. package/types/vuu-layout/src/registry/index.d.ts +1 -0
  77. package/types/vuu-layout/src/responsive/breakpoints.d.ts +4 -0
  78. package/types/vuu-layout/src/responsive/index.d.ts +3 -0
  79. package/types/vuu-layout/src/responsive/use-breakpoints.d.ts +7 -0
  80. package/types/vuu-layout/src/responsive/useResizeObserver.d.ts +13 -0
  81. package/types/vuu-layout/src/responsive/utils.d.ts +6 -0
  82. package/types/vuu-layout/src/stack/Stack.d.ts +4 -0
  83. package/types/vuu-layout/src/stack/StackLayout.d.ts +7 -0
  84. package/types/vuu-layout/src/stack/index.d.ts +3 -0
  85. package/types/vuu-layout/src/stack/stackTypes.d.ts +21 -0
  86. package/types/vuu-layout/src/toolbar/Toolbar.d.ts +19 -0
  87. package/types/vuu-layout/src/toolbar/index.d.ts +1 -0
  88. package/types/vuu-layout/src/toolbar/toolbar-dom-utils.d.ts +3 -0
  89. package/types/vuu-layout/src/toolbar/useKeyboardNavigation.d.ts +32 -0
  90. package/types/vuu-layout/src/toolbar/useSelection.d.ts +22 -0
  91. package/types/vuu-layout/src/toolbar/useToolbar.d.ts +28 -0
  92. package/types/vuu-layout/src/tools/config-wrapper/ConfigWrapper.d.ts +2 -0
  93. package/types/vuu-layout/src/tools/config-wrapper/index.d.ts +1 -0
  94. package/types/vuu-layout/src/tools/devtools-box/layout-configurator.d.ts +31 -0
  95. package/types/vuu-layout/src/tools/devtools-tree/layout-tree-viewer.d.ts +5 -0
  96. package/types/vuu-layout/src/tools/index.d.ts +3 -0
  97. package/types/vuu-layout/src/use-persistent-state.d.ts +11 -0
  98. package/types/vuu-layout/src/utils/index.d.ts +6 -0
  99. package/types/vuu-layout/src/utils/pathUtils.d.ts +31 -0
  100. package/types/vuu-layout/src/utils/propUtils.d.ts +5 -0
  101. package/types/vuu-layout/src/utils/react-utils.d.ts +4 -0
  102. package/types/vuu-layout/src/utils/refUtils.d.ts +2 -0
  103. package/types/vuu-layout/src/utils/styleUtils.d.ts +3 -0
  104. package/types/vuu-layout/src/utils/typeOf.d.ts +4 -0
  105. package/types/{table → vuu-table/src/table}/Table.d.ts +5 -1
  106. package/types/{table → vuu-table/src/table}/dataTableTypes.d.ts +9 -4
  107. package/types/{table-next → vuu-table/src/table-next}/useKeyboardNavigation.d.ts +4 -2
  108. package/types/{table-next → vuu-table/src/table-next}/useTableModel.d.ts +1 -0
  109. package/types/{table-next → vuu-table/src/table-next}/useTableNext.d.ts +3 -2
  110. /package/types/{index.d.ts → vuu-table/src/index.d.ts} +0 -0
  111. /package/types/{table → vuu-table/src/table}/ColumnResizer.d.ts +0 -0
  112. /package/types/{table → vuu-table/src/table}/DragVisualizer.d.ts +0 -0
  113. /package/types/{table → vuu-table/src/table}/RowBasedTable.d.ts +0 -0
  114. /package/types/{table → vuu-table/src/table}/SortIndicator.d.ts +0 -0
  115. /package/types/{table → vuu-table/src/table}/TableCell.d.ts +0 -0
  116. /package/types/{table → vuu-table/src/table}/TableGroupCell.d.ts +0 -0
  117. /package/types/{table → vuu-table/src/table}/TableGroupHeaderCell.d.ts +0 -0
  118. /package/types/{table → vuu-table/src/table}/TableHeaderCell.d.ts +0 -0
  119. /package/types/{table → vuu-table/src/table}/TableRow.d.ts +0 -0
  120. /package/types/{table → vuu-table/src/table}/cell-renderers/index.d.ts +0 -0
  121. /package/types/{table → vuu-table/src/table}/cell-renderers/json-cell/JsonCell.d.ts +0 -0
  122. /package/types/{table → vuu-table/src/table}/cell-renderers/json-cell/index.d.ts +0 -0
  123. /package/types/{table → vuu-table/src/table}/context-menu/buildContextMenuDescriptors.d.ts +0 -0
  124. /package/types/{table → vuu-table/src/table}/context-menu/index.d.ts +0 -0
  125. /package/types/{table → vuu-table/src/table}/context-menu/useTableContextMenu.d.ts +0 -0
  126. /package/types/{table → vuu-table/src/table}/filter-indicator.d.ts +0 -0
  127. /package/types/{table → vuu-table/src/table}/index.d.ts +0 -0
  128. /package/types/{table → vuu-table/src/table}/keyUtils.d.ts +0 -0
  129. /package/types/{table → vuu-table/src/table}/useDataSource.d.ts +0 -0
  130. /package/types/{table → vuu-table/src/table}/useDraggableColumn.d.ts +0 -0
  131. /package/types/{table → vuu-table/src/table}/useKeyboardNavigation.d.ts +0 -0
  132. /package/types/{table-next → vuu-table/src/table}/useMeasuredContainer.d.ts +0 -0
  133. /package/types/{table → vuu-table/src/table}/useMeasuredSize.d.ts +0 -0
  134. /package/types/{table → vuu-table/src/table}/useResizeObserver.d.ts +0 -0
  135. /package/types/{table → vuu-table/src/table}/useSelection.d.ts +0 -0
  136. /package/types/{table → vuu-table/src/table}/useTable.d.ts +0 -0
  137. /package/types/{table → vuu-table/src/table}/useTableColumnResize.d.ts +0 -0
  138. /package/types/{table → vuu-table/src/table}/useTableModel.d.ts +0 -0
  139. /package/types/{table → vuu-table/src/table}/useTableScroll.d.ts +0 -0
  140. /package/types/{table → vuu-table/src/table}/useVirtualViewport.d.ts +0 -0
  141. /package/types/{table-next → vuu-table/src/table-next}/Row.d.ts +0 -0
  142. /package/types/{table-next → vuu-table/src/table-next}/TableNext.d.ts +0 -0
  143. /package/types/{table-next → vuu-table/src/table-next}/cell-renderers/dropdown-cell/DropdownCell.d.ts +0 -0
  144. /package/types/{table-next → vuu-table/src/table-next}/cell-renderers/dropdown-cell/index.d.ts +0 -0
  145. /package/types/{table-next → vuu-table/src/table-next}/cell-renderers/index.d.ts +0 -0
  146. /package/types/{table-next → vuu-table/src/table-next}/cell-renderers/input-cell/InputCell.d.ts +0 -0
  147. /package/types/{table-next → vuu-table/src/table-next}/cell-renderers/input-cell/index.d.ts +0 -0
  148. /package/types/{table-next → vuu-table/src/table-next}/column-header-pill/ColumnHeaderPill.d.ts +0 -0
  149. /package/types/{table-next → vuu-table/src/table-next}/column-header-pill/GroupColumnPill.d.ts +0 -0
  150. /package/types/{table-next → vuu-table/src/table-next}/column-header-pill/SortIndicator.d.ts +0 -0
  151. /package/types/{table-next → vuu-table/src/table-next}/column-header-pill/index.d.ts +0 -0
  152. /package/types/{table-next → vuu-table/src/table-next}/column-menu/ColumnMenu.d.ts +0 -0
  153. /package/types/{table-next → vuu-table/src/table-next}/column-menu/index.d.ts +0 -0
  154. /package/types/{table-next → vuu-table/src/table-next}/column-resizing/ColumnResizer.d.ts +0 -0
  155. /package/types/{table-next → vuu-table/src/table-next}/column-resizing/index.d.ts +0 -0
  156. /package/types/{table-next → vuu-table/src/table-next}/column-resizing/useTableColumnResize.d.ts +0 -0
  157. /package/types/{table-next → vuu-table/src/table-next}/context-menu/buildContextMenuDescriptors.d.ts +0 -0
  158. /package/types/{table-next → vuu-table/src/table-next}/context-menu/index.d.ts +0 -0
  159. /package/types/{table-next → vuu-table/src/table-next}/context-menu/useTableContextMenu.d.ts +0 -0
  160. /package/types/{table-next → vuu-table/src/table-next}/header-cell/GroupHeaderCell.d.ts +0 -0
  161. /package/types/{table-next → vuu-table/src/table-next}/header-cell/GroupHeaderCellNext.d.ts +0 -0
  162. /package/types/{table-next → vuu-table/src/table-next}/header-cell/HeaderCell.d.ts +0 -0
  163. /package/types/{table-next → vuu-table/src/table-next}/header-cell/index.d.ts +0 -0
  164. /package/types/{table-next → vuu-table/src/table-next}/index.d.ts +0 -0
  165. /package/types/{table-next → vuu-table/src/table-next}/moving-window.d.ts +0 -0
  166. /package/types/{table-next → vuu-table/src/table-next}/table-cell/TableCell.d.ts +0 -0
  167. /package/types/{table-next → vuu-table/src/table-next}/table-cell/TableGroupCell.d.ts +0 -0
  168. /package/types/{table-next → vuu-table/src/table-next}/table-cell/index.d.ts +0 -0
  169. /package/types/{table-next → vuu-table/src/table-next}/table-config.d.ts +0 -0
  170. /package/types/{table-next → vuu-table/src/table-next}/table-dom-utils.d.ts +0 -0
  171. /package/types/{table-next → vuu-table/src/table-next}/useCell.d.ts +0 -0
  172. /package/types/{table-next → vuu-table/src/table-next}/useCellEditing.d.ts +0 -0
  173. /package/types/{table-next → vuu-table/src/table-next}/useDataSource.d.ts +0 -0
  174. /package/types/{table-next → vuu-table/src/table-next}/useInitialValue.d.ts +0 -0
  175. /package/types/{table-next → vuu-table/src/table-next}/useResizeObserver.d.ts +0 -0
  176. /package/types/{table-next → vuu-table/src/table-next}/useTableContextMenu.d.ts +0 -0
  177. /package/types/{table-next → vuu-table/src/table-next}/useTableScroll.d.ts +0 -0
  178. /package/types/{table-next → vuu-table/src/table-next}/useTableViewport.d.ts +0 -0
  179. /package/types/{table-next → vuu-table/src/table-next}/useVirtualViewport.d.ts +0 -0
@@ -0,0 +1,4 @@
1
+ import React, { ReactElement } from "react";
2
+ import { LayoutResizeAction, SplitterResizeAction } from "./layoutTypes";
3
+ export declare function resizeFlexChild(layoutRoot: ReactElement, { path, size }: LayoutResizeAction): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
4
+ export declare function resizeFlexChildren(layoutRoot: ReactElement, { path, sizes }: SplitterResizeAction): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1,9 @@
1
+ import { ReactElement } from "react";
2
+ import { DropPos } from "../drag-drop/dragDropTypes";
3
+ import { DropTarget } from "../drag-drop/DropTarget";
4
+ export interface LayoutSpec {
5
+ type: "Stack" | "Flexbox";
6
+ flexDirection: "column" | "row";
7
+ showTabs?: boolean;
8
+ }
9
+ export declare function wrap(container: ReactElement, existingComponent: any, newComponent: any, pos: DropPos, clientRect?: DropTarget["clientRect"], dropRect?: DropTarget["dropRect"]): ReactElement;
@@ -0,0 +1,11 @@
1
+ import { ForwardedRef, ReactElement } from "react";
2
+ import { ViewProps } from "./viewTypes";
3
+ import "./View.css";
4
+ interface ViewComponentType {
5
+ (props: ViewProps & {
6
+ ref?: ForwardedRef<HTMLDivElement>;
7
+ }): ReactElement<ViewProps>;
8
+ displayName?: string;
9
+ }
10
+ declare const MemoView: ViewComponentType;
11
+ export { MemoView as View };
@@ -0,0 +1,30 @@
1
+ import React, { SyntheticEvent } from "react";
2
+ import { ViewAction } from "./viewTypes";
3
+ export type ViewDispatch = <Action extends ViewAction = ViewAction>(action: Action, evt?: SyntheticEvent) => Promise<boolean | void>;
4
+ /**
5
+ * This API is available to any Feature hosted within Vuu (as all Features are wrapped
6
+ * with View component). It offers metadata about the View as well as access to the
7
+ * Vuu persistencew API;
8
+ */
9
+ export interface ViewContextAPI {
10
+ /**
11
+ * disdpatcher for View actions. These are a subset of LayoutActions, specifically for
12
+ * View manipulation
13
+ */
14
+ dispatch?: ViewDispatch | null;
15
+ id?: string;
16
+ load?: (key?: string) => unknown;
17
+ loadSession?: (key?: string) => unknown;
18
+ onConfigChange?: (config: unknown) => void;
19
+ path?: string;
20
+ purge?: (key: string) => void;
21
+ save?: (state: unknown, key: string) => void;
22
+ saveSession?: (state: unknown, key: string) => void;
23
+ setComponentProps: (props: {
24
+ [key: string]: unknown;
25
+ }) => void;
26
+ title?: string;
27
+ }
28
+ export declare const ViewContext: React.Context<ViewContextAPI>;
29
+ export declare const useViewDispatch: () => ViewDispatch | null;
30
+ export declare const useViewContext: () => ViewContextAPI;
@@ -0,0 +1,4 @@
1
+ export * from './useViewActionDispatcher';
2
+ export * from './View';
3
+ export * from './ViewContext';
4
+ export * from './viewTypes';
@@ -0,0 +1,21 @@
1
+ import { RefObject } from "react";
2
+ export interface ViewHookProps {
3
+ id: string;
4
+ rootRef: RefObject<HTMLDivElement>;
5
+ path?: string;
6
+ dropTargets?: string[];
7
+ title?: string;
8
+ }
9
+ export declare const useView: ({ id, rootRef, path, dropTargets, title: titleProp, }: ViewHookProps) => {
10
+ contributions: import("./useViewActionDispatcher").Contribution[] | undefined;
11
+ dispatchViewAction: import("./ViewContext").ViewDispatch;
12
+ load: (key?: string) => any;
13
+ loadSession: (key?: string) => any;
14
+ onConfigChange: ({ type: key, ...config }: any) => void;
15
+ onEditTitle: (title: string) => void;
16
+ purge: (key: any) => void;
17
+ restoredState: any;
18
+ save: (state: any, key: any) => void;
19
+ saveSession: (state: any, key: any) => void;
20
+ title: any;
21
+ };
@@ -0,0 +1,9 @@
1
+ import { ReactElement, RefObject } from "react";
2
+ import { ViewDispatch } from "./ViewContext";
3
+ export type ContributionLocation = "post-title" | "pre-title";
4
+ export type Contribution = {
5
+ index?: number;
6
+ location?: ContributionLocation;
7
+ content: ReactElement;
8
+ };
9
+ export declare const useViewActionDispatcher: (id: string, root: RefObject<HTMLDivElement>, viewPath?: string, dropTargets?: string[]) => [ViewDispatch, Contribution[] | undefined];
@@ -0,0 +1,7 @@
1
+ import { RefObject } from "react";
2
+ export interface ViewResizeHookProps {
3
+ mainRef: RefObject<HTMLDivElement>;
4
+ resize?: "defer" | "responsive";
5
+ rootRef: RefObject<HTMLDivElement>;
6
+ }
7
+ export declare const useViewResize: ({ mainRef, resize, rootRef, }: ViewResizeHookProps) => void;
@@ -0,0 +1,21 @@
1
+ import { FunctionComponent, HTMLAttributes } from "react";
2
+ import { HeaderProps } from "../layout-header";
3
+ import { AddToolbarContributionViewAction, MaximizeAction, MinimizeAction, MousedownViewAction, RemoveAction, RemoveToolbarContributionViewAction, RestoreAction, TearoutAction } from "../layout-reducer";
4
+ export type ViewAction = MaximizeAction | MinimizeAction | MousedownViewAction | RemoveAction | RestoreAction | TearoutAction | AddToolbarContributionViewAction | RemoveToolbarContributionViewAction;
5
+ export type ResizeStrategy = "defer" | "responsive";
6
+ export interface ViewProps extends HTMLAttributes<HTMLDivElement> {
7
+ Header?: FunctionComponent<HeaderProps>;
8
+ closeable?: boolean;
9
+ collapsed?: boolean;
10
+ "data-path"?: string;
11
+ "data-resizeable"?: boolean;
12
+ dropTargets?: string[];
13
+ expanded?: boolean;
14
+ flexFill?: boolean;
15
+ header?: boolean | Partial<HeaderProps>;
16
+ orientation?: "vertical" | "horizontal";
17
+ path?: string;
18
+ resize?: ResizeStrategy;
19
+ resizeable?: boolean;
20
+ tearOut?: boolean;
21
+ }
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { MeasuredSize } from "./useMeasuredContainer";
3
+ import "./MeasuredContainer.css";
4
+ export interface MeasuredContainerProps extends HTMLAttributes<HTMLDivElement> {
5
+ height?: number | string;
6
+ onResize?: (size: MeasuredSize) => void;
7
+ width?: number | string;
8
+ }
9
+ export declare const MeasuredContainer: import("react").ForwardRefExoticComponent<MeasuredContainerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export * from "./MeasuredContainer";
2
+ export * from "./useMeasuredContainer";
@@ -1,30 +1,22 @@
1
- import { RefObject } from "react";
1
+ import { CSSProperties, RefObject } from "react";
2
+ import { MeasuredContainerProps } from "./MeasuredContainer";
2
3
  export interface ClientSize {
3
4
  clientHeight: number;
4
5
  clientWidth: number;
5
6
  }
6
- export interface MeasuredProps {
7
+ export interface MeasuredProps extends Pick<MeasuredContainerProps, "height" | "onResize" | "width"> {
7
8
  defaultHeight?: number;
8
9
  defaultWidth?: number;
9
- height?: number;
10
- width?: number;
11
- }
12
- export interface Size {
13
- height: number | "100%";
14
- width: number | "100%";
15
10
  }
11
+ export type CssSize = Pick<CSSProperties, "height" | "width">;
16
12
  export interface MeasuredSize {
17
13
  height: number;
18
14
  width: number;
19
15
  }
20
- export type CssSize = {
21
- height: string;
22
- width: string;
23
- };
24
16
  export interface MeasuredContainerHookResult {
25
17
  containerRef: RefObject<HTMLDivElement>;
26
18
  cssSize: CssSize;
27
- outerSize: Size;
19
+ outerSize: CssSize;
28
20
  innerSize?: MeasuredSize;
29
21
  }
30
- export declare const useMeasuredContainer: ({ defaultHeight, defaultWidth, height, width, }: MeasuredProps) => MeasuredContainerHookResult;
22
+ export declare const useMeasuredContainer: ({ defaultHeight, defaultWidth, height, onResize: onResizeProp, width, }: MeasuredProps) => MeasuredContainerHookResult;
@@ -0,0 +1,15 @@
1
+ import { RefObject } from "react";
2
+ export declare const WidthHeight: string[];
3
+ export declare const WidthOnly: string[];
4
+ export type measurements<T = string | number> = {
5
+ height?: T;
6
+ clientHeight?: number;
7
+ clientWidth?: number;
8
+ contentHeight?: number;
9
+ contentWidth?: number;
10
+ scrollHeight?: number;
11
+ scrollWidth?: number;
12
+ width?: T;
13
+ };
14
+ export type ResizeHandler = (measurements: measurements<number>) => void;
15
+ export declare function useResizeObserver(ref: RefObject<Element | HTMLElement | null>, dimensions: readonly string[], onResize: ResizeHandler, reportInitialSize?: boolean): void;
@@ -0,0 +1,17 @@
1
+ import { PopupMenuProps } from "@vuu-ui/vuu-popups";
2
+ import { orientationType } from "@vuu-ui/vuu-utils";
3
+ import React, { HTMLAttributes } from "react";
4
+ import { OverflowItem } from "./overflow-utils";
5
+ import "./OverflowContainer.css";
6
+ export interface OverflowContainerProps extends HTMLAttributes<HTMLDivElement> {
7
+ PopupMenuProps?: Partial<PopupMenuProps>;
8
+ allowDragDrop?: boolean;
9
+ debugId?: string;
10
+ height: number;
11
+ onMoveItem?: (fromIndex: number, toIndex: number) => void;
12
+ onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void;
13
+ orientation?: orientationType;
14
+ overflowIcon?: string;
15
+ overflowPosition?: "start" | "end" | number;
16
+ }
17
+ export declare const OverflowContainer: React.ForwardRefExoticComponent<OverflowContainerProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export * from "./OverflowContainer";
2
+ export * from "./overflow-utils";
@@ -0,0 +1,49 @@
1
+ import { orientationType } from "@vuu-ui/vuu-utils";
2
+ export type OverflowItem = {
3
+ index: string;
4
+ label: string;
5
+ overflowPriority: string;
6
+ };
7
+ export declare const isOverflowElement: (element: HTMLElement | null) => boolean;
8
+ export declare const sortByScreenOrder: (elements: HTMLElement[]) => HTMLElement[];
9
+ export declare const NO_WRAPPED_ITEMS: OverflowItem[];
10
+ /**
11
+ Identify wrapped items by comparing position of each item. Any item
12
+ not to the right of preceeding item has wrapped. Note: on-screen
13
+ position of items does not necessarily match document position, due
14
+ to use of css order. This is taken into account by sorting.
15
+ TODO support Vertical orientation
16
+ */
17
+ export declare const getNonWrappedAndWrappedItems: (container: HTMLElement, orientation?: orientationType) => [OverflowItem[], OverflowItem[]];
18
+ export declare const applyOverflowClassToWrappedItems: (container: HTMLElement, overflowedItems: OverflowItem[], classBase?: string) => void;
19
+ export declare const overflowIndicatorHasWrappedButShouldNotHave: (wrappedItems: OverflowItem[]) => boolean;
20
+ export declare const highPriorityItemsHaveWrappedButShouldNotHave: (nonWrappedItems: OverflowItem[], wrappedItems: OverflowItem[]) => boolean;
21
+ /**
22
+ An edge case that may occur when reducing width from unwrapped to
23
+ wrapped, or on first render.
24
+ We overflow one or more items. Then, when the overflowIndicator assumes
25
+ full width, it may itself overflow.
26
+ */
27
+ export declare const correctForWrappedOverflowIndicator: (container: HTMLElement, overflowedItems: OverflowItem[]) => Promise<OverflowItem[]>;
28
+ /**
29
+ An edge case that may occur when reducing width from unwrapped to
30
+ wrapped, or on first render.
31
+ We overflow one or more items. Then, when the overflowIndicator assumes
32
+ full width, it may itself overflow.
33
+ */
34
+ export declare const correctForWrappedHighPriorityItems: (container: HTMLElement, nonWrapped: OverflowItem[], wrapped: OverflowItem[]) => Promise<[OverflowItem[], OverflowItem[]]>;
35
+ export declare const markElementAsWrapped: (container: HTMLElement, item: OverflowItem) => void;
36
+ export declare const getElementsMarkedAsWrapped: (container: HTMLElement) => HTMLElement[];
37
+ export declare const unmarkItemsWhichAreNoLongerWrapped: (container: HTMLElement, wrappedItems: OverflowItem[]) => void;
38
+ /**
39
+ An edge case. If container has grown but we still have one
40
+ wrapped item - could the wrapped item return to the fold if the overflow
41
+ indicaor were removed ?
42
+ */
43
+ export declare const removeOverflowIndicatorIfNoLongerNeeded: (container: HTMLElement) => boolean;
44
+ /**
45
+ * This is used both when an overflow menu is used to select an overflowed item
46
+ * and when a high priority item has overflowed, whilst lower priority items
47
+ * remain in view.
48
+ */
49
+ export declare const switchWrappedItemIntoView: (container: HTMLElement, overflowItem: OverflowItem) => [OverflowItem[], OverflowItem[]];
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
3
+ import { OverflowItem } from "./overflow-utils";
4
+ import { OverflowContainerProps } from "./OverflowContainer";
5
+ export interface OverflowContainerHookProps extends Pick<OverflowContainerProps, "allowDragDrop" | "onMoveItem" | "orientation"> {
6
+ itemCount: number;
7
+ onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void;
8
+ }
9
+ export declare const useOverflowContainer: ({ allowDragDrop, itemCount, onMoveItem, onSwitchWrappedItemIntoView, orientation, }: OverflowContainerHookProps) => {
10
+ draggable?: JSX.Element | undefined;
11
+ dropIndicator?: JSX.Element | undefined;
12
+ draggedItemIndex?: number | undefined;
13
+ isDragging: boolean;
14
+ isScrolling: import("react").RefObject<boolean>;
15
+ revealOverflowedItems: boolean;
16
+ menuActionHandler: MenuActionHandler;
17
+ menuBuilder: MenuBuilder<string, unknown>;
18
+ onItemMouseDown: import("react").MouseEventHandler<Element> | undefined;
19
+ rootRef: (el: HTMLDivElement | null) => void;
20
+ };
@@ -0,0 +1,22 @@
1
+ import { ListItemProps, ListProps } from "@vuu-ui/vuu-ui-controls";
2
+ import { HTMLAttributes, ReactElement } from "react";
3
+ import { ViewProps } from "../layout-view";
4
+ import "./Palette.css";
5
+ export interface PaletteItemProps extends ListItemProps {
6
+ children: ReactElement;
7
+ closeable?: boolean;
8
+ header?: boolean;
9
+ idx?: number;
10
+ resize?: "defer";
11
+ resizeable?: boolean;
12
+ }
13
+ export declare const PaletteItem: import("react").MemoExoticComponent<({ className, children: component, idx, resizeable, header, closeable, ...props }: PaletteItemProps) => JSX.Element>;
14
+ export interface PaletteProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect"> {
15
+ ListProps?: Partial<ListProps>;
16
+ ViewProps?: Partial<ViewProps>;
17
+ children: ReactElement[];
18
+ itemHeight?: number;
19
+ orientation: "horizontal" | "vertical";
20
+ selection?: string;
21
+ }
22
+ export declare const Palette: ({ ListProps, ViewProps, children, className, itemHeight, orientation, ...props }: PaletteProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Palette";
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes } from "react";
2
+ import "./Placeholder.css";
3
+ export interface PlaceholderProps extends HTMLAttributes<HTMLDivElement> {
4
+ closeable?: boolean;
5
+ flexFill?: boolean;
6
+ resizeable?: boolean;
7
+ shim?: boolean;
8
+ }
9
+ export declare const Placeholder: {
10
+ ({ className, closeable, flexFill, resizeable, shim, ...props }: PlaceholderProps): JSX.Element;
11
+ displayName: string;
12
+ };
@@ -0,0 +1 @@
1
+ export * from './Placeholder';
@@ -0,0 +1,13 @@
1
+ import { FunctionComponent } from "react";
2
+ export type layoutComponentType = "component" | "container" | "view";
3
+ export interface ComponentWithId {
4
+ id: string;
5
+ [key: string]: unknown;
6
+ }
7
+ export declare const ComponentRegistry: {
8
+ [key: string]: FunctionComponent<ComponentWithId>;
9
+ };
10
+ export declare function isContainer(componentType: string): boolean;
11
+ export declare function isView(componentType: string): boolean;
12
+ export declare const isLayoutComponent: (type: string) => boolean;
13
+ export declare function registerComponent(componentName: string, component: FunctionComponent<any>, type?: layoutComponentType): void;
@@ -0,0 +1 @@
1
+ export * from './ComponentRegistry';
@@ -0,0 +1,4 @@
1
+ import { BreakPointsProp } from "../flexbox/flexboxTypes";
2
+ export type BreakPointRamp = [string, number, number];
3
+ export declare const breakpointRamp: (breakpoints: BreakPointsProp) => BreakPointRamp[];
4
+ export declare const getBreakPoints: (themeName?: string) => BreakPointRamp[];
@@ -0,0 +1,3 @@
1
+ export * from "./use-breakpoints";
2
+ export * from "./useResizeObserver";
3
+ export * from "./utils";
@@ -0,0 +1,7 @@
1
+ import { RefObject } from "react";
2
+ import { BreakPointsProp } from "../flexbox/flexboxTypes";
3
+ export interface BreakpointsHookProps {
4
+ breakPoints?: BreakPointsProp;
5
+ smallerThan?: string;
6
+ }
7
+ export declare const useBreakpoints: ({ breakPoints: breakPointsProp, smallerThan }: BreakpointsHookProps, ref: RefObject<HTMLElement>) => string | boolean;
@@ -0,0 +1,13 @@
1
+ import { RefObject } from "react";
2
+ export declare const WidthHeight: string[];
3
+ export declare const HeightOnly: string[];
4
+ export declare const WidthOnly: string[];
5
+ export type measurements<T = string | number> = {
6
+ height?: T;
7
+ scrollHeight?: T;
8
+ scrollWidth?: T;
9
+ width?: T;
10
+ };
11
+ export type ResizeHandler = (measurements: measurements<number>) => void;
12
+ export declare const resizeObserver: ResizeObserver;
13
+ export declare function useResizeObserver(ref: RefObject<Element | HTMLElement | null>, dimensions: string[], onResize: ResizeHandler, reportInitialSize?: boolean): void;
@@ -0,0 +1,6 @@
1
+ export declare const isResponsiveAttribute: (propName: string) => boolean;
2
+ type Props = {
3
+ [key: string]: any;
4
+ };
5
+ export declare const extractResponsiveProps: (props: Props) => [Props, Props];
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { StackProps } from "./stackTypes";
3
+ import "./Stack.css";
4
+ export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { StackProps } from "./stackTypes";
3
+ import "./Stack.css";
4
+ export declare const StackLayout: {
5
+ (props: StackProps): JSX.Element;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./Stack";
2
+ export * from "./StackLayout";
3
+ export * from "./stackTypes";
@@ -0,0 +1,21 @@
1
+ import { TabstripProps } from "@vuu-ui/vuu-ui-controls";
2
+ import { HTMLAttributes, MouseEvent, ReactElement, ReactNode } from "react";
3
+ export type TabPosition = "top" | "left" | "right" | "bottom";
4
+ export interface StackProps extends Omit<HTMLAttributes<HTMLDivElement>, "onMouseDown"> {
5
+ active?: number;
6
+ createNewChild?: (index: number) => ReactElement;
7
+ getTabIcon?: (component: ReactElement, index: number) => string | undefined;
8
+ getTabLabel?: (component: ReactElement, index: number) => string | undefined;
9
+ keyBoardActivation?: "automatic" | "manual";
10
+ onAddTab?: () => void;
11
+ onMoveTab?: (fromIndex: number, toIndex: number) => void;
12
+ onMouseDown?: (e: MouseEvent, tabIndex: number) => void;
13
+ onTabClose?: (tabIndex: number) => void;
14
+ onTabEdit?: (tabIndex: number, label: string) => void;
15
+ onTabSelectionChanged?: (nextIndex: number) => void;
16
+ path?: string;
17
+ /** should the Stack display a Tabstrip and where ? default top */
18
+ showTabs?: false | TabPosition;
19
+ toolbarContent?: ReactNode;
20
+ TabstripProps?: Partial<TabstripProps>;
21
+ }
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { OverflowContainerProps } from "../overflow-container";
3
+ import { SelectionStrategy, SpecialKeyMultipleSelection } from "@vuu-ui/vuu-ui-controls";
4
+ import "./Toolbar.css";
5
+ export type ActiveItemChangeHandler = (itemIndex: number[]) => void;
6
+ export type NavigationOutOfBoundsHandler = (direction: "start" | "end") => void;
7
+ export interface ToolbarProps extends OverflowContainerProps {
8
+ activeItemIndex?: number[];
9
+ defaultActiveItemIndex?: number[];
10
+ onActiveChange?: ActiveItemChangeHandler;
11
+ /**
12
+ * Indicates that user has used Arrow key navigation to move beyond the
13
+ * last or before the first item. A higher level component may want to
14
+ * use this to implement a seamless navigation across components.
15
+ */
16
+ onNavigateOutOfBounds?: NavigationOutOfBoundsHandler;
17
+ selectionStrategy?: SelectionStrategy | SpecialKeyMultipleSelection;
18
+ }
19
+ export declare const Toolbar: ({ activeItemIndex: activeItemIndexProp, defaultActiveItemIndex, children, className: classNameProp, id: idProp, onActiveChange, onNavigateOutOfBounds, orientation, selectionStrategy, ...props }: ToolbarProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Toolbar";
@@ -0,0 +1,3 @@
1
+ export declare const getIndexOfItem: (container: HTMLElement | null, query: string) => number;
2
+ export declare const getIndexOfSelectedTab: (container: HTMLElement | null) => number;
3
+ export declare const getIndexOfEditedItem: (container: HTMLElement | null) => number;
@@ -0,0 +1,32 @@
1
+ import { orientationType } from "@vuu-ui/vuu-utils";
2
+ import { FocusEvent, FocusEventHandler, KeyboardEvent, MouseEvent as ReactMouseEvent, MouseEventHandler, RefObject } from "react";
3
+ import { NavigationOutOfBoundsHandler } from "./Toolbar";
4
+ import { PopupCloseCallback } from "@vuu-ui/vuu-popups";
5
+ export interface ContainerNavigationProps {
6
+ onBlur: FocusEventHandler;
7
+ onFocus: FocusEventHandler;
8
+ onMouseDownCapture: MouseEventHandler;
9
+ onMouseLeave: MouseEventHandler;
10
+ }
11
+ interface ToolbarNavigationHookProps {
12
+ containerRef: RefObject<HTMLElement>;
13
+ defaultHighlightedIdx?: number;
14
+ highlightedIdx?: number;
15
+ onNavigateOutOfBounds?: NavigationOutOfBoundsHandler;
16
+ orientation: orientationType;
17
+ }
18
+ interface ToolbarNavigationHookResult {
19
+ containerProps: ContainerNavigationProps;
20
+ focusableIdx: number;
21
+ highlightedIdx: number;
22
+ focusItem: (itemIndex: number, immediateFocus?: boolean, withKeyboard?: boolean, delay?: number) => void;
23
+ focusVisible: number;
24
+ focusIsWithinComponent: boolean;
25
+ onClick: (evt: ReactMouseEvent, tabIndex: number) => void;
26
+ onFocus: (evt: FocusEvent<HTMLElement>) => void;
27
+ onKeyDown: (evt: KeyboardEvent) => void;
28
+ onOverflowMenuClose?: PopupCloseCallback;
29
+ setHighlightedIdx: (highlightedIndex: number) => void;
30
+ }
31
+ export declare const useKeyboardNavigation: ({ containerRef, defaultHighlightedIdx, highlightedIdx: highlightedIdxProp, onNavigateOutOfBounds, orientation, }: ToolbarNavigationHookProps) => ToolbarNavigationHookResult;
32
+ export {};
@@ -0,0 +1,22 @@
1
+ import { SelectionStrategy, SpecialKeyMultipleSelection } from "@vuu-ui/vuu-ui-controls";
2
+ import { MouseEvent, RefObject } from "react";
3
+ export interface SelectionHookProps {
4
+ containerRef: RefObject<HTMLElement>;
5
+ defaultSelected?: number[];
6
+ highlightedIdx: number;
7
+ itemQuery: string;
8
+ onSelectionChange?: (selectedIndices: number[]) => void;
9
+ selected?: number[];
10
+ selectionStrategy: SelectionStrategy | SpecialKeyMultipleSelection;
11
+ }
12
+ export interface ItemHandlers {
13
+ onClick?: (e: MouseEvent, itemIndex: number) => void;
14
+ onKeyDown?: (event: React.KeyboardEvent) => void;
15
+ }
16
+ export interface SelectionHookResult {
17
+ activateItem: (tabIndex: number) => void;
18
+ itemHandlers: ItemHandlers;
19
+ isControlled: boolean;
20
+ selected: number[];
21
+ }
22
+ export declare const useSelection: ({ containerRef, defaultSelected, highlightedIdx, itemQuery, onSelectionChange, selected: selectedProp, selectionStrategy, }: SelectionHookProps) => SelectionHookResult;
@@ -0,0 +1,28 @@
1
+ import type { OverflowItem, ToolbarProps } from "@vuu-ui/vuu-layout";
2
+ import { PopupCloseCallback } from "@vuu-ui/vuu-popups";
3
+ import { KeyboardEvent, MouseEvent as ReactMouseEvent, RefObject } from "react";
4
+ export interface ToolbarHookProps extends Pick<ToolbarProps, "activeItemIndex" | "defaultActiveItemIndex" | "onActiveChange" | "onNavigateOutOfBounds">, Required<Pick<ToolbarProps, "orientation" | "selectionStrategy">> {
5
+ containerRef: RefObject<HTMLElement>;
6
+ itemQuery?: string;
7
+ }
8
+ export declare const useToolbar: ({ activeItemIndex: activeItemIndexProp, defaultActiveItemIndex, containerRef, itemQuery, onActiveChange, onNavigateOutOfBounds, orientation, selectionStrategy, }: ToolbarHookProps) => {
9
+ activeItemIndex: number[];
10
+ focusableIdx: number;
11
+ focusVisible: number;
12
+ containerProps: {
13
+ onSwitchWrappedItemIntoView: (item: OverflowItem) => void;
14
+ onBlur: import("react").FocusEventHandler<Element>;
15
+ onFocus: import("react").FocusEventHandler<Element>;
16
+ onMouseDownCapture: import("react").MouseEventHandler<Element>;
17
+ onMouseLeave: import("react").MouseEventHandler<Element>;
18
+ PopupMenuProps: {
19
+ onKeyDown: (evt: KeyboardEvent) => void;
20
+ onMenuClose: PopupCloseCallback | undefined;
21
+ };
22
+ };
23
+ itemProps: {
24
+ onClick: (evt: ReactMouseEvent<HTMLElement>) => void;
25
+ onFocus: (evt: import("react").FocusEvent<HTMLElement, Element>) => void;
26
+ onKeyDown: (evt: KeyboardEvent) => void;
27
+ };
28
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ConfigWrapper: ({ children }: any) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './ConfigWrapper';
@@ -0,0 +1,31 @@
1
+ export function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
2
+ export namespace MARGIN_STYLES {
3
+ const margin: boolean;
4
+ const marginTop: boolean;
5
+ const marginRight: boolean;
6
+ const marginBottom: boolean;
7
+ const marginLeft: boolean;
8
+ }
9
+ export namespace PADDING_STYLES {
10
+ const padding: boolean;
11
+ const paddingTop: boolean;
12
+ const paddingRight: boolean;
13
+ const paddingBottom: boolean;
14
+ const paddingLeft: boolean;
15
+ }
16
+ export namespace BORDER_STYLES {
17
+ const border: boolean;
18
+ const borderColor: boolean;
19
+ const borderWidth: boolean;
20
+ const borderTopWidth: boolean;
21
+ const borderRightWidth: boolean;
22
+ const borderBottomWidth: boolean;
23
+ const borderLeftWidth: boolean;
24
+ }
25
+ export function LayoutConfigurator({ height, managedStyle, onChange, style, width, }: {
26
+ height: any;
27
+ managedStyle: any;
28
+ onChange: any;
29
+ style: any;
30
+ width: any;
31
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ export function LayoutTreeViewer({ layout, onSelect, style }: {
2
+ layout: any;
3
+ onSelect: any;
4
+ style: any;
5
+ }): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './config-wrapper';
2
+ export * from './devtools-box/layout-configurator';
3
+ export * from './devtools-tree/layout-tree-viewer';
@@ -0,0 +1,11 @@
1
+ export declare const getPersistentState: (id: string) => any;
2
+ export declare const hasPersistentState: (id: string) => boolean;
3
+ export declare const setPersistentState: (id: string, value: any) => Map<string, any>;
4
+ export declare const usePersistentState: () => {
5
+ loadSessionState: (id: any, key: any) => any;
6
+ loadState: (id: string, key?: string) => any;
7
+ saveSessionState: (id: any, key: any, data: any) => void;
8
+ saveState: (id: string, key: string | undefined, data: unknown) => void;
9
+ purgeState: (id: string, key?: string) => void;
10
+ purgeSessionState: (id: string, key?: string) => void;
11
+ };
@@ -0,0 +1,6 @@
1
+ export * from "./pathUtils";
2
+ export * from "./propUtils";
3
+ export * from "./refUtils";
4
+ export * from "./react-utils";
5
+ export * from "./styleUtils";
6
+ export * from "./typeOf";