@vuu-ui/vuu-shell 0.8.74 → 0.8.76

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 (229) hide show
  1. package/cjs/app-header/AppHeader.js +2 -1
  2. package/cjs/app-header/AppHeader.js.map +1 -1
  3. package/cjs/application-provider/ApplicationProvider.js +5 -1
  4. package/cjs/application-provider/ApplicationProvider.js.map +1 -1
  5. package/cjs/index.js +13 -12
  6. package/cjs/index.js.map +1 -1
  7. package/cjs/layout-management/LayoutList.js +2 -2
  8. package/cjs/layout-management/LayoutList.js.map +1 -1
  9. package/cjs/layout-management/{useLayoutManager.js → LayoutManagementProvider.js} +46 -19
  10. package/cjs/layout-management/LayoutManagementProvider.js.map +1 -0
  11. package/cjs/layout-management/defaultWorkspaceJSON.js +75 -0
  12. package/cjs/layout-management/defaultWorkspaceJSON.js.map +1 -0
  13. package/cjs/layout-management/useLayoutContextMenuItems.js +3 -3
  14. package/cjs/layout-management/useLayoutContextMenuItems.js.map +1 -1
  15. package/cjs/left-nav/LeftNav.js +2 -1
  16. package/cjs/left-nav/LeftNav.js.map +1 -1
  17. package/cjs/persistence-manager/RemotePersistenceManager.js +1 -1
  18. package/cjs/persistence-manager/RemotePersistenceManager.js.map +1 -1
  19. package/cjs/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.js +4 -2
  20. package/cjs/shell-layout-templates/context-panel/ContextPanel.js.map +1 -0
  21. package/cjs/{shell-layouts → shell-layout-templates/full-height-left-panel}/useFullHeightLeftPanel.js +12 -12
  22. package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +1 -0
  23. package/cjs/{shell-layouts → shell-layout-templates/inlay-left-panel}/useInlayLeftPanel.js +10 -4
  24. package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +1 -0
  25. package/cjs/shell-layout-templates/side-panel/SidePanel.js.map +1 -0
  26. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +46 -0
  27. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +1 -0
  28. package/cjs/shell-layout-templates/useShellLayout.js +21 -0
  29. package/cjs/shell-layout-templates/useShellLayout.js.map +1 -0
  30. package/cjs/shell.css.js +1 -1
  31. package/cjs/shell.js +46 -37
  32. package/cjs/shell.js.map +1 -1
  33. package/esm/app-header/AppHeader.js +2 -1
  34. package/esm/app-header/AppHeader.js.map +1 -1
  35. package/esm/application-provider/ApplicationProvider.js +5 -1
  36. package/esm/application-provider/ApplicationProvider.js.map +1 -1
  37. package/esm/index.js +5 -4
  38. package/esm/index.js.map +1 -1
  39. package/esm/layout-management/LayoutList.js +1 -1
  40. package/esm/layout-management/LayoutList.js.map +1 -1
  41. package/esm/layout-management/{useLayoutManager.js → LayoutManagementProvider.js} +46 -19
  42. package/esm/layout-management/LayoutManagementProvider.js.map +1 -0
  43. package/esm/layout-management/defaultWorkspaceJSON.js +70 -0
  44. package/esm/layout-management/defaultWorkspaceJSON.js.map +1 -0
  45. package/esm/layout-management/useLayoutContextMenuItems.js +2 -2
  46. package/esm/layout-management/useLayoutContextMenuItems.js.map +1 -1
  47. package/esm/left-nav/LeftNav.js +2 -1
  48. package/esm/left-nav/LeftNav.js.map +1 -1
  49. package/esm/persistence-manager/RemotePersistenceManager.js +1 -1
  50. package/esm/persistence-manager/RemotePersistenceManager.js.map +1 -1
  51. package/esm/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.js +4 -2
  52. package/esm/shell-layout-templates/context-panel/ContextPanel.js.map +1 -0
  53. package/esm/{shell-layouts → shell-layout-templates/full-height-left-panel}/useFullHeightLeftPanel.js +13 -13
  54. package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +1 -0
  55. package/esm/{shell-layouts → shell-layout-templates/inlay-left-panel}/useInlayLeftPanel.js +11 -5
  56. package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +1 -0
  57. package/esm/shell-layout-templates/side-panel/SidePanel.js.map +1 -0
  58. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +44 -0
  59. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +1 -0
  60. package/esm/shell-layout-templates/useShellLayout.js +19 -0
  61. package/esm/shell-layout-templates/useShellLayout.js.map +1 -0
  62. package/esm/shell.css.js +1 -1
  63. package/esm/shell.js +48 -39
  64. package/esm/shell.js.map +1 -1
  65. package/package.json +11 -11
  66. package/types/vuu-layout/src/Component.d.ts +6 -0
  67. package/types/vuu-layout/src/LayoutContainer.d.ts +6 -0
  68. package/types/vuu-layout/src/dock-layout/DockLayout.d.ts +7 -0
  69. package/types/vuu-layout/src/dock-layout/Drawer.d.ts +17 -0
  70. package/types/vuu-layout/src/dock-layout/index.d.ts +2 -0
  71. package/types/vuu-layout/src/drag-drop/BoxModel.d.ts +143 -0
  72. package/types/vuu-layout/src/drag-drop/DragState.d.ts +46 -0
  73. package/types/vuu-layout/src/drag-drop/Draggable.d.ts +24 -0
  74. package/types/vuu-layout/src/drag-drop/DropMenu.d.ts +9 -0
  75. package/types/vuu-layout/src/drag-drop/DropTarget.d.ts +60 -0
  76. package/types/vuu-layout/src/drag-drop/DropTargetRenderer.d.ts +17 -0
  77. package/types/vuu-layout/src/drag-drop/dragDropTypes.d.ts +51 -0
  78. package/types/vuu-layout/src/drag-drop/index.d.ts +4 -0
  79. package/types/vuu-layout/src/flexbox/Flexbox.d.ts +4 -0
  80. package/types/vuu-layout/src/flexbox/FlexboxLayout.d.ts +6 -0
  81. package/types/vuu-layout/src/flexbox/FluidGrid.d.ts +6 -0
  82. package/types/vuu-layout/src/flexbox/FluidGridLayout.d.ts +6 -0
  83. package/types/vuu-layout/src/flexbox/Splitter.d.ts +12 -0
  84. package/types/vuu-layout/src/flexbox/flexbox-utils.d.ts +12 -0
  85. package/types/vuu-layout/src/flexbox/flexboxTypes.d.ts +51 -0
  86. package/types/vuu-layout/src/flexbox/index.d.ts +4 -0
  87. package/types/vuu-layout/src/flexbox/useResponsiveSizing.d.ts +10 -0
  88. package/types/vuu-layout/src/flexbox/useSplitterResizing.d.ts +2 -0
  89. package/types/vuu-layout/src/index.d.ts +17 -0
  90. package/types/vuu-layout/src/layout-action.d.ts +19 -0
  91. package/types/vuu-layout/src/layout-header/Header.d.ts +13 -0
  92. package/types/vuu-layout/src/layout-header/index.d.ts +1 -0
  93. package/types/vuu-layout/src/layout-provider/LayoutProvider.d.ts +15 -0
  94. package/types/vuu-layout/src/layout-provider/LayoutProviderContext.d.ts +10 -0
  95. package/types/vuu-layout/src/layout-provider/index.d.ts +2 -0
  96. package/types/vuu-layout/src/layout-provider/useLayoutDragDrop.d.ts +4 -0
  97. package/types/vuu-layout/src/layout-reducer/flexUtils.d.ts +22 -0
  98. package/types/vuu-layout/src/layout-reducer/index.d.ts +4 -0
  99. package/types/vuu-layout/src/layout-reducer/insert-layout-element.d.ts +8 -0
  100. package/types/vuu-layout/src/layout-reducer/layout-reducer.d.ts +3 -0
  101. package/types/vuu-layout/src/layout-reducer/layoutTypes.d.ts +131 -0
  102. package/types/vuu-layout/src/layout-reducer/layoutUtils.d.ts +44 -0
  103. package/types/vuu-layout/src/layout-reducer/move-layout-element.d.ts +3 -0
  104. package/types/vuu-layout/src/layout-reducer/remove-layout-element.d.ts +3 -0
  105. package/types/vuu-layout/src/layout-reducer/replace-layout-element.d.ts +6 -0
  106. package/types/vuu-layout/src/layout-reducer/resize-flex-children.d.ts +4 -0
  107. package/types/vuu-layout/src/layout-reducer/wrap-layout-element.d.ts +9 -0
  108. package/types/vuu-layout/src/layout-view/View.d.ts +10 -0
  109. package/types/vuu-layout/src/layout-view/index.d.ts +3 -0
  110. package/types/vuu-layout/src/layout-view/useView.d.ts +21 -0
  111. package/types/vuu-layout/src/layout-view/useViewBroadcastChannel.d.ts +7 -0
  112. package/types/vuu-layout/src/layout-view/useViewResize.d.ts +7 -0
  113. package/types/vuu-layout/src/layout-view/viewTypes.d.ts +45 -0
  114. package/types/vuu-layout/src/layout-view-actions/ViewContext.d.ts +33 -0
  115. package/types/vuu-layout/src/layout-view-actions/index.d.ts +2 -0
  116. package/types/vuu-layout/src/layout-view-actions/useViewActionDispatcher.d.ts +4 -0
  117. package/types/vuu-layout/src/palette/Palette.d.ts +25 -0
  118. package/types/vuu-layout/src/palette/index.d.ts +1 -0
  119. package/types/vuu-layout/src/placeholder/LayoutStartPanel.d.ts +5 -0
  120. package/types/vuu-layout/src/placeholder/Placeholder.d.ts +17 -0
  121. package/types/vuu-layout/src/placeholder/index.d.ts +1 -0
  122. package/types/vuu-layout/src/responsive/breakpoints.d.ts +4 -0
  123. package/types/vuu-layout/src/responsive/index.d.ts +3 -0
  124. package/types/vuu-layout/src/responsive/use-breakpoints.d.ts +7 -0
  125. package/types/vuu-layout/src/responsive/useResizeObserver.d.ts +13 -0
  126. package/types/vuu-layout/src/responsive/utils.d.ts +6 -0
  127. package/types/vuu-layout/src/stack/Stack.d.ts +3 -0
  128. package/types/vuu-layout/src/stack/StackLayout.d.ts +6 -0
  129. package/types/vuu-layout/src/stack/index.d.ts +3 -0
  130. package/types/vuu-layout/src/stack/stackTypes.d.ts +24 -0
  131. package/types/vuu-layout/src/use-persistent-state.d.ts +11 -0
  132. package/types/vuu-layout/src/utils/index.d.ts +5 -0
  133. package/types/vuu-layout/src/utils/pathUtils.d.ts +31 -0
  134. package/types/vuu-layout/src/utils/propUtils.d.ts +5 -0
  135. package/types/vuu-layout/src/utils/refUtils.d.ts +2 -0
  136. package/types/vuu-layout/src/utils/styleUtils.d.ts +3 -0
  137. package/types/vuu-layout/src/utils/typeOf.d.ts +7 -0
  138. package/types/{index.d.ts → vuu-shell/src/index.d.ts} +1 -2
  139. package/types/{layout-management/useLayoutManager.d.ts → vuu-shell/src/layout-management/LayoutManagementProvider.d.ts} +22 -7
  140. package/types/vuu-shell/src/layout-management/defaultWorkspaceJSON.d.ts +9 -0
  141. package/types/{layout-management → vuu-shell/src/layout-management}/index.d.ts +2 -2
  142. package/types/{persistence-manager → vuu-shell/src/persistence-manager}/StaticPersistenceManager.d.ts +3 -1
  143. package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/context-panel/ContextPanel.d.ts +2 -1
  144. package/types/vuu-shell/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.d.ts +2 -0
  145. package/types/vuu-shell/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.d.ts +2 -0
  146. package/types/vuu-shell/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.d.ts +2 -0
  147. package/types/vuu-shell/src/shell-layout-templates/useShellLayout.d.ts +45 -0
  148. package/types/vuu-shell/src/shell.d.ts +16 -0
  149. package/cjs/layout-management/defaultApplicationJson.js +0 -97
  150. package/cjs/layout-management/defaultApplicationJson.js.map +0 -1
  151. package/cjs/layout-management/useLayoutManager.js.map +0 -1
  152. package/cjs/shell-layouts/context-panel/ContextPanel.js.map +0 -1
  153. package/cjs/shell-layouts/side-panel/SidePanel.js.map +0 -1
  154. package/cjs/shell-layouts/useFullHeightLeftPanel.js.map +0 -1
  155. package/cjs/shell-layouts/useInlayLeftPanel.js.map +0 -1
  156. package/cjs/shell-layouts/useShellLayout.js +0 -15
  157. package/cjs/shell-layouts/useShellLayout.js.map +0 -1
  158. package/esm/layout-management/defaultApplicationJson.js +0 -91
  159. package/esm/layout-management/defaultApplicationJson.js.map +0 -1
  160. package/esm/layout-management/useLayoutManager.js.map +0 -1
  161. package/esm/shell-layouts/context-panel/ContextPanel.js.map +0 -1
  162. package/esm/shell-layouts/side-panel/SidePanel.js.map +0 -1
  163. package/esm/shell-layouts/useFullHeightLeftPanel.js.map +0 -1
  164. package/esm/shell-layouts/useInlayLeftPanel.js.map +0 -1
  165. package/esm/shell-layouts/useShellLayout.js +0 -13
  166. package/esm/shell-layouts/useShellLayout.js.map +0 -1
  167. package/types/layout-management/defaultApplicationJson.d.ts +0 -6
  168. package/types/shell-layouts/useFullHeightLeftPanel.d.ts +0 -3
  169. package/types/shell-layouts/useInlayLeftPanel.d.ts +0 -3
  170. package/types/shell-layouts/useShellLayout.d.ts +0 -10
  171. package/types/shell.d.ts +0 -17
  172. /package/cjs/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js +0 -0
  173. /package/cjs/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js.map +0 -0
  174. /package/cjs/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js +0 -0
  175. /package/cjs/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js.map +0 -0
  176. /package/cjs/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.js +0 -0
  177. /package/esm/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js +0 -0
  178. /package/esm/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js.map +0 -0
  179. /package/esm/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js +0 -0
  180. /package/esm/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js.map +0 -0
  181. /package/esm/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.js +0 -0
  182. /package/types/{ShellContextProvider.d.ts → vuu-shell/src/ShellContextProvider.d.ts} +0 -0
  183. /package/types/{app-header → vuu-shell/src/app-header}/AppHeader.d.ts +0 -0
  184. /package/types/{app-header → vuu-shell/src/app-header}/index.d.ts +0 -0
  185. /package/types/{application-provider → vuu-shell/src/application-provider}/ApplicationContext.d.ts +0 -0
  186. /package/types/{application-provider → vuu-shell/src/application-provider}/ApplicationProvider.d.ts +0 -0
  187. /package/types/{application-provider → vuu-shell/src/application-provider}/index.d.ts +0 -0
  188. /package/types/{connection-status → vuu-shell/src/connection-status}/ConnectionStatusIndicator.d.ts +0 -0
  189. /package/types/{connection-status → vuu-shell/src/connection-status}/index.d.ts +0 -0
  190. /package/types/{datasource-provider → vuu-shell/src/datasource-provider}/DataSourceProvider.d.ts +0 -0
  191. /package/types/{datasource-provider → vuu-shell/src/datasource-provider}/index.d.ts +0 -0
  192. /package/types/{feature → vuu-shell/src/feature}/Feature.d.ts +0 -0
  193. /package/types/{feature → vuu-shell/src/feature}/FeatureErrorBoundary.d.ts +0 -0
  194. /package/types/{feature → vuu-shell/src/feature}/Loader.d.ts +0 -0
  195. /package/types/{feature → vuu-shell/src/feature}/index.d.ts +0 -0
  196. /package/types/{feature-list → vuu-shell/src/feature-list}/FeatureList.d.ts +0 -0
  197. /package/types/{feature-list → vuu-shell/src/feature-list}/index.d.ts +0 -0
  198. /package/types/{get-layout-history.d.ts → vuu-shell/src/get-layout-history.d.ts} +0 -0
  199. /package/types/{layout-management → vuu-shell/src/layout-management}/LayoutList.d.ts +0 -0
  200. /package/types/{layout-management → vuu-shell/src/layout-management}/LayoutTile.d.ts +0 -0
  201. /package/types/{layout-management → vuu-shell/src/layout-management}/SaveLayoutPanel.d.ts +0 -0
  202. /package/types/{layout-management → vuu-shell/src/layout-management}/layoutTypes.d.ts +0 -0
  203. /package/types/{layout-management → vuu-shell/src/layout-management}/screenshot-utils.d.ts +0 -0
  204. /package/types/{layout-management → vuu-shell/src/layout-management}/useLayoutContextMenuItems.d.ts +0 -0
  205. /package/types/{left-nav → vuu-shell/src/left-nav}/LeftNav.d.ts +0 -0
  206. /package/types/{left-nav → vuu-shell/src/left-nav}/index.d.ts +0 -0
  207. /package/types/{login → vuu-shell/src/login}/LoginPanel.d.ts +0 -0
  208. /package/types/{login → vuu-shell/src/login}/VuuLogo.d.ts +0 -0
  209. /package/types/{login → vuu-shell/src/login}/index.d.ts +0 -0
  210. /package/types/{login → vuu-shell/src/login}/login-utils.d.ts +0 -0
  211. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/LocalPersistenceManager.d.ts +0 -0
  212. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/PersistenceManager.d.ts +0 -0
  213. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/PersistenceProvider.d.ts +0 -0
  214. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/RemotePersistenceManager.d.ts +0 -0
  215. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/index.d.ts +0 -0
  216. /package/types/{persistence-provider → vuu-shell/src/persistence-provider}/PersistenceProviderNext.d.ts +0 -0
  217. /package/types/{persistence-provider → vuu-shell/src/persistence-provider}/index.d.ts +0 -0
  218. /package/types/{session-editing-form → vuu-shell/src/session-editing-form}/SessionEditingForm.d.ts +0 -0
  219. /package/types/{session-editing-form → vuu-shell/src/session-editing-form}/index.d.ts +0 -0
  220. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/context-panel/index.d.ts +0 -0
  221. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/index.d.ts +0 -0
  222. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/side-panel/SidePanel.d.ts +0 -0
  223. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/side-panel/index.d.ts +0 -0
  224. /package/types/{theme-switch → vuu-shell/src/theme-switch}/ThemeSwitch.d.ts +0 -0
  225. /package/types/{theme-switch → vuu-shell/src/theme-switch}/index.d.ts +0 -0
  226. /package/types/{use-force-render.d.ts → vuu-shell/src/use-force-render.d.ts} +0 -0
  227. /package/types/{user-settings → vuu-shell/src/user-settings}/SettingsForm.d.ts +0 -0
  228. /package/types/{user-settings → vuu-shell/src/user-settings}/UserSettingsPanel.d.ts +0 -0
  229. /package/types/{user-settings → vuu-shell/src/user-settings}/index.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextPanel.js","sources":["../../../src/shell-layout-templates/context-panel/ContextPanel.tsx"],"sourcesContent":["import {\n View,\n layoutFromJson,\n useLayoutProviderDispatch,\n} from \"@vuu-ui/vuu-layout\";\nimport { IconButton } from \"@vuu-ui/vuu-ui-controls\";\nimport { LayoutJSON, VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { useCallback, useMemo } from \"react\";\n\nimport contextPanelCss from \"./ContextPanel.css\";\n\nconst classBase = \"vuuContextPanel\";\n\nexport interface ContextPanelProps {\n [key: string]: unknown;\n className?: string;\n content?: LayoutJSON;\n expanded?: boolean;\n id?: string;\n overlay?: boolean;\n}\n\nexport const ContextPanel = ({\n className: classNameProp,\n expanded = false,\n content: contentProp,\n id = VuuShellLocation.ContextPanel,\n overlay = false,\n title,\n}: ContextPanelProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-context-panel\",\n css: contextPanelCss,\n window: targetWindow,\n });\n\n const dispatchLayoutAction = useLayoutProviderDispatch();\n // const [contentJson, setContentJson] = useState(contentProp);\n const handleClose = useCallback(() => {\n dispatchLayoutAction({\n path: `#${VuuShellLocation.ContextPanel}`,\n propName: \"expanded\",\n propValue: false,\n type: \"set-prop\",\n });\n }, [dispatchLayoutAction]);\n // TODO look up content using context\n\n const className = cx(classBase, classNameProp, {\n [`${classBase}-expanded`]: expanded,\n [`${classBase}-inline`]: overlay !== true,\n [`${classBase}-overlay`]: overlay,\n });\n\n const content = useMemo(\n () =>\n contentProp && expanded ? layoutFromJson(contentProp, \"context-0\") : null,\n [contentProp, expanded]\n );\n\n return (\n <div\n className={cx(classBase, className, \"vuuScrollable\", {\n [`${classBase}-expanded`]: expanded,\n })}\n >\n <View className={`${classBase}-inner`} header={false} id={id}>\n <div className={`${classBase}-header`}>\n <h2 className={`${classBase}-title`}>{title}</h2>\n <IconButton\n className={`${classBase}-close`}\n data-embedded\n icon=\"close\"\n onClick={handleClose}\n size={16}\n variant=\"secondary\"\n />\n </div>\n <div className={`${classBase}-content`}>{content}</div>\n </View>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAcA,MAAM,SAAY,GAAA,iBAAA,CAAA;AAWX,MAAM,eAAe,CAAC;AAAA,EAC3B,SAAW,EAAA,aAAA;AAAA,EACX,QAAW,GAAA,KAAA;AAAA,EACX,OAAS,EAAA,WAAA;AAAA,EACT,KAAK,gBAAiB,CAAA,YAA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AA,EAAG,SAAS,CAAA,SAAA,CAAW,GAAG,QAAA;AAAA,OAC5B,CAAA;AAAA,MAED,QAAA,kBAAA,IAAA,CAAC,QAAK,SAAW,EAAA,CAAA,EAAG,SAAS,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,EACpD,EAAA,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,CAC1B,OAAA,CAAA,EAAA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,IAAG,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,UAAW,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,0BAC5C,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,GAAG,SAAS,CAAA,MAAA,CAAA;AAAA,cACvB,eAAa,EAAA,IAAA;AAAA,cACb,IAAK,EAAA,OAAA;AAAA,cACL,OAAS,EAAA,WAAA;AAAA,cACT,IAAM,EAAA,EAAA;AAAA,cACN,OAAQ,EAAA,WAAA;AAAA,aAAA;AAAA,WACV;AAAA,SACF,EAAA,CAAA;AAAA,4BACC,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,YAAa,QAAQ,EAAA,OAAA,EAAA,CAAA;AAAA,OACnD,EAAA,CAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -1,23 +1,24 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Flexbox, DraggableLayout } from '@vuu-ui/vuu-layout';
3
- import { ContextPanel } from './context-panel/ContextPanel.js';
4
- import { SidePanel } from './side-panel/SidePanel.js';
2
+ import { Flexbox, LayoutContainer } from '@vuu-ui/vuu-layout';
3
+ import { VuuShellLocation } from '@vuu-ui/vuu-utils';
4
+ import { ContextPanel } from '../context-panel/ContextPanel.js';
5
+ import { SidePanel } from '../side-panel/SidePanel.js';
5
6
 
6
7
  const useFullHeightLeftPanel = ({
7
8
  appHeader,
8
- LeftSidePanelProps
9
+ LeftSidePanelProps,
10
+ htmlAttributes
9
11
  }) => {
10
12
  return /* @__PURE__ */ jsxs(
11
13
  Flexbox,
12
14
  {
13
- className: "App",
15
+ ...htmlAttributes,
14
16
  style: {
15
- flexDirection: "row",
16
- height: "100%",
17
- width: "100%"
17
+ ...htmlAttributes?.style,
18
+ flexDirection: "row"
18
19
  },
19
20
  children: [
20
- /* @__PURE__ */ jsx(SidePanel, { ...LeftSidePanelProps, id: "vuu-side-panel" }),
21
+ /* @__PURE__ */ jsx(SidePanel, { ...LeftSidePanelProps, id: VuuShellLocation.SidePanel }),
21
22
  /* @__PURE__ */ jsxs(
22
23
  Flexbox,
23
24
  {
@@ -26,10 +27,9 @@ const useFullHeightLeftPanel = ({
26
27
  children: [
27
28
  appHeader,
28
29
  /* @__PURE__ */ jsx(
29
- DraggableLayout,
30
+ LayoutContainer,
30
31
  {
31
- dropTarget: true,
32
- className: "vuuShell-content-main",
32
+ id: VuuShellLocation.WorkspaceContainer,
33
33
  style: { flex: 1 }
34
34
  },
35
35
  "main-content"
@@ -37,7 +37,7 @@ const useFullHeightLeftPanel = ({
37
37
  ]
38
38
  }
39
39
  ),
40
- /* @__PURE__ */ jsx(ContextPanel, { id: "context-panel", overlay: true })
40
+ /* @__PURE__ */ jsx(ContextPanel, { id: VuuShellLocation.ContextPanel, overlay: true })
41
41
  ]
42
42
  }
43
43
  );
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFullHeightLeftPanel.js","sources":["../../../src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.tsx"],"sourcesContent":["import { LayoutContainer, Flexbox } from \"@vuu-ui/vuu-layout\";\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { ContextPanel } from \"../context-panel\";\nimport { SidePanel } from \"../side-panel\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\n\nexport const useFullHeightLeftPanel: ShellLayoutTemplateHook = ({\n appHeader,\n LeftSidePanelProps,\n htmlAttributes,\n}) => {\n return (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"row\",\n }}\n >\n <SidePanel {...LeftSidePanelProps} id={VuuShellLocation.SidePanel} />\n <Flexbox\n className=\"vuuShell-content\"\n style={{ flex: 1, flexDirection: \"column\" }}\n >\n {appHeader}\n <LayoutContainer\n id={VuuShellLocation.WorkspaceContainer}\n key=\"main-content\"\n style={{ flex: 1 }}\n />\n </Flexbox>\n <ContextPanel id={VuuShellLocation.ContextPanel} overlay></ContextPanel>\n </Flexbox>\n );\n};\n"],"names":[],"mappings":";;;;;;AAMO,MAAM,yBAAkD,CAAC;AAAA,EAC9D,SAAA;AAAA,EACA,kBAAA;AAAA,EACA,cAAA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,IAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACE,GAAG,cAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,GAAG,cAAgB,EAAA,KAAA;AAAA,QACnB,aAAe,EAAA,KAAA;AAAA,OACjB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,SAAW,EAAA,EAAA,GAAG,kBAAoB,EAAA,EAAA,EAAI,iBAAiB,SAAW,EAAA,CAAA;AAAA,wBACnE,IAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,SAAU,EAAA,kBAAA;AAAA,YACV,KAAO,EAAA,EAAE,IAAM,EAAA,CAAA,EAAG,eAAe,QAAS,EAAA;AAAA,YAEzC,QAAA,EAAA;AAAA,cAAA,SAAA;AAAA,8BACD,GAAA;AAAA,gBAAC,eAAA;AAAA,gBAAA;AAAA,kBACC,IAAI,gBAAiB,CAAA,kBAAA;AAAA,kBAErB,KAAA,EAAO,EAAE,IAAA,EAAM,CAAE,EAAA;AAAA,iBAAA;AAAA,gBADb,cAAA;AAAA,eAEN;AAAA,aAAA;AAAA,WAAA;AAAA,SACF;AAAA,4BACC,YAAa,EAAA,EAAA,EAAA,EAAI,gBAAiB,CAAA,YAAA,EAAc,SAAO,IAAC,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA;AAAA,GAC3D,CAAA;AAEJ;;;;"}
@@ -1,10 +1,12 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { Drawer, View, Flexbox, DockLayout, DraggableLayout } from '@vuu-ui/vuu-layout';
2
+ import { Drawer, View, Flexbox, DockLayout, LayoutContainer } from '@vuu-ui/vuu-layout';
3
+ import { VuuShellLocation } from '@vuu-ui/vuu-utils';
3
4
  import { useRef, useState, useCallback } from 'react';
4
5
 
5
6
  const useInlayLeftPanel = ({
7
+ LeftSidePanelProps,
6
8
  appHeader,
7
- LeftSidePanelProps
9
+ htmlAttributes
8
10
  }) => {
9
11
  const paletteView = useRef(null);
10
12
  const [open, setOpen] = useState(true);
@@ -53,15 +55,19 @@ const useInlayLeftPanel = ({
53
55
  return /* @__PURE__ */ jsxs(
54
56
  Flexbox,
55
57
  {
56
- className: "App",
57
- style: { flexDirection: "column", height: "100%", width: "100%" },
58
+ ...htmlAttributes,
59
+ style: {
60
+ ...htmlAttributes?.style,
61
+ flexDirection: "column"
62
+ },
58
63
  children: [
59
64
  appHeader,
60
65
  /* @__PURE__ */ jsx(DockLayout, { style: { flex: 1 }, children: getDrawers(LeftSidePanelProps?.children).concat(
61
66
  /* @__PURE__ */ jsx(
62
- DraggableLayout,
67
+ LayoutContainer,
63
68
  {
64
69
  dropTarget: true,
70
+ id: VuuShellLocation.WorkspaceContainer,
65
71
  style: { width: "100%", height: "100%" }
66
72
  },
67
73
  "main-content"
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInlayLeftPanel.js","sources":["../../../src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.tsx"],"sourcesContent":["import {\n DockLayout,\n LayoutContainer,\n Drawer,\n Flexbox,\n View,\n} from \"@vuu-ui/vuu-layout\";\n\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { MouseEvent, ReactElement, useCallback, useRef, useState } from \"react\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\n\nexport const useInlayLeftPanel: ShellLayoutTemplateHook = ({\n LeftSidePanelProps,\n appHeader,\n htmlAttributes,\n}) => {\n const paletteView = useRef<HTMLDivElement>(null);\n const [open, setOpen] = useState(true);\n\n const handleDrawerClick = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n const target = e.target as HTMLElement;\n if (!paletteView.current?.contains(target)) {\n setOpen(!open);\n }\n },\n [open]\n );\n\n const getDrawers = useCallback(\n (leftSidePanel) => {\n const drawers: ReactElement[] = [];\n drawers.push(\n <Drawer\n key=\"left-panel\"\n onClick={handleDrawerClick}\n open={open}\n position=\"left\"\n inline\n peekaboo\n sizeOpen={200}\n toggleButton=\"end\"\n >\n <View\n className=\"vuuShell-palette\"\n id=\"vw-app-palette\"\n key=\"app-palette\"\n ref={paletteView}\n style={{ height: \"100%\" }}\n >\n {leftSidePanel}\n </View>\n </Drawer>\n );\n\n return drawers;\n },\n [handleDrawerClick, open]\n );\n\n return (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"column\",\n }}\n >\n {appHeader}\n <DockLayout style={{ flex: 1 }}>\n {getDrawers(LeftSidePanelProps?.children).concat(\n <LayoutContainer\n dropTarget\n id={VuuShellLocation.WorkspaceContainer}\n key=\"main-content\"\n style={{ width: \"100%\", height: \"100%\" }}\n />\n )}\n </DockLayout>\n </Flexbox>\n );\n};\n"],"names":[],"mappings":";;;;;AAYO,MAAM,oBAA6C,CAAC;AAAA,EACzD,kBAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AACF,CAAM,KAAA;AACJ,EAAM,MAAA,WAAA,GAAc,OAAuB,IAAI,CAAA,CAAA;AAC/C,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,IAAI,CAAA,CAAA;AAErC,EAAA,MAAM,iBAAoB,GAA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EAAA,KAAA;AAAA,QACnB,aAAe,EAAA,QAAA;AAAA,OACjB;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,wBACD,GAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAO,EAAE,IAAA,EAAM,GACxB,EAAA,QAAA,EAAA,UAAA,CAAW,kBAAoB,EAAA,QAAQ,CAAE,CAAA,MAAA;AAAA,0BACxC,GAAA;AAAA,YAAC,eAAA;AAAA,YAAA;AAAA,cACC,UAAU,EAAA,IAAA;AAAA,cACV,IAAI,gBAAiB,CAAA,kBAAA;AAAA,cAErB,KAAO,EAAA,EAAE,KAAO,EAAA,MAAA,EAAQ,QAAQ,MAAO,EAAA;AAAA,aAAA;AAAA,YADnC,cAAA;AAAA,WAEN;AAAA,SAEJ,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidePanel.js","sources":["../../../src/shell-layout-templates/side-panel/SidePanel.tsx"],"sourcesContent":["import { CSSProperties, HTMLAttributes, useMemo } from \"react\";\nimport cx from \"clsx\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\n\nimport sidePanelCss from \"./SidePanel.css\";\n// import { useLayoutManager } from \"../../layout-management\";\n\nconst classBase = \"vuuShellSidePanel\";\n\nexport interface SidePanelProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n path?: string;\n sizeOpen?: number;\n sizeClosed?: number;\n}\n\nexport const SidePanel = ({\n children,\n open = true,\n sizeClosed = 90,\n sizeOpen = 200,\n style: styleProp,\n ...htmlAttributes\n}: SidePanelProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-side-panel\",\n css: sidePanelCss,\n window: targetWindow,\n });\n\n // const { applicationJson, saveApplicationSettings } = useLayoutManager();\n // console.log(`settings`, {\n // expanded: applicationJson?.settings?.leftNav?.expanded,\n // active: applicationJson?.settings?.leftNav?.activeTabIndex,\n // });\n\n const style = useMemo(\n () =>\n ({\n ...styleProp,\n \"--shell-left-nav-size\": open ? `${sizeOpen}px` : `${sizeClosed}px`,\n } as CSSProperties),\n [open, sizeClosed, sizeOpen, styleProp]\n );\n return (\n <div {...htmlAttributes} className={cx(classBase)} style={style}>\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,SAAY,GAAA,mBAAA,CAAA;AASX,MAAM,YAAY,CAAC;AAAA,EACxB,QAAA;AAAA,EACA,IAAO,GAAA,IAAA;AAAA,EACP,UAAa,GAAA,EAAA;AAAA,EACb,QAAW,GAAA,GAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,GAAG,cAAA;AACL,CAAsB,KAAA;AACpB,EAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,gBAAA;AAAA,IACR,GAAK,EAAA,YAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAQD,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,OACG;AAAA,MACC,GAAG,SAAA;AAAA,MACH,yBAAyB,IAAO,GAAA,CAAA,EAAG,QAAQ,CAAA,EAAA,CAAA,GAAO,GAAG,UAAU,CAAA,EAAA,CAAA;AAAA,KACjE,CAAA;AAAA,IACF,CAAC,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,SAAS,CAAA;AAAA,GACxC,CAAA;AACA,EACE,uBAAA,GAAA,CAAC,SAAK,GAAG,cAAA,EAAgB,WAAW,EAAG,CAAA,SAAS,CAAG,EAAA,KAAA,EAChD,QACH,EAAA,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,44 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Flexbox, LayoutContainer } from '@vuu-ui/vuu-layout';
3
+ import { VuuShellLocation } from '@vuu-ui/vuu-utils';
4
+ import { ContextPanel } from '../context-panel/ContextPanel.js';
5
+
6
+ const useSimpleContentPane = ({
7
+ appHeader,
8
+ htmlAttributes
9
+ }) => {
10
+ return /* @__PURE__ */ jsxs(
11
+ Flexbox,
12
+ {
13
+ ...htmlAttributes,
14
+ style: {
15
+ ...htmlAttributes?.style,
16
+ flexDirection: "row"
17
+ },
18
+ children: [
19
+ /* @__PURE__ */ jsxs(
20
+ Flexbox,
21
+ {
22
+ className: "vuuShell-content",
23
+ style: { flex: 1, flexDirection: "column" },
24
+ children: [
25
+ appHeader,
26
+ /* @__PURE__ */ jsx(
27
+ LayoutContainer,
28
+ {
29
+ id: VuuShellLocation.WorkspaceContainer,
30
+ style: { flex: 1 }
31
+ },
32
+ "main-content"
33
+ )
34
+ ]
35
+ }
36
+ ),
37
+ /* @__PURE__ */ jsx(ContextPanel, { id: VuuShellLocation.ContextPanel, overlay: true })
38
+ ]
39
+ }
40
+ );
41
+ };
42
+
43
+ export { useSimpleContentPane };
44
+ //# sourceMappingURL=useSimpleContentPane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSimpleContentPane.js","sources":["../../../src/shell-layout-templates/simple-content-pane/useSimpleContentPane.tsx"],"sourcesContent":["import { LayoutContainer, Flexbox } from \"@vuu-ui/vuu-layout\";\nimport { VuuShellLocation } from \"@vuu-ui/vuu-utils\";\nimport { ContextPanel } from \"../context-panel\";\nimport { ShellLayoutTemplateHook } from \"../useShellLayout\";\n\nexport const useSimpleContentPane: ShellLayoutTemplateHook = ({\n appHeader,\n htmlAttributes,\n}) => {\n return (\n <Flexbox\n {...htmlAttributes}\n style={{\n ...htmlAttributes?.style,\n flexDirection: \"row\",\n }}\n >\n <Flexbox\n className=\"vuuShell-content\"\n style={{ flex: 1, flexDirection: \"column\" }}\n >\n {appHeader}\n <LayoutContainer\n id={VuuShellLocation.WorkspaceContainer}\n key=\"main-content\"\n style={{ flex: 1 }}\n />\n </Flexbox>\n <ContextPanel id={VuuShellLocation.ContextPanel} overlay></ContextPanel>\n </Flexbox>\n );\n};\n"],"names":[],"mappings":";;;;;AAKO,MAAM,uBAAgD,CAAC;AAAA,EAC5D,SAAA;AAAA,EACA,cAAA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,IAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACE,GAAG,cAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,GAAG,cAAgB,EAAA,KAAA;AAAA,QACnB,aAAe,EAAA,KAAA;AAAA,OACjB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,IAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,SAAU,EAAA,kBAAA;AAAA,YACV,KAAO,EAAA,EAAE,IAAM,EAAA,CAAA,EAAG,eAAe,QAAS,EAAA;AAAA,YAEzC,QAAA,EAAA;AAAA,cAAA,SAAA;AAAA,8BACD,GAAA;AAAA,gBAAC,eAAA;AAAA,gBAAA;AAAA,kBACC,IAAI,gBAAiB,CAAA,kBAAA;AAAA,kBAErB,KAAA,EAAO,EAAE,IAAA,EAAM,CAAE,EAAA;AAAA,iBAAA;AAAA,gBADb,cAAA;AAAA,eAEN;AAAA,aAAA;AAAA,WAAA;AAAA,SACF;AAAA,4BACC,YAAa,EAAA,EAAA,EAAA,EAAI,gBAAiB,CAAA,YAAA,EAAc,SAAO,IAAC,EAAA,CAAA;AAAA,OAAA;AAAA,KAAA;AAAA,GAC3D,CAAA;AAEJ;;;;"}
@@ -0,0 +1,19 @@
1
+ import { useFullHeightLeftPanel } from './full-height-left-panel/useFullHeightLeftPanel.js';
2
+ import { useInlayLeftPanel } from './inlay-left-panel/useInlayLeftPanel.js';
3
+ import { useSimpleContentPane } from './simple-content-pane/useSimpleContentPane.js';
4
+
5
+ const LayoutHook = {
6
+ "full-height": useFullHeightLeftPanel,
7
+ inlay: useInlayLeftPanel,
8
+ "simple-content-pane": useSimpleContentPane
9
+ };
10
+ const useShellLayout = ({
11
+ layoutTemplateId = "simple-content-pane",
12
+ ...props
13
+ }) => {
14
+ const useLayoutHook = LayoutHook[layoutTemplateId];
15
+ return useLayoutHook(props);
16
+ };
17
+
18
+ export { useShellLayout };
19
+ //# sourceMappingURL=useShellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShellLayout.js","sources":["../../src/shell-layout-templates/useShellLayout.ts"],"sourcesContent":["import { HTMLAttributes, ReactElement, ReactNode } from \"react\";\nimport { useFullHeightLeftPanel } from \"./full-height-left-panel/useFullHeightLeftPanel\";\nimport { useInlayLeftPanel } from \"./inlay-left-panel/useInlayLeftPanel\";\nimport { useSimpleContentPane } from \"./simple-content-pane/useSimpleContentPane\";\nimport { SidePanelProps } from \"./side-panel\";\n\nconst LayoutHook = {\n \"full-height\": useFullHeightLeftPanel,\n inlay: useInlayLeftPanel,\n \"simple-content-pane\": useSimpleContentPane,\n};\n\nexport type LayoutTemplateId = keyof typeof LayoutHook;\n\nexport type ShellLayoutTemplateProps = Omit<\n ShellLayoutProps,\n \"layoutTemplateId\"\n>;\n\nexport type ShellLayoutTemplateHook = (\n props: ShellLayoutTemplateProps\n) => ReactElement;\n\n/**\n * The Shell Layout is the outermost 'chrome' of the appliciation,\n * enclosing the main content area. It will be rendered by one of\n * two available templates, determined by the layoutTemplateId,\n */\nexport interface ShellLayoutProps {\n /**\n * App Header will be rendered in position determined by layout-template\n */\n appHeader?: ReactNode;\n\n /**\n * HTML attributes that will be applied to root div. Default attributes\n * will be applied, unless overidden, as follows:\n *\n * - height: 100%\n * - width: 100%\n */\n htmlAttributes?: HTMLAttributes<HTMLDivElement>;\n /**\n * identifier for shell layout template to be used. Default template\n * will be \"inlay\"\n */\n layoutTemplateId?: LayoutTemplateId;\n /**\n * If template renders SidePanel, these props will be provided\n */\n LeftSidePanelProps?: SidePanelProps;\n}\n\n/**\n * This hook acts as a stub for the actual shell layout\n * template hooks. It will delegate to the appropriate shell\n * layout hook, based on the value of layoutTemplateId.\n */\nexport const useShellLayout = ({\n layoutTemplateId = \"simple-content-pane\",\n ...props\n}: ShellLayoutProps) => {\n const useLayoutHook = LayoutHook[layoutTemplateId];\n return useLayoutHook(props);\n};\n"],"names":[],"mappings":";;;;AAMA,MAAM,UAAa,GAAA;AAAA,EACjB,aAAe,EAAA,sBAAA;AAAA,EACf,KAAO,EAAA,iBAAA;AAAA,EACP,qBAAuB,EAAA,oBAAA;AACzB,CAAA,CAAA;AAgDO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,gBAAmB,GAAA,qBAAA;AAAA,EACnB,GAAG,KAAA;AACL,CAAwB,KAAA;AACtB,EAAM,MAAA,aAAA,GAAgB,WAAW,gBAAgB,CAAA,CAAA;AACjD,EAAA,OAAO,cAAc,KAAK,CAAA,CAAA;AAC5B;;;;"}
package/esm/shell.css.js CHANGED
@@ -1,4 +1,4 @@
1
- var shellCss = ".vuuShell {\n background-color: var(--vuu-color-gray-25);\n height: var(--vuuShell-height, 100vh);\n width: var(--vuuShell-width, 100vw);\n}\n\n.vuuShell-mainTabs {\n background: var(--salt-container-primary-background);\n}\n\n.vuuShell-palette {\n --vuuView-border: none;\n --vuuView-margin: 0;\n}\n\n.vuuShell-warningPlaceholder {\n background-color: var(--salt-container-background-high);\n height: 100%;\n}\n\n/* until we reinstat5e the toolbar */\n.vuuToolbarProxy {\n background: var(--salt-container-primary-background);\n}\n\n.vuuShell-mainTabs > .vuuTabstrip > .vuuOverflowContainer-wrapContainer {\n background: var(--vuu-color-gray-25);\n}\n\n.vuuShell-mainTabs {\n --vuuTab-height: 28px;\n border: solid 1px #d6d7da;\n border-top: none !important;\n border-radius: 6px;\n height: 100%;\n padding: 36px 8px 8px 8px;\n position: relative;\n width: 100%;\n}\n\n.vuuShell-mainTabs > .vuuTabstrip {\n left: -1px;\n padding-bottom: 7px;\n position: absolute !important;\n right: 1px;\n top: 0;\n width: calc(100% + 2px) !important;\n}\n\n.vuuShell-content {\n padding: var(--vuuShell-content-padding, 8px);\n}\n";
1
+ var shellCss = ".vuuShell {\n background-color: var(--vuu-color-gray-25);\n height: var(--vuuShell-height, 100vh);\n width: var(--vuuShell-width, 100vw);\n}\n\n.vuu-workspace-tabs {\n background: var(--salt-container-primary-background);\n}\n\n.vuuShell-palette {\n --vuuView-border: none;\n --vuuView-margin: 0;\n}\n\n.vuuShell-warningPlaceholder {\n background-color: var(--salt-container-background-high);\n height: 100%;\n}\n\n/* until we reinstat5e the toolbar */\n.vuuToolbarProxy {\n background: var(--salt-container-primary-background);\n}\n\n.vuu-workspace-tabs > .vuuTabstrip > .vuuOverflowContainer-wrapContainer {\n background: var(--vuu-color-gray-25);\n}\n\n.vuu-workspace-tabs {\n --vuuTab-height: 28px;\n border: solid 1px #d6d7da;\n border-top: none !important;\n border-radius: 6px;\n height: 100%;\n padding: 36px 8px 8px 8px;\n position: relative;\n width: 100%;\n}\n\n.vuu-workspace-tabs > .vuuTabstrip {\n left: -1px;\n padding-bottom: 7px;\n position: absolute !important;\n right: 1px;\n top: 0;\n width: calc(100% + 2px) !important;\n}\n\n.vuuShell-content {\n padding: var(--vuuShell-content-padding, 8px);\n}\n";
2
2
 
3
3
  export { shellCss as default };
4
4
  //# sourceMappingURL=shell.css.js.map
package/esm/shell.js CHANGED
@@ -1,25 +1,24 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { connectToServer } from '@vuu-ui/vuu-data-remote';
3
- import { StackLayout, LayoutProvider, DraggableLayout } from '@vuu-ui/vuu-layout';
3
+ import { StackLayout, LayoutProvider } from '@vuu-ui/vuu-layout';
4
4
  import { DialogProvider, NotificationsProvider, ContextMenuProvider } from '@vuu-ui/vuu-popups';
5
5
  import { registerComponent, logger } from '@vuu-ui/vuu-utils';
6
6
  import { useComponentCssInjection } from '@salt-ds/styles';
7
7
  import { useWindow } from '@salt-ds/window';
8
- import cx from 'clsx';
9
- import { useMemo, useRef, useState, useCallback } from 'react';
8
+ import { useMemo, useState, useCallback } from 'react';
10
9
  import { AppHeader } from './app-header/AppHeader.js';
11
10
  import { ApplicationProvider } from './application-provider/ApplicationProvider.js';
12
- import { loadingApplicationJson } from './layout-management/defaultApplicationJson.js';
11
+ import { loadingJSON } from './layout-management/defaultWorkspaceJSON.js';
13
12
  import 'html-to-image';
14
13
  import '@salt-ds/core';
15
14
  import '@vuu-ui/vuu-ui-controls';
16
- import { LayoutManagementProvider, useLayoutManager } from './layout-management/useLayoutManager.js';
15
+ import 'clsx';
16
+ import { LayoutManagementProvider, useLayoutManager } from './layout-management/LayoutManagementProvider.js';
17
17
  import { useLayoutContextMenuItems } from './layout-management/useLayoutContextMenuItems.js';
18
18
  import { usePersistenceManager, PersistenceProvider } from './persistence-manager/PersistenceProvider.js';
19
19
  import { LocalPersistenceManager } from './persistence-manager/LocalPersistenceManager.js';
20
- import './persistence-manager/RemotePersistenceManager.js';
21
20
  import './persistence-manager/StaticPersistenceManager.js';
22
- import { useShellLayout } from './shell-layouts/useShellLayout.js';
21
+ import { useShellLayout } from './shell-layout-templates/useShellLayout.js';
23
22
  import { UserSettingsPanel } from './user-settings/UserSettingsPanel.js';
24
23
  import shellCss from './shell.css.js';
25
24
 
@@ -32,18 +31,34 @@ if (process.env.NODE_ENV === "production") {
32
31
  }
33
32
  }
34
33
  const { error } = logger("Shell");
35
- const defaultLeftSidePanel = {};
34
+ const getAppHeader = (shellLayoutProps, loginUrl) => shellLayoutProps?.appHeader ?? /* @__PURE__ */ jsx(AppHeader, { loginUrl });
35
+ const defaultHTMLAttributes = {
36
+ className: "vuuShell",
37
+ style: {
38
+ height: "100%",
39
+ width: "100%"
40
+ }
41
+ };
42
+ const getHTMLAttributes = (props) => {
43
+ if (props?.htmlAttributes) {
44
+ return {
45
+ ...defaultHTMLAttributes,
46
+ ...props.htmlAttributes,
47
+ style: {
48
+ ...defaultHTMLAttributes.style,
49
+ ...props.htmlAttributes.style
50
+ }
51
+ };
52
+ } else {
53
+ return defaultHTMLAttributes;
54
+ }
55
+ };
36
56
  const VuuApplication = ({
37
- LayoutProps,
38
- LeftSidePanelProps = defaultLeftSidePanel,
57
+ ShellLayoutProps: ShellLayoutProps2,
39
58
  children,
40
- className: classNameProp,
41
- leftSidePanelLayout,
42
59
  loginUrl,
43
- saveUrl,
44
60
  serverUrl,
45
- user,
46
- ...htmlAttributes
61
+ user
47
62
  }) => {
48
63
  const targetWindow = useWindow();
49
64
  useComponentCssInjection({
@@ -51,10 +66,14 @@ const VuuApplication = ({
51
66
  css: shellCss,
52
67
  window: targetWindow
53
68
  });
54
- const rootRef = useRef(null);
55
- const { applicationJson, saveApplicationLayout } = useLayoutManager();
69
+ const shellLayout = useShellLayout({
70
+ ...ShellLayoutProps2,
71
+ appHeader: getAppHeader(ShellLayoutProps2, loginUrl),
72
+ htmlAttributes: getHTMLAttributes(ShellLayoutProps2)
73
+ });
74
+ const { workspaceJSON, saveApplicationLayout } = useLayoutManager();
56
75
  const { buildMenuOptions, handleMenuAction } = useLayoutContextMenuItems();
57
- const [connectionStatus, setConnectionStatus] = useState("connected");
76
+ const [connectionStatus, setConnectionStatus] = useState("initialising");
58
77
  const handleLayoutChange = useCallback(
59
78
  (layout) => {
60
79
  try {
@@ -73,15 +92,14 @@ const VuuApplication = ({
73
92
  username: user.username
74
93
  });
75
94
  setConnectionStatus(connectionStatus2);
95
+ } else {
96
+ console.warn(
97
+ `Shell: serverUrl: '${serverUrl}', token: '${Array(user.token.length).fill("#").join("")}'
98
+ `
99
+ );
76
100
  }
77
101
  }, [serverUrl, user.token, user.username]);
78
- const className = cx("vuuShell");
79
- const isLayoutLoading = applicationJson === loadingApplicationJson;
80
- const shellLayout = useShellLayout({
81
- LeftSidePanelProps,
82
- leftSidePanelLayout,
83
- appHeader: /* @__PURE__ */ jsx(AppHeader, { loginUrl })
84
- });
102
+ const isLayoutLoading = workspaceJSON === loadingJSON;
85
103
  if (connectionStatus === "rejected") {
86
104
  console.log("game over, no connection to server");
87
105
  }
@@ -94,18 +112,9 @@ const VuuApplication = ({
94
112
  /* @__PURE__ */ jsx(
95
113
  LayoutProvider,
96
114
  {
97
- ...LayoutProps,
98
- layout: applicationJson.layout,
115
+ workspaceJSON,
99
116
  onLayoutChange: handleLayoutChange,
100
- children: /* @__PURE__ */ jsx(
101
- DraggableLayout,
102
- {
103
- className,
104
- ref: rootRef,
105
- ...htmlAttributes,
106
- children: shellLayout
107
- }
108
- )
117
+ children: shellLayout
109
118
  }
110
119
  ),
111
120
  children
@@ -113,18 +122,18 @@ const VuuApplication = ({
113
122
  }
114
123
  );
115
124
  };
116
- const Shell = ({ defaultLayout, user, ...props }) => {
125
+ const Shell = ({ ContentLayoutProps, user, ...props }) => {
117
126
  const persistenceManager = usePersistenceManager();
118
127
  const localPersistenceManager = useMemo(() => {
119
128
  if (persistenceManager) {
120
129
  return void 0;
121
130
  }
122
131
  console.log(
123
- `No Persistence Manager is configured, configuration data will be persisted to Local Storage, under the key 'vuu/${user.username}'`
132
+ `No Persistence Manager, configuration data will be persisted to Local Storage, key: 'vuu/${user.username}'`
124
133
  );
125
134
  return new LocalPersistenceManager(`vuu/${user.username}`);
126
135
  }, [persistenceManager, user.username]);
127
- const shellProviders = /* @__PURE__ */ jsx(ApplicationProvider, { density: "high", theme: "vuu-theme", user, children: /* @__PURE__ */ jsx(LayoutManagementProvider, { defaultLayout, children: /* @__PURE__ */ jsx(DialogProvider, { children: /* @__PURE__ */ jsx(NotificationsProvider, { children: /* @__PURE__ */ jsx(VuuApplication, { ...props, user }) }) }) }) });
136
+ const shellProviders = /* @__PURE__ */ jsx(ApplicationProvider, { density: "high", theme: "vuu-theme", user, children: /* @__PURE__ */ jsx(LayoutManagementProvider, { ...ContentLayoutProps, children: /* @__PURE__ */ jsx(DialogProvider, { children: /* @__PURE__ */ jsx(NotificationsProvider, { children: /* @__PURE__ */ jsx(VuuApplication, { ...props, user }) }) }) }) });
128
137
  if (persistenceManager) {
129
138
  return shellProviders;
130
139
  } else {
package/esm/shell.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"shell.js","sources":["../src/shell.tsx"],"sourcesContent":["import { connectToServer } from \"@vuu-ui/vuu-data-remote\";\nimport type { LayoutChangeHandler } from \"@vuu-ui/vuu-layout\";\nimport {\n DraggableLayout,\n LayoutProvider,\n LayoutProviderProps,\n StackLayout,\n} from \"@vuu-ui/vuu-layout\";\nimport {\n ContextMenuProvider,\n DialogProvider,\n NotificationsProvider,\n} from \"@vuu-ui/vuu-popups\";\nimport {\n LayoutJSON,\n VuuUser,\n logger,\n registerComponent,\n} from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport {\n HTMLAttributes,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { AppHeader } from \"./app-header\";\nimport { ApplicationProvider } from \"./application-provider\";\nimport {\n LayoutManagementProvider,\n useLayoutContextMenuItems,\n useLayoutManager,\n} from \"./layout-management\";\nimport {\n IPersistenceManager,\n LocalPersistenceManager,\n PersistenceProvider,\n usePersistenceManager,\n} from \"./persistence-manager\";\nimport { SidePanelProps, useShellLayout } from \"./shell-layouts\";\nimport { UserSettingsPanel } from \"./user-settings\";\n\nimport shellCss from \"./shell.css\";\nimport { loadingApplicationJson } from \"./layout-management/defaultApplicationJson\";\n\nregisterComponent(\"ApplicationSettings\", UserSettingsPanel, \"view\");\n\nif (process.env.NODE_ENV === \"production\") {\n // StackLayout is loaded just to force component registration, we know it will be\n // required when default layout is instantiated. This is only required in prod\n // to avoif tree shaking the Stack away. Causes a runtime issue in dev.\n if (typeof StackLayout !== \"function\") {\n console.warn(\n \"StackLayout module not loaded, will be unsbale to deserialize from layout JSON\"\n );\n }\n}\n\nconst { error } = logger(\"Shell\");\n\nconst defaultLeftSidePanel: ShellProps[\"LeftSidePanelProps\"] = {};\n\nexport type LayoutTemplateName = \"full-height\" | \"inlay\";\n\nexport interface ShellProps extends HTMLAttributes<HTMLDivElement> {\n LayoutProps?: Pick<\n LayoutProviderProps,\n \"createNewChild\" | \"pathToDropTarget\"\n >;\n LeftSidePanelProps?: SidePanelProps;\n children?: ReactNode;\n defaultLayout?: LayoutJSON;\n leftSidePanelLayout?: \"full-height\" | \"inlay\";\n loginUrl?: string;\n // paletteConfig: any;\n saveUrl?: string;\n serverUrl?: string;\n user: VuuUser;\n}\n\nconst VuuApplication = ({\n LayoutProps,\n LeftSidePanelProps = defaultLeftSidePanel,\n children,\n className: classNameProp,\n leftSidePanelLayout,\n loginUrl,\n saveUrl,\n serverUrl,\n user,\n ...htmlAttributes\n}: ShellProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-shell\",\n css: shellCss,\n window: targetWindow,\n });\n\n const rootRef = useRef<HTMLDivElement>(null);\n const { applicationJson, saveApplicationLayout } = useLayoutManager();\n const { buildMenuOptions, handleMenuAction } = useLayoutContextMenuItems();\n const [connectionStatus, setConnectionStatus] = useState<\n \"connected\" | \"rejected\"\n >(\"connected\");\n\n const handleLayoutChange = useCallback<LayoutChangeHandler>(\n (layout) => {\n try {\n saveApplicationLayout(layout);\n } catch {\n error?.(\"Failed to save layout\");\n }\n },\n [saveApplicationLayout]\n );\n\n useMemo(async () => {\n if (serverUrl && user.token) {\n const connectionStatus = await connectToServer({\n authToken: user.token,\n url: serverUrl,\n username: user.username,\n });\n setConnectionStatus(connectionStatus);\n }\n }, [serverUrl, user.token, user.username]);\n\n const className = cx(\"vuuShell\");\n\n const isLayoutLoading = applicationJson === loadingApplicationJson;\n\n const shellLayout = useShellLayout({\n LeftSidePanelProps,\n leftSidePanelLayout,\n appHeader: <AppHeader loginUrl={loginUrl} />,\n });\n\n if (connectionStatus === \"rejected\") {\n console.log(\"game over, no connection to server\");\n }\n\n return isLayoutLoading ? null : (\n <ContextMenuProvider\n menuActionHandler={handleMenuAction}\n menuBuilder={buildMenuOptions}\n >\n <LayoutProvider\n {...LayoutProps}\n layout={applicationJson.layout}\n onLayoutChange={handleLayoutChange}\n >\n <DraggableLayout\n className={className}\n ref={rootRef}\n {...htmlAttributes}\n >\n {shellLayout}\n </DraggableLayout>\n </LayoutProvider>\n {children}\n </ContextMenuProvider>\n );\n};\n\nexport const Shell = ({ defaultLayout, user, ...props }: ShellProps) => {\n // If user has provided an implementation of IPersistenceManager\n // by wrapping higher level PersistenceProvider, use it, otw\n // default to LocalPersistenceManager\n const persistenceManager = usePersistenceManager();\n const localPersistenceManager = useMemo<\n IPersistenceManager | undefined\n >(() => {\n if (persistenceManager) {\n return undefined;\n }\n console.log(\n `No Persistence Manager is configured, configuration data will be persisted to Local Storage, under the key 'vuu/${user.username}'`\n );\n return new LocalPersistenceManager(`vuu/${user.username}`);\n }, [persistenceManager, user.username]);\n\n // ApplicationProvider must go outside Dialog and Notification providers\n // ApplicationProvider injects the SaltProvider and this must be the root\n // SaltProvider.\n\n const shellProviders = (\n <ApplicationProvider density=\"high\" theme=\"vuu-theme\" user={user}>\n <LayoutManagementProvider defaultLayout={defaultLayout}>\n <DialogProvider>\n <NotificationsProvider>\n <VuuApplication {...props} user={user} />\n </NotificationsProvider>\n </DialogProvider>\n </LayoutManagementProvider>\n </ApplicationProvider>\n );\n\n if (persistenceManager) {\n return shellProviders;\n } else {\n return (\n <PersistenceProvider persistenceManager={localPersistenceManager}>\n {shellProviders}\n </PersistenceProvider>\n );\n }\n};\n"],"names":["connectionStatus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,iBAAkB,CAAA,qBAAA,EAAuB,mBAAmB,MAAM,CAAA,CAAA;AAElE,IAAI,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,YAAc,EAAA;AAIzC,EAAI,IAAA,OAAO,gBAAgB,UAAY,EAAA;AACrC,IAAQ,OAAA,CAAA,IAAA;AAAA,MACN,gFAAA;AAAA,KACF,CAAA;AAAA,GACF;AACF,CAAA;AAEA,MAAM,EAAE,KAAA,EAAU,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAEhC,MAAM,uBAAyD,EAAC,CAAA;AAoBhE,MAAM,iBAAiB,CAAC;AA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AA,CAAA;AACjD,EAAM,MAAA,uBAAA,GAA0B,QAE9B,MAAM;AACN,IAAA,IAAI,kBAAoB,EAAA;AACtB,MAAO,OAAA,KAAA,CAAA,CAAA;AAAA,KACT;AACA,IAAQ,OAAA,CAAA,GAAA;AAAA,MACN,CAAA,gHAAA,EAAmH,KAAK,QAAQ,CAAA,CAAA,CAAA;AAAA,KAClI,CAAA;AACA,IAAA,OAAO,IAAI,uBAAA,CAAwB,CAAO,IAAA,EAAA,IAAA,CAAK,QAAQ,CAAE,CAAA,CAAA,CAAA;AAAA,GACxD,EAAA,CAAC,kBAAoB,EAAA,IAAA,CAAK,QAAQ,CAAC,CAAA,CAAA;AAMtC,EAAM,MAAA,cAAA,uBACH,mBAAoB,EAAA,EAAA,OAAA,EAAQ,QAAO,KAAM,EAAA,WAAA,EAAY,IACpD,EAAA,QAAA,kBAAA,GAAA,CAAC,wBAAyB,EAAA,EAAA,aAAA,EACxB,8BAAC,cACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,qBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,cAAgB,EAAA,EAAA,GAAG,OAAO,IAAY,EAAA,CAAA,EACzC,CACF,EAAA,CAAA,EACF,CACF,EAAA,CAAA,CAAA;AAGF,EAAA,IAAI,kBAAoB,EAAA;AACtB,IAAO,OAAA,cAAA,CAAA;AAAA,GACF,MAAA;AACL,IAAA,uBACG,GAAA,CAAA,mBAAA,EAAA,EAAoB,kBAAoB,EAAA,uBAAA,EACtC,QACH,EAAA,cAAA,EAAA,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
1
+ {"version":3,"file":"shell.js","sources":["../src/shell.tsx"],"sourcesContent":["import { connectToServer } from \"@vuu-ui/vuu-data-remote\";\nimport type { LayoutChangeHandler } from \"@vuu-ui/vuu-layout\";\nimport { LayoutProvider, StackLayout } from \"@vuu-ui/vuu-layout\";\nimport {\n ContextMenuProvider,\n DialogProvider,\n NotificationsProvider,\n} from \"@vuu-ui/vuu-popups\";\nimport { VuuUser, logger, registerComponent } from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport {\n HTMLAttributes,\n ReactNode,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\nimport { AppHeader } from \"./app-header\";\nimport { ApplicationProvider } from \"./application-provider\";\nimport {\n LayoutManagementProvider,\n LayoutManagementProviderProps,\n useLayoutContextMenuItems,\n useLayoutManager,\n} from \"./layout-management\";\nimport { loadingJSON } from \"./layout-management/defaultWorkspaceJSON\";\nimport {\n IPersistenceManager,\n LocalPersistenceManager,\n PersistenceProvider,\n usePersistenceManager,\n} from \"./persistence-manager\";\nimport { ShellLayoutProps, useShellLayout } from \"./shell-layout-templates\";\nimport { UserSettingsPanel } from \"./user-settings\";\n\nimport shellCss from \"./shell.css\";\n\nregisterComponent(\"ApplicationSettings\", UserSettingsPanel, \"view\");\n\nif (process.env.NODE_ENV === \"production\") {\n // StackLayout is loaded just to force component registration, we know it will be\n // required when default layout is instantiated. This is only required in prod\n // to avoif tree shaking the Stack away. Causes a runtime issue in dev.\n if (typeof StackLayout !== \"function\") {\n console.warn(\n \"StackLayout module not loaded, will be unsbale to deserialize from layout JSON\"\n );\n }\n}\n\nconst { error } = logger(\"Shell\");\n\nexport type LayoutTemplateName = \"full-height\" | \"inlay\";\n\nexport type ContentLayoutProps = Pick<\n LayoutManagementProviderProps,\n \"layoutJSON\" | \"workspaceJSON\" | \"WorkspaceProps\"\n>;\n\nexport interface ShellProps extends HTMLAttributes<HTMLDivElement> {\n ContentLayoutProps?: ContentLayoutProps;\n ShellLayoutProps?: ShellLayoutProps;\n children?: ReactNode;\n loginUrl?: string;\n saveUrl?: string;\n serverUrl?: string;\n user: VuuUser;\n}\n\nconst getAppHeader = (shellLayoutProps?: ShellLayoutProps, loginUrl?: string) =>\n shellLayoutProps?.appHeader ?? <AppHeader loginUrl={loginUrl} />;\n\nconst defaultHTMLAttributes: HTMLAttributes<HTMLDivElement> = {\n className: \"vuuShell\",\n style: {\n height: \"100%\",\n width: \"100%\",\n },\n};\n\nconst getHTMLAttributes = (props?: ShellLayoutProps) => {\n if (props?.htmlAttributes) {\n return {\n ...defaultHTMLAttributes,\n ...props.htmlAttributes,\n style: {\n ...defaultHTMLAttributes.style,\n ...props.htmlAttributes.style,\n },\n };\n } else {\n return defaultHTMLAttributes;\n }\n};\n\nconst VuuApplication = ({\n ShellLayoutProps,\n children,\n loginUrl,\n serverUrl,\n user,\n}: Omit<ShellProps, \"ContentLayoutProps\">) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-shell\",\n css: shellCss,\n window: targetWindow,\n });\n\n const shellLayout = useShellLayout({\n ...ShellLayoutProps,\n appHeader: getAppHeader(ShellLayoutProps, loginUrl),\n htmlAttributes: getHTMLAttributes(ShellLayoutProps),\n });\n\n const { workspaceJSON, saveApplicationLayout } = useLayoutManager();\n\n const { buildMenuOptions, handleMenuAction } = useLayoutContextMenuItems();\n const [connectionStatus, setConnectionStatus] = useState<\n \"initialising\" | \"connected\" | \"rejected\"\n >(\"initialising\");\n\n const handleLayoutChange = useCallback<LayoutChangeHandler>(\n (layout) => {\n try {\n saveApplicationLayout(layout);\n } catch {\n error?.(\"Failed to save layout\");\n }\n },\n [saveApplicationLayout]\n );\n\n useMemo(async () => {\n if (serverUrl && user.token) {\n const connectionStatus = await connectToServer({\n authToken: user.token,\n url: serverUrl,\n username: user.username,\n });\n setConnectionStatus(connectionStatus);\n } else {\n console.warn(\n `Shell: serverUrl: '${serverUrl}', token: '${Array(user.token.length)\n .fill(\"#\")\n .join(\"\")}' \n `\n );\n }\n }, [serverUrl, user.token, user.username]);\n\n const isLayoutLoading = workspaceJSON === loadingJSON;\n\n if (connectionStatus === \"rejected\") {\n console.log(\"game over, no connection to server\");\n }\n\n return isLayoutLoading ? null : (\n <ContextMenuProvider\n menuActionHandler={handleMenuAction}\n menuBuilder={buildMenuOptions}\n >\n <LayoutProvider\n workspaceJSON={workspaceJSON}\n onLayoutChange={handleLayoutChange}\n >\n {shellLayout}\n </LayoutProvider>\n {children}\n </ContextMenuProvider>\n );\n};\n\nexport const Shell = ({ ContentLayoutProps, user, ...props }: ShellProps) => {\n // If user has provided an implementation of IPersistenceManager\n // by wrapping higher level PersistenceProvider, use it, otw\n // default to LocalPersistenceManager\n const persistenceManager = usePersistenceManager();\n const localPersistenceManager = useMemo<\n IPersistenceManager | undefined\n >(() => {\n if (persistenceManager) {\n return undefined;\n }\n console.log(\n `No Persistence Manager, configuration data will be persisted to Local Storage, key: 'vuu/${user.username}'`\n );\n return new LocalPersistenceManager(`vuu/${user.username}`);\n }, [persistenceManager, user.username]);\n\n // ApplicationProvider must go outside Dialog and Notification providers\n // ApplicationProvider injects the SaltProvider and this must be the root\n // SaltProvider.\n\n const shellProviders = (\n <ApplicationProvider density=\"high\" theme=\"vuu-theme\" user={user}>\n <LayoutManagementProvider {...ContentLayoutProps}>\n <DialogProvider>\n <NotificationsProvider>\n <VuuApplication {...props} user={user} />\n </NotificationsProvider>\n </DialogProvider>\n </LayoutManagementProvider>\n </ApplicationProvider>\n );\n\n if (persistenceManager) {\n return shellProviders;\n } else {\n return (\n <PersistenceProvider persistenceManager={localPersistenceManager}>\n {shellProviders}\n </PersistenceProvider>\n );\n }\n};\n"],"names":["ShellLayoutProps","connectionStatus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAsCA,iBAAkB,CAAA,qBAAA,EAAuB,mBAAmB,MAAM,CAAA,CAAA;AAElE,IAAI,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,YAAc,EAAA;AAIzC,EAAI,IAAA,OAAO,gBAAgB,UAAY,EAAA;AACrC,IAAQ,OAAA,CAAA,IAAA;AAAA,MACN,gFAAA;AAAA,KACF,CAAA;AAAA,GACF;AACF,CAAA;AAEA,MAAM,EAAE,KAAA,EAAU,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAmBhC,MAAM,YAAA,GA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AAgB,EAAA,EAAA,GAAG,OAAO,IAAY,EAAA,CAAA,EACzC,CACF,EAAA,CAAA,EACF,CACF,EAAA,CAAA,CAAA;AAGF,EAAA,IAAI,kBAAoB,EAAA;AACtB,IAAO,OAAA,cAAA,CAAA;AAAA,GACF,MAAA;AACL,IAAA,uBACG,GAAA,CAAA,mBAAA,EAAA,EAAoB,kBAAoB,EAAA,uBAAA,EACtC,QACH,EAAA,cAAA,EAAA,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
- "version": "0.8.74",
2
+ "version": "0.8.76",
3
3
  "description": "VUU UI Shell",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-data-types": "0.8.74",
8
- "@vuu-ui/vuu-protocol-types": "0.8.74",
9
- "@vuu-ui/vuu-table-types": "0.8.74"
7
+ "@vuu-ui/vuu-data-types": "0.8.76",
8
+ "@vuu-ui/vuu-protocol-types": "0.8.76",
9
+ "@vuu-ui/vuu-table-types": "0.8.76"
10
10
  },
11
11
  "dependencies": {
12
12
  "@salt-ds/core": "1.27.1",
13
13
  "@salt-ds/styles": "0.2.1",
14
14
  "@salt-ds/window": "0.1.1",
15
- "@vuu-ui/vuu-data-remote": "0.8.74",
16
- "@vuu-ui/vuu-icons": "0.8.74",
17
- "@vuu-ui/vuu-layout": "0.8.74",
18
- "@vuu-ui/vuu-popups": "0.8.74",
19
- "@vuu-ui/vuu-table": "0.8.74",
20
- "@vuu-ui/vuu-ui-controls": "0.8.74",
21
- "@vuu-ui/vuu-utils": "0.8.74",
15
+ "@vuu-ui/vuu-data-remote": "0.8.76",
16
+ "@vuu-ui/vuu-icons": "0.8.76",
17
+ "@vuu-ui/vuu-layout": "0.8.76",
18
+ "@vuu-ui/vuu-popups": "0.8.76",
19
+ "@vuu-ui/vuu-table": "0.8.76",
20
+ "@vuu-ui/vuu-ui-controls": "0.8.76",
21
+ "@vuu-ui/vuu-utils": "0.8.76",
22
22
  "html-to-image": "^1.11.11"
23
23
  },
24
24
  "peerDependencies": {
@@ -0,0 +1,6 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ export interface ComponentProps extends HTMLAttributes<HTMLDivElement> {
3
+ resizeable?: boolean;
4
+ }
5
+ declare const Component: React.FunctionComponent<ComponentProps>;
6
+ export default Component;
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface LayoutContainerProps extends HTMLAttributes<HTMLDivElement> {
3
+ dropTarget?: boolean;
4
+ resizeable?: boolean;
5
+ }
6
+ export declare const LayoutContainer: import("react").ForwardRefExoticComponent<LayoutContainerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ import { HTMLAttributes } from "react";
2
+ export type DockLayoutProps = HTMLAttributes<HTMLDivElement>;
3
+ declare const DockLayout: {
4
+ (props: DockLayoutProps): JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export default DockLayout;
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
3
+ clickToOpen?: boolean;
4
+ defaultOpen?: boolean;
5
+ inline?: boolean;
6
+ open?: boolean;
7
+ peekaboo?: boolean;
8
+ position?: "left" | "right" | "top" | "bottom";
9
+ sizeOpen?: number;
10
+ sizeClosed?: number;
11
+ toggleButton?: "start" | "end";
12
+ }
13
+ declare const Drawer: {
14
+ ({ children, className: classNameProp, clickToOpen, defaultOpen, sizeOpen, sizeClosed, style: styleProp, open: openProp, position, inline, onClick, peekaboo, toggleButton, ...props }: DrawerProps): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export default Drawer;
@@ -0,0 +1,2 @@
1
+ export { default as DockLayout } from "./DockLayout";
2
+ export { default as Drawer } from "./Drawer";