@vuu-ui/vuu-layout 3.1.0-beta.1 → 3.1.0-beta.3
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 +10 -10
- package/src/{debug.mjs → debug.js} +1 -1
- package/src/dock-layout/{DockLayout.mjs → DockLayout.js} +1 -1
- package/src/dock-layout/index.js +2 -0
- package/src/drag-drop/{BoxModel.mjs → BoxModel.js} +1 -1
- package/src/drag-drop/{DragState.mjs → DragState.js} +1 -1
- package/src/drag-drop/{Draggable.mjs → Draggable.js} +5 -5
- package/src/drag-drop/{DropTarget.mjs → DropTarget.js} +2 -2
- package/src/drag-drop/{DropTargetRenderer.mjs → DropTargetRenderer.js} +1 -1
- package/src/drag-drop/index.js +3 -0
- package/src/flexbox/{Flexbox.mjs → Flexbox.js} +1 -1
- package/src/flexbox/{FlexboxLayout.mjs → FlexboxLayout.js} +3 -3
- package/src/flexbox/{flexbox-utils.mjs → flexbox-utils.js} +2 -2
- package/src/flexbox/index.js +2 -0
- package/src/flexbox/{useSplitterResizing.mjs → useSplitterResizing.js} +3 -3
- package/src/index.js +20 -0
- package/src/layout-header/{Header.mjs → Header.js} +1 -1
- package/src/layout-header/index.js +1 -0
- package/src/layout-header/{useHeader.mjs → useHeader.js} +1 -1
- package/src/layout-provider/{LayoutProvider.mjs → LayoutProvider.js} +4 -4
- package/src/layout-provider/index.js +2 -0
- package/src/layout-provider/{useLayoutDragDrop.mjs → useLayoutDragDrop.js} +3 -3
- package/src/layout-reducer/{flexUtils.mjs → flexUtils.js} +1 -1
- package/src/layout-reducer/index.js +4 -0
- package/src/layout-reducer/{insert-layout-element.mjs → insert-layout-element.js} +3 -3
- package/src/layout-reducer/{layout-reducer.mjs → layout-reducer.js} +9 -9
- package/src/layout-reducer/{layoutUtils.mjs → layoutUtils.js} +2 -2
- package/src/layout-reducer/{move-layout-element.mjs → move-layout-element.js} +2 -2
- package/src/layout-reducer/{remove-layout-element.mjs → remove-layout-element.js} +4 -4
- package/src/layout-reducer/{replace-layout-element.mjs → replace-layout-element.js} +2 -2
- package/src/layout-reducer/{resize-flex-children.mjs → resize-flex-children.js} +2 -2
- package/src/layout-reducer/{wrap-layout-element.mjs → wrap-layout-element.js} +3 -3
- package/src/layout-view/{View.mjs → View.js} +5 -5
- package/src/layout-view/{useView.mjs → useView.js} +3 -3
- package/src/layout-view/{useViewResize.mjs → useViewResize.js} +1 -1
- package/src/layout-view-actions/{useViewActionDispatcher.mjs → useViewActionDispatcher.js} +4 -4
- package/src/palette/{Palette.mjs → Palette.js} +2 -2
- package/src/palette/index.js +1 -0
- package/src/placeholder/{LayoutStartPanel.mjs → LayoutStartPanel.js} +1 -1
- package/src/placeholder/{Placeholder.mjs → Placeholder.js} +2 -2
- package/src/placeholder/index.js +1 -0
- package/src/responsive/index.js +2 -0
- package/src/stack/{Stack.mjs → Stack.js} +1 -1
- package/src/stack/{StackLayout.mjs → StackLayout.js} +6 -6
- package/src/stack/index.js +3 -0
- package/src/tabs/index.js +1 -0
- package/src/tools/config-wrapper/{ConfigWrapper.mjs → ConfigWrapper.js} +2 -2
- package/src/tools/config-wrapper/index.js +1 -0
- package/src/tools/index.js +3 -0
- package/src/utils/index.js +5 -0
- package/src/utils/{pathUtils.mjs → pathUtils.js} +2 -2
- package/src/dock-layout/index.mjs +0 -2
- package/src/drag-drop/index.mjs +0 -3
- package/src/flexbox/index.mjs +0 -2
- package/src/index.mjs +0 -20
- package/src/layout-header/index.mjs +0 -1
- package/src/layout-provider/index.mjs +0 -2
- package/src/layout-reducer/index.mjs +0 -4
- package/src/palette/index.mjs +0 -1
- package/src/placeholder/index.mjs +0 -1
- package/src/responsive/index.mjs +0 -2
- package/src/stack/index.mjs +0 -3
- package/src/tabs/index.mjs +0 -1
- package/src/tools/config-wrapper/index.mjs +0 -1
- package/src/tools/index.mjs +0 -3
- package/src/utils/index.mjs +0 -5
- /package/src/{Component.mjs → Component.js} +0 -0
- /package/src/{LayoutContainer.mjs → LayoutContainer.js} +0 -0
- /package/src/dock-layout/{Drawer.mjs → Drawer.js} +0 -0
- /package/src/drag-drop/{dragDropTypes.mjs → dragDropTypes.js} +0 -0
- /package/src/flexbox/{Splitter.mjs → Splitter.js} +0 -0
- /package/src/flexbox/{flexboxTypes.mjs → flexboxTypes.js} +0 -0
- /package/src/{layout-action.mjs → layout-action.js} +0 -0
- /package/src/layout-header/{ActionButton.mjs → ActionButton.js} +0 -0
- /package/src/layout-provider/{LayoutProviderContext.mjs → LayoutProviderContext.js} +0 -0
- /package/src/layout-reducer/{layoutTypes.mjs → layoutTypes.js} +0 -0
- /package/src/layout-view/{useViewBroadcastChannel.mjs → useViewBroadcastChannel.js} +0 -0
- /package/src/layout-view/{viewTypes.mjs → viewTypes.js} +0 -0
- /package/src/layout-view-actions/{ViewContext.mjs → ViewContext.js} +0 -0
- /package/src/layout-view-actions/{useViewContributions.mjs → useViewContributions.js} +0 -0
- /package/src/responsive/{measureMinimumNodeSize.mjs → measureMinimumNodeSize.js} +0 -0
- /package/src/responsive/{useResizeObserver.mjs → useResizeObserver.js} +0 -0
- /package/src/responsive/{utils.mjs → utils.js} +0 -0
- /package/src/stack/{stackTypes.mjs → stackTypes.js} +0 -0
- /package/src/tabs/{TabPanel.mjs → TabPanel.js} +0 -0
- /package/src/{use-persistent-state.mjs → use-persistent-state.js} +0 -0
- /package/src/utils/{propUtils.mjs → propUtils.js} +0 -0
- /package/src/utils/{refUtils.mjs → refUtils.js} +0 -0
- /package/src/utils/{styleUtils.mjs → styleUtils.js} +0 -0
- /package/src/utils/{typeOf.mjs → typeOf.js} +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.1.0-beta.
|
|
2
|
+
"version": "3.1.0-beta.3",
|
|
3
3
|
"description": "VUU Layout Components",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"author": "heswell",
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
},
|
|
12
12
|
"types": "types/index.d.ts",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@vuu-ui/vuu-data-types": "3.1.0-beta.
|
|
15
|
-
"@vuu-ui/vuu-filter-types": "3.1.0-beta.
|
|
14
|
+
"@vuu-ui/vuu-data-types": "3.1.0-beta.3",
|
|
15
|
+
"@vuu-ui/vuu-filter-types": "3.1.0-beta.3"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@salt-ds/core": "1.54.1",
|
|
19
19
|
"@salt-ds/styles": "0.2.1",
|
|
20
20
|
"@salt-ds/window": "0.1.1",
|
|
21
|
-
"@vuu-ui/vuu-data-react": "3.1.0-beta.
|
|
22
|
-
"@vuu-ui/vuu-datatable": "3.1.0-beta.
|
|
23
|
-
"@vuu-ui/vuu-filters": "3.1.0-beta.
|
|
24
|
-
"@vuu-ui/vuu-popups": "3.1.0-beta.
|
|
25
|
-
"@vuu-ui/vuu-table": "3.1.0-beta.
|
|
26
|
-
"@vuu-ui/vuu-ui-controls": "3.1.0-beta.
|
|
27
|
-
"@vuu-ui/vuu-utils": "3.1.0-beta.
|
|
21
|
+
"@vuu-ui/vuu-data-react": "3.1.0-beta.3",
|
|
22
|
+
"@vuu-ui/vuu-datatable": "3.1.0-beta.3",
|
|
23
|
+
"@vuu-ui/vuu-filters": "3.1.0-beta.3",
|
|
24
|
+
"@vuu-ui/vuu-popups": "3.1.0-beta.3",
|
|
25
|
+
"@vuu-ui/vuu-table": "3.1.0-beta.3",
|
|
26
|
+
"@vuu-ui/vuu-ui-controls": "3.1.0-beta.3",
|
|
27
|
+
"@vuu-ui/vuu-utils": "3.1.0-beta.3"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"clsx": "^2.0.0",
|
|
@@ -4,7 +4,7 @@ import clsx from "clsx";
|
|
|
4
4
|
import { useComponentCssInjection } from "@salt-ds/styles";
|
|
5
5
|
import { useWindow } from "@salt-ds/window";
|
|
6
6
|
import { useMemo } from "react";
|
|
7
|
-
import Drawer from "./Drawer.
|
|
7
|
+
import Drawer from "./Drawer.js";
|
|
8
8
|
import DockLayout from "./DockLayout.css";
|
|
9
9
|
const isDrawer = (component)=>component.type === Drawer;
|
|
10
10
|
const isVertical = (element)=>element.props.position && element.props.position.match(/top|bottom/);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { findTarget, followPath, getProps } from "../utils/index.
|
|
2
|
-
import { BoxModel } from "./BoxModel.
|
|
3
|
-
import { DragState } from "./DragState.
|
|
4
|
-
import { DropTarget, identifyDropTarget } from "./DropTarget.
|
|
5
|
-
import DropTargetRenderer from "./DropTargetRenderer.
|
|
1
|
+
import { findTarget, followPath, getProps } from "../utils/index.js";
|
|
2
|
+
import { BoxModel } from "./BoxModel.js";
|
|
3
|
+
import { DragState } from "./DragState.js";
|
|
4
|
+
import { DropTarget, identifyDropTarget } from "./DropTarget.js";
|
|
5
|
+
import DropTargetRenderer from "./DropTargetRenderer.js";
|
|
6
6
|
let _dragStartCallback;
|
|
7
7
|
let _dragMoveCallback;
|
|
8
8
|
let _dragEndCallback;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getProps, typeOf } from "../utils/index.
|
|
2
|
-
import { BoxModel, Position, RelativeDropPosition, getPosition, positionValues } from "./BoxModel.
|
|
1
|
+
import { getProps, typeOf } from "../utils/index.js";
|
|
2
|
+
import { BoxModel, Position, RelativeDropPosition, getPosition, positionValues } from "./BoxModel.js";
|
|
3
3
|
const isTabstrip = (dropTarget)=>dropTarget.pos.tab && "Stack" === typeOf(dropTarget.component) && dropTarget.pos.position.Header;
|
|
4
4
|
const { north: north, south: south, east: east, west: west } = positionValues;
|
|
5
5
|
const eastwest = east + west;
|
|
@@ -4,7 +4,7 @@ import { useComponentCssInjection } from "@salt-ds/styles";
|
|
|
4
4
|
import { useWindow } from "@salt-ds/window";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { forwardRef } from "react";
|
|
7
|
-
import { useSplitterResizing } from "./useSplitterResizing.
|
|
7
|
+
import { useSplitterResizing } from "./useSplitterResizing.js";
|
|
8
8
|
import Flexbox_0 from "./Flexbox.css";
|
|
9
9
|
const classBase = "hwFlexbox";
|
|
10
10
|
const Flexbox_Flexbox = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
|
-
import { Action } from "../layout-action.
|
|
4
|
-
import { useLayoutProviderDispatch } from "../layout-provider/index.
|
|
3
|
+
import { Action } from "../layout-action.js";
|
|
4
|
+
import { useLayoutProviderDispatch } from "../layout-provider/index.js";
|
|
5
5
|
import { registerComponent } from "@vuu-ui/vuu-utils";
|
|
6
|
-
import Flexbox from "./Flexbox.
|
|
6
|
+
import Flexbox from "./Flexbox.js";
|
|
7
7
|
const FlexboxLayout_FlexboxLayout = function(props) {
|
|
8
8
|
const { path } = props;
|
|
9
9
|
const dispatch = useLayoutProviderDispatch();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getIntrinsicSize, hasUnboundedFlexStyle } from "../layout-reducer/flexUtils.
|
|
2
|
-
import { getProp } from "../utils/index.
|
|
1
|
+
import { getIntrinsicSize, hasUnboundedFlexStyle } from "../layout-reducer/flexUtils.js";
|
|
2
|
+
import { getProp } from "../utils/index.js";
|
|
3
3
|
const NO_INTRINSIC_SIZE = {};
|
|
4
4
|
const SPLITTER = 1;
|
|
5
5
|
const PLACEHOLDER = 2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getUniqueId } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react, { useCallback, useMemo, useRef } from "react";
|
|
3
|
-
import { Placeholder } from "../placeholder/index.
|
|
4
|
-
import { Splitter } from "./Splitter.
|
|
5
|
-
import { PLACEHOLDER, SPLITTER, findSplitterAndPlaceholderPositions, gatherChildMeta, identifyResizeParties } from "./flexbox-utils.
|
|
3
|
+
import { Placeholder } from "../placeholder/index.js";
|
|
4
|
+
import { Splitter } from "./Splitter.js";
|
|
5
|
+
import { PLACEHOLDER, SPLITTER, findSplitterAndPlaceholderPositions, gatherChildMeta, identifyResizeParties } from "./flexbox-utils.js";
|
|
6
6
|
const originalContentOnly = (meta)=>!meta.splitter && !meta.placeholder;
|
|
7
7
|
const useSplitterResizing = ({ children: childrenProp, onSplitterMoved, style })=>{
|
|
8
8
|
const rootRef = useRef(null);
|
package/src/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./dock-layout/index.js";
|
|
2
|
+
export * from "./drag-drop/index.js";
|
|
3
|
+
export * from "./flexbox/index.js";
|
|
4
|
+
export * from "./layout-header/index.js";
|
|
5
|
+
export * from "./layout-provider/index.js";
|
|
6
|
+
export * from "./layout-reducer/index.js";
|
|
7
|
+
export * from "./LayoutContainer.js";
|
|
8
|
+
export * from "./palette/index.js";
|
|
9
|
+
export * from "./placeholder/index.js";
|
|
10
|
+
export * from "./responsive/index.js";
|
|
11
|
+
export * from "./stack/index.js";
|
|
12
|
+
export * from "./use-persistent-state.js";
|
|
13
|
+
export * from "./utils/index.js";
|
|
14
|
+
export * from "./layout-view/viewTypes.js";
|
|
15
|
+
export * from "./layout-view/View.js";
|
|
16
|
+
export * from "./layout-view/useViewBroadcastChannel.js";
|
|
17
|
+
export { default as Component } from "./Component.js";
|
|
18
|
+
export { Action } from "./layout-action.js";
|
|
19
|
+
export { useViewActionDispatcher } from "./layout-view-actions/useViewActionDispatcher.js";
|
|
20
|
+
export { ViewContext, useViewContext, useViewDispatch } from "./layout-view-actions/ViewContext.js";
|
|
@@ -4,7 +4,7 @@ import { useWindow } from "@salt-ds/window";
|
|
|
4
4
|
import { EditableLabel, IconButton } from "@vuu-ui/vuu-ui-controls";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { cloneElement } from "react";
|
|
7
|
-
import { useHeader } from "./useHeader.
|
|
7
|
+
import { useHeader } from "./useHeader.js";
|
|
8
8
|
import Header from "./Header.css";
|
|
9
9
|
const classBase = "vuuHeader";
|
|
10
10
|
const Header_Header = ({ allowRename = false, className: classNameProp, contributions, collapsed, closeable, onCollapse, onEditTitle, onExpand, orientation: orientationProp = "horizontal", style, title = "Untitled" })=>{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Header.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useRef, useState } from "react";
|
|
2
|
-
import { useViewDispatch } from "../layout-view-actions/ViewContext.
|
|
2
|
+
import { useViewDispatch } from "../layout-view-actions/ViewContext.js";
|
|
3
3
|
import { queryClosest } from "@vuu-ui/vuu-utils";
|
|
4
4
|
const useHeader = ({ onCollapse, onEditTitle, onExpand, title })=>{
|
|
5
5
|
const [editing, setEditing] = useState(false);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { VuuShellLocation, usePlaceholderJSON } from "@vuu-ui/vuu-utils";
|
|
3
3
|
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
import { LayoutActionType, cloneElementAddLayoutProps, layoutFromJson, layoutQuery, layoutReducer, layoutToJSON } from "../layout-reducer/index.
|
|
5
|
-
import { findTarget, getChildProp, getProp, getProps, typeOf } from "../utils/index.
|
|
6
|
-
import { LayoutProviderContext } from "./LayoutProviderContext.
|
|
7
|
-
import { useLayoutDragDrop } from "./useLayoutDragDrop.
|
|
4
|
+
import { LayoutActionType, cloneElementAddLayoutProps, layoutFromJson, layoutQuery, layoutReducer, layoutToJSON } from "../layout-reducer/index.js";
|
|
5
|
+
import { findTarget, getChildProp, getProp, getProps, typeOf } from "../utils/index.js";
|
|
6
|
+
import { LayoutProviderContext } from "./LayoutProviderContext.js";
|
|
7
|
+
import { useLayoutDragDrop } from "./useLayoutDragDrop.js";
|
|
8
8
|
const isWorkspaceContainer = (props)=>props.id === VuuShellLocation.WorkspaceContainer;
|
|
9
9
|
const isMultiWorkspaceContainer = (props)=>props.id === VuuShellLocation.MultiWorkspaceContainer;
|
|
10
10
|
const shouldSave = (action)=>[
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useRef } from "react";
|
|
2
|
-
import { Draggable } from "../drag-drop/index.
|
|
3
|
-
import { getIntrinsicSize } from "../layout-reducer/flexUtils.
|
|
4
|
-
import { followPath, resolvePath } from "../utils/index.
|
|
2
|
+
import { Draggable } from "../drag-drop/index.js";
|
|
3
|
+
import { getIntrinsicSize } from "../layout-reducer/flexUtils.js";
|
|
4
|
+
import { followPath, resolvePath } from "../utils/index.js";
|
|
5
5
|
const NO_INSTRUCTIONS = {};
|
|
6
6
|
const NO_OFFSETS = [
|
|
7
7
|
0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getLayoutComponent, uuid } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react from "react";
|
|
3
|
-
import { getProps, resetPath } from "../utils/index.
|
|
3
|
+
import { getProps, resetPath } from "../utils/index.js";
|
|
4
4
|
const placeHolderProps = {
|
|
5
5
|
"data-placeholder": true,
|
|
6
6
|
"data-resizeable": true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { uuid } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react from "react";
|
|
3
|
-
import { getProp, getProps, nextStep, resetPath, typeOf } from "../utils/index.
|
|
4
|
-
import { createPlaceHolder, getFlexDimensions, getFlexOrIntrinsicStyle, getIntrinsicSize, wrapIntrinsicSizeComponentWithFlexbox } from "./flexUtils.
|
|
5
|
-
import { getDefaultTabLabel, getManagedDimension } from "./layoutUtils.
|
|
3
|
+
import { getProp, getProps, nextStep, resetPath, typeOf } from "../utils/index.js";
|
|
4
|
+
import { createPlaceHolder, getFlexDimensions, getFlexOrIntrinsicStyle, getIntrinsicSize, wrapIntrinsicSizeComponentWithFlexbox } from "./flexUtils.js";
|
|
5
|
+
import { getDefaultTabLabel, getManagedDimension } from "./layoutUtils.js";
|
|
6
6
|
function getInsertTabBeforeAfter(stack, pos) {
|
|
7
7
|
const { children: tabs } = stack.props;
|
|
8
8
|
const tabCount = tabs.length;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { isContainer } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react from "react";
|
|
3
|
-
import { findTarget, followPath, followPathToParent, getProp, getProps, typeOf } from "../utils/index.
|
|
4
|
-
import { getIntrinsicSize } from "./flexUtils.
|
|
5
|
-
import { getInsertTabBeforeAfter, insertBesideChild, insertIntoContainer } from "./insert-layout-element.
|
|
6
|
-
import { moveChild } from "./move-layout-element.
|
|
7
|
-
import { LayoutActionType } from "./layoutTypes.
|
|
8
|
-
import { removeChild } from "./remove-layout-element.
|
|
9
|
-
import { _replaceChild, replaceChild, swapChild } from "./replace-layout-element.
|
|
10
|
-
import { resizeFlexChild, resizeFlexChildren } from "./resize-flex-children.
|
|
11
|
-
import { wrap } from "./wrap-layout-element.
|
|
3
|
+
import { findTarget, followPath, followPathToParent, getProp, getProps, typeOf } from "../utils/index.js";
|
|
4
|
+
import { getIntrinsicSize } from "./flexUtils.js";
|
|
5
|
+
import { getInsertTabBeforeAfter, insertBesideChild, insertIntoContainer } from "./insert-layout-element.js";
|
|
6
|
+
import { moveChild } from "./move-layout-element.js";
|
|
7
|
+
import { LayoutActionType } from "./layoutTypes.js";
|
|
8
|
+
import { removeChild } from "./remove-layout-element.js";
|
|
9
|
+
import { _replaceChild, replaceChild, swapChild } from "./replace-layout-element.js";
|
|
10
|
+
import { resizeFlexChild, resizeFlexChildren } from "./resize-flex-children.js";
|
|
11
|
+
import { wrap } from "./wrap-layout-element.js";
|
|
12
12
|
const layoutReducer = (state, action)=>{
|
|
13
13
|
switch(action.type){
|
|
14
14
|
case LayoutActionType.ADD:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getLayoutComponent, isContainer, isLayoutComponent, uuid } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react, { cloneElement } from "react";
|
|
3
|
-
import { getPersistentState, hasPersistentState, setPersistentState } from "../use-persistent-state.
|
|
4
|
-
import { expandFlex, followPathToParent, getProps, typeOf } from "../utils/index.
|
|
3
|
+
import { getPersistentState, hasPersistentState, setPersistentState } from "../use-persistent-state.js";
|
|
4
|
+
import { expandFlex, followPathToParent, getProps, typeOf } from "../utils/index.js";
|
|
5
5
|
const getManagedDimension = (style)=>"column" === style.flexDirection ? [
|
|
6
6
|
"height",
|
|
7
7
|
"width"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cloneElement } from "react";
|
|
2
|
-
import { followPath, getProps } from "../utils/index.
|
|
3
|
-
import { swapChild } from "./replace-layout-element.
|
|
2
|
+
import { followPath, getProps } from "../utils/index.js";
|
|
3
|
+
import { swapChild } from "./replace-layout-element.js";
|
|
4
4
|
function moveChild(layoutRoot, { fromIndex, path, toIndex }) {
|
|
5
5
|
const target = followPath(layoutRoot, path, true);
|
|
6
6
|
const { children } = getProps(target);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { VuuShellLocation } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react from "react";
|
|
3
|
-
import { followPath, followPathToParent, getProp, getProps, nextStep, resetPath, typeOf } from "../utils/index.
|
|
4
|
-
import { createPlaceHolder } from "./flexUtils.
|
|
5
|
-
import { layoutFromJson } from "./layoutUtils.
|
|
6
|
-
import { swapChild } from "./replace-layout-element.
|
|
3
|
+
import { followPath, followPathToParent, getProp, getProps, nextStep, resetPath, typeOf } from "../utils/index.js";
|
|
4
|
+
import { createPlaceHolder } from "./flexUtils.js";
|
|
5
|
+
import { layoutFromJson } from "./layoutUtils.js";
|
|
6
|
+
import { swapChild } from "./replace-layout-element.js";
|
|
7
7
|
function removeChild(layoutRoot, { path }) {
|
|
8
8
|
const target = followPath(layoutRoot, path);
|
|
9
9
|
let targetParent = followPathToParent(layoutRoot, path);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import { getProp, getProps, nextStep } from "../utils/index.
|
|
3
|
-
import { applyLayoutProps } from "./layoutUtils.
|
|
2
|
+
import { getProp, getProps, nextStep } from "../utils/index.js";
|
|
3
|
+
import { applyLayoutProps } from "./layoutUtils.js";
|
|
4
4
|
function replaceChild(model, { target, replacement }) {
|
|
5
5
|
return _replaceChild(model, target, replacement);
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import { followPath, getProps } from "../utils/index.
|
|
3
|
-
import { swapChild } from "./replace-layout-element.
|
|
2
|
+
import { followPath, getProps } from "../utils/index.js";
|
|
3
|
+
import { swapChild } from "./replace-layout-element.js";
|
|
4
4
|
function resizeFlexChild(layoutRoot, { path, size }) {
|
|
5
5
|
const target = followPath(layoutRoot, path, true);
|
|
6
6
|
const { style } = getProps(target);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getLayoutComponent, uuid } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react from "react";
|
|
3
|
-
import { getProp, getProps, nextStep, resetPath, typeOf } from "../utils/index.
|
|
4
|
-
import { createFlexbox, createPlaceHolder, getFlexStyle, getIntrinsicSize, wrapIntrinsicSizeComponentWithFlexbox } from "./flexUtils.
|
|
5
|
-
import { applyLayoutProps } from "./layoutUtils.
|
|
3
|
+
import { getProp, getProps, nextStep, resetPath, typeOf } from "../utils/index.js";
|
|
4
|
+
import { createFlexbox, createPlaceHolder, getFlexStyle, getIntrinsicSize, wrapIntrinsicSizeComponentWithFlexbox } from "./flexUtils.js";
|
|
5
|
+
import { applyLayoutProps } from "./layoutUtils.js";
|
|
6
6
|
const isHtmlElement = (component)=>{
|
|
7
7
|
const [firstLetter] = typeOf(component);
|
|
8
8
|
return firstLetter === firstLetter.toLowerCase();
|
|
@@ -5,10 +5,10 @@ import { useComponentCssInjection } from "@salt-ds/styles";
|
|
|
5
5
|
import { useWindow } from "@salt-ds/window";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import react, { forwardRef, useCallback, useMemo, useRef, useState } from "react";
|
|
8
|
-
import { Header as
|
|
9
|
-
import { useView } from "./useView.
|
|
10
|
-
import { useViewResize } from "./useViewResize.
|
|
11
|
-
import { ViewContext } from "../layout-view-actions/ViewContext.
|
|
8
|
+
import { Header as Header_js_Header } from "../layout-header/Header.js";
|
|
9
|
+
import { useView } from "./useView.js";
|
|
10
|
+
import { useViewResize } from "./useViewResize.js";
|
|
11
|
+
import { ViewContext } from "../layout-view-actions/ViewContext.js";
|
|
12
12
|
import View_0 from "./View.css";
|
|
13
13
|
const classBase = "vuuView";
|
|
14
14
|
const getProps = (state, props)=>{
|
|
@@ -19,7 +19,7 @@ const getProps = (state, props)=>{
|
|
|
19
19
|
return state || props;
|
|
20
20
|
};
|
|
21
21
|
const View_View = /*#__PURE__*/ forwardRef(function(props, forwardedRef) {
|
|
22
|
-
const { Header =
|
|
22
|
+
const { Header = Header_js_Header, allowRename, children, className, collapsed, closeable, "data-path": dataPath, "data-resizeable": dataResizeable, dropTargets, expanded, flexFill, id: idProp, header, onCollapse, onExpand, orientation = "horizontal", path = dataPath, resize = "responsive", resizeable = dataResizeable, restoreStyle, tearOut, style = {}, title: titleProp, ...restProps } = props;
|
|
23
23
|
const targetWindow = useWindow();
|
|
24
24
|
useComponentCssInjection({
|
|
25
25
|
testId: "vuu-view",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
|
-
import { useLayoutProviderDispatch } from "../layout-provider/LayoutProvider.
|
|
3
|
-
import { usePersistentState } from "../use-persistent-state.
|
|
4
|
-
import { useViewActionDispatcher } from "../layout-view-actions/useViewActionDispatcher.
|
|
2
|
+
import { useLayoutProviderDispatch } from "../layout-provider/LayoutProvider.js";
|
|
3
|
+
import { usePersistentState } from "../use-persistent-state.js";
|
|
4
|
+
import { useViewActionDispatcher } from "../layout-view-actions/useViewActionDispatcher.js";
|
|
5
5
|
const useView = ({ id, rootRef, path, dropTargets, title: titleProp })=>{
|
|
6
6
|
const layoutDispatch = useLayoutProviderDispatch();
|
|
7
7
|
const { loadState, purgeState, saveState } = usePersistentState();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WidthHeight, useResizeObserver } from "../responsive/index.
|
|
1
|
+
import { WidthHeight, useResizeObserver } from "../responsive/index.js";
|
|
2
2
|
import { useCallback, useRef } from "react";
|
|
3
3
|
const NO_MEASUREMENT = [];
|
|
4
4
|
const useViewResize = ({ mainRef, resize = "responsive", rootRef })=>{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useSessionDataSource } from "@vuu-ui/vuu-data-react";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
|
-
import { useLayoutProviderDispatch } from "../layout-provider/LayoutProvider.
|
|
4
|
-
import { useViewBroadcastChannel } from "../layout-view/useViewBroadcastChannel.
|
|
5
|
-
import { usePersistentState } from "../use-persistent-state.
|
|
6
|
-
import { useViewContributions } from "./useViewContributions.
|
|
3
|
+
import { useLayoutProviderDispatch } from "../layout-provider/LayoutProvider.js";
|
|
4
|
+
import { useViewBroadcastChannel } from "../layout-view/useViewBroadcastChannel.js";
|
|
5
|
+
import { usePersistentState } from "../use-persistent-state.js";
|
|
6
|
+
import { useViewContributions } from "./useViewContributions.js";
|
|
7
7
|
const useViewActionDispatcher = (id, rootRef, viewPath, dropTargets)=>{
|
|
8
8
|
const { purgeState } = usePersistentState();
|
|
9
9
|
const { clearDataSource: clearDataSourceFromSessionState } = useSessionDataSource();
|
|
@@ -5,8 +5,8 @@ import { useComponentCssInjection } from "@salt-ds/styles";
|
|
|
5
5
|
import { useWindow } from "@salt-ds/window";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { cloneElement, memo, useCallback } from "react";
|
|
8
|
-
import { useLayoutProviderDispatch } from "../layout-provider/index.
|
|
9
|
-
import { View } from "../layout-view/View.
|
|
8
|
+
import { useLayoutProviderDispatch } from "../layout-provider/index.js";
|
|
9
|
+
import { View } from "../layout-view/View.js";
|
|
10
10
|
import Palette from "./Palette.css";
|
|
11
11
|
const classBase = "vuuPalette";
|
|
12
12
|
const clonePaletteItem = (paletteItem)=>{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Palette.js";
|
|
@@ -4,7 +4,7 @@ import { VuuShellLocation } from "@vuu-ui/vuu-utils";
|
|
|
4
4
|
import { useComponentCssInjection } from "@salt-ds/styles";
|
|
5
5
|
import { useWindow } from "@salt-ds/window";
|
|
6
6
|
import { useMemo, useState } from "react";
|
|
7
|
-
import { useViewContext } from "../layout-view-actions/ViewContext.
|
|
7
|
+
import { useViewContext } from "../layout-view-actions/ViewContext.js";
|
|
8
8
|
import LayoutStartPanel from "./LayoutStartPanel.css";
|
|
9
9
|
const classBase = "vuuLayoutStartPanel";
|
|
10
10
|
const LayoutStartPanel_LayoutStartPanel = (htmlAttributes)=>{
|
|
@@ -3,8 +3,8 @@ import clsx from "clsx";
|
|
|
3
3
|
import { useComponentCssInjection } from "@salt-ds/styles";
|
|
4
4
|
import { useWindow } from "@salt-ds/window";
|
|
5
5
|
import { registerComponent } from "@vuu-ui/vuu-utils";
|
|
6
|
-
import { LayoutStartPanel } from "./LayoutStartPanel.
|
|
7
|
-
import { View } from "../layout-view/View.
|
|
6
|
+
import { LayoutStartPanel } from "./LayoutStartPanel.js";
|
|
7
|
+
import { View } from "../layout-view/View.js";
|
|
8
8
|
import Placeholder from "./Placeholder.css";
|
|
9
9
|
const classBase = "vuuPlaceholder";
|
|
10
10
|
const PlaceholderCore = ({ showStartMenu = true })=>/*#__PURE__*/ jsx(Fragment, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Placeholder.js";
|
|
@@ -5,7 +5,7 @@ import clsx from "clsx";
|
|
|
5
5
|
import { useComponentCssInjection } from "@salt-ds/styles";
|
|
6
6
|
import { useWindow } from "@salt-ds/window";
|
|
7
7
|
import react, { forwardRef, useCallback, useRef } from "react";
|
|
8
|
-
import { getDefaultTabLabel } from "../layout-reducer/index.
|
|
8
|
+
import { getDefaultTabLabel } from "../layout-reducer/index.js";
|
|
9
9
|
import Stack_0 from "./Stack.css";
|
|
10
10
|
const classBase = "vuuTabs";
|
|
11
11
|
const getDefaultTabIcon = ()=>void 0;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { registerComponent, useId } from "@vuu-ui/vuu-utils";
|
|
3
3
|
import react, { useCallback, useRef } from "react";
|
|
4
|
-
import { useLayoutCreateNewChild, useLayoutProviderDispatch } from "../layout-provider/index.
|
|
5
|
-
import { getDefaultTabLabel } from "../layout-reducer/index.
|
|
6
|
-
import { useViewActionDispatcher } from "../layout-view-actions/useViewActionDispatcher.
|
|
7
|
-
import { useViewBroadcastChannel } from "../layout-view/useViewBroadcastChannel.
|
|
8
|
-
import { usePersistentState } from "../use-persistent-state.
|
|
9
|
-
import { Stack } from "./Stack.
|
|
4
|
+
import { useLayoutCreateNewChild, useLayoutProviderDispatch } from "../layout-provider/index.js";
|
|
5
|
+
import { getDefaultTabLabel } from "../layout-reducer/index.js";
|
|
6
|
+
import { useViewActionDispatcher } from "../layout-view-actions/useViewActionDispatcher.js";
|
|
7
|
+
import { useViewBroadcastChannel } from "../layout-view/useViewBroadcastChannel.js";
|
|
8
|
+
import { usePersistentState } from "../use-persistent-state.js";
|
|
9
|
+
import { Stack } from "./Stack.js";
|
|
10
10
|
const StackLayout = (props)=>{
|
|
11
11
|
const rootRef = useRef(null);
|
|
12
12
|
const dispatch = useLayoutProviderDispatch();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TabPanel } from "./TabPanel.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import react, { useState } from "react";
|
|
3
|
-
import { LayoutConfigurator, LayoutTreeViewer } from "../index.
|
|
4
|
-
import { followPathToComponent } from "../../index.
|
|
3
|
+
import { LayoutConfigurator, LayoutTreeViewer } from "../index.js";
|
|
4
|
+
import { followPathToComponent } from "../../index.js";
|
|
5
5
|
const ConfigWrapper = ({ children })=>{
|
|
6
6
|
const designMode = false;
|
|
7
7
|
const [layout, setLayout] = useState(children);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ConfigWrapper.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isContainer } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import react, { isValidElement } from "react";
|
|
3
|
-
import { getProp, getProps } from "./propUtils.
|
|
4
|
-
import { typeOf } from "./typeOf.
|
|
3
|
+
import { getProp, getProps } from "./propUtils.js";
|
|
4
|
+
import { typeOf } from "./typeOf.js";
|
|
5
5
|
const removeFinalPathSegment = (path)=>{
|
|
6
6
|
const pos = path.lastIndexOf(".");
|
|
7
7
|
if (-1 === pos) return path;
|
package/src/drag-drop/index.mjs
DELETED
package/src/flexbox/index.mjs
DELETED
package/src/index.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from "./dock-layout/index.mjs";
|
|
2
|
-
export * from "./drag-drop/index.mjs";
|
|
3
|
-
export * from "./flexbox/index.mjs";
|
|
4
|
-
export * from "./layout-header/index.mjs";
|
|
5
|
-
export * from "./layout-provider/index.mjs";
|
|
6
|
-
export * from "./layout-reducer/index.mjs";
|
|
7
|
-
export * from "./LayoutContainer.mjs";
|
|
8
|
-
export * from "./palette/index.mjs";
|
|
9
|
-
export * from "./placeholder/index.mjs";
|
|
10
|
-
export * from "./responsive/index.mjs";
|
|
11
|
-
export * from "./stack/index.mjs";
|
|
12
|
-
export * from "./use-persistent-state.mjs";
|
|
13
|
-
export * from "./utils/index.mjs";
|
|
14
|
-
export * from "./layout-view/viewTypes.mjs";
|
|
15
|
-
export * from "./layout-view/View.mjs";
|
|
16
|
-
export * from "./layout-view/useViewBroadcastChannel.mjs";
|
|
17
|
-
export { default as Component } from "./Component.mjs";
|
|
18
|
-
export { Action } from "./layout-action.mjs";
|
|
19
|
-
export { useViewActionDispatcher } from "./layout-view-actions/useViewActionDispatcher.mjs";
|
|
20
|
-
export { ViewContext, useViewContext, useViewDispatch } from "./layout-view-actions/ViewContext.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Header.mjs";
|
package/src/palette/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Palette.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Placeholder.mjs";
|
package/src/responsive/index.mjs
DELETED
package/src/stack/index.mjs
DELETED
package/src/tabs/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TabPanel } from "./TabPanel.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ConfigWrapper.mjs";
|
package/src/tools/index.mjs
DELETED
package/src/utils/index.mjs
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|