@vuu-ui/vuu-shell 2.1.19-beta.2 → 2.1.19-beta.4

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 (254) hide show
  1. package/cjs/ShellContextProvider.js +25 -0
  2. package/cjs/ShellContextProvider.js.map +1 -0
  3. package/cjs/app-header/AppHeader.css.js +6 -0
  4. package/cjs/app-header/AppHeader.css.js.map +1 -0
  5. package/cjs/app-header/AppHeader.js +118 -0
  6. package/cjs/app-header/AppHeader.js.map +1 -0
  7. package/cjs/application-provider/ApplicationContext.js +17 -0
  8. package/cjs/application-provider/ApplicationContext.js.map +1 -0
  9. package/cjs/application-provider/ApplicationProvider.js +102 -0
  10. package/cjs/application-provider/ApplicationProvider.js.map +1 -0
  11. package/cjs/feature/Feature.js +54 -0
  12. package/cjs/feature/Feature.js.map +1 -0
  13. package/cjs/feature/FeatureErrorBoundary.js +30 -0
  14. package/cjs/feature/FeatureErrorBoundary.js.map +1 -0
  15. package/cjs/feature-and-layout-provider/FeatureAndLayoutProvider.js +60 -0
  16. package/cjs/feature-and-layout-provider/FeatureAndLayoutProvider.js.map +1 -0
  17. package/cjs/feature-list/FeatureList.css.js +6 -0
  18. package/cjs/feature-list/FeatureList.css.js.map +1 -0
  19. package/cjs/feature-list/FeatureList.js +109 -0
  20. package/cjs/feature-list/FeatureList.js.map +1 -0
  21. package/cjs/index.js +71 -0
  22. package/cjs/index.js.map +1 -0
  23. package/cjs/left-nav/LeftNav.css.js +6 -0
  24. package/cjs/left-nav/LeftNav.css.js.map +1 -0
  25. package/cjs/left-nav/LeftNav.js +202 -0
  26. package/cjs/left-nav/LeftNav.js.map +1 -0
  27. package/cjs/login/LoginPanel.css.js +6 -0
  28. package/cjs/login/LoginPanel.css.js.map +1 -0
  29. package/cjs/login/LoginPanel.js +110 -0
  30. package/cjs/login/LoginPanel.js.map +1 -0
  31. package/cjs/login/VuuLogo.js +134 -0
  32. package/cjs/login/VuuLogo.js.map +1 -0
  33. package/cjs/persistence-manager/LocalPersistenceManager.js +193 -0
  34. package/cjs/persistence-manager/LocalPersistenceManager.js.map +1 -0
  35. package/cjs/persistence-manager/PersistenceProvider.js +21 -0
  36. package/cjs/persistence-manager/PersistenceProvider.js.map +1 -0
  37. package/cjs/persistence-manager/RemotePersistenceManager.js +165 -0
  38. package/cjs/persistence-manager/RemotePersistenceManager.js.map +1 -0
  39. package/cjs/persistence-manager/StaticPersistenceManager.js +73 -0
  40. package/cjs/persistence-manager/StaticPersistenceManager.js.map +1 -0
  41. package/cjs/shell-layout-templates/context-panel/ContextPanel.css.js +6 -0
  42. package/cjs/shell-layout-templates/context-panel/ContextPanel.css.js.map +1 -0
  43. package/cjs/shell-layout-templates/context-panel/ContextPanel.js +100 -0
  44. package/cjs/shell-layout-templates/context-panel/ContextPanel.js.map +1 -0
  45. package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +51 -0
  46. package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +1 -0
  47. package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +83 -0
  48. package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +1 -0
  49. package/cjs/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +46 -0
  50. package/cjs/shell-layout-templates/left-main-tabs/useLeftMainTabs.js.map +1 -0
  51. package/cjs/shell-layout-templates/side-panel/SidePanel.css.js +6 -0
  52. package/cjs/shell-layout-templates/side-panel/SidePanel.css.js.map +1 -0
  53. package/cjs/shell-layout-templates/side-panel/SidePanel.js +36 -0
  54. package/cjs/shell-layout-templates/side-panel/SidePanel.js.map +1 -0
  55. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +48 -0
  56. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +1 -0
  57. package/cjs/shell-layout-templates/useShellLayout.js +23 -0
  58. package/cjs/shell-layout-templates/useShellLayout.js.map +1 -0
  59. package/cjs/shell.css.js +6 -0
  60. package/cjs/shell.css.js.map +1 -0
  61. package/cjs/shell.js +137 -0
  62. package/cjs/shell.js.map +1 -0
  63. package/cjs/theme-switch/ThemeSwitch.css.js +6 -0
  64. package/cjs/theme-switch/ThemeSwitch.css.js.map +1 -0
  65. package/cjs/theme-switch/ThemeSwitch.js +56 -0
  66. package/cjs/theme-switch/ThemeSwitch.js.map +1 -0
  67. package/cjs/user-settings/SettingsForm.css.js +6 -0
  68. package/cjs/user-settings/SettingsForm.css.js.map +1 -0
  69. package/cjs/user-settings/SettingsForm.js +168 -0
  70. package/cjs/user-settings/SettingsForm.js.map +1 -0
  71. package/cjs/user-settings/UserSettingsPanel.css.js +6 -0
  72. package/cjs/user-settings/UserSettingsPanel.css.js.map +1 -0
  73. package/cjs/user-settings/UserSettingsPanel.js +42 -0
  74. package/cjs/user-settings/UserSettingsPanel.js.map +1 -0
  75. package/cjs/workspace-management/LayoutList.css.js +6 -0
  76. package/cjs/workspace-management/LayoutList.css.js.map +1 -0
  77. package/cjs/workspace-management/LayoutList.js +116 -0
  78. package/cjs/workspace-management/LayoutList.js.map +1 -0
  79. package/cjs/workspace-management/LayoutTile.css.js +6 -0
  80. package/cjs/workspace-management/LayoutTile.css.js.map +1 -0
  81. package/cjs/workspace-management/LayoutTile.js +41 -0
  82. package/cjs/workspace-management/LayoutTile.js.map +1 -0
  83. package/cjs/workspace-management/SaveLayoutPanel.css.js +6 -0
  84. package/cjs/workspace-management/SaveLayoutPanel.css.js.map +1 -0
  85. package/cjs/workspace-management/SaveLayoutPanel.js +128 -0
  86. package/cjs/workspace-management/SaveLayoutPanel.js.map +1 -0
  87. package/cjs/workspace-management/WorkspaceProvider.js +265 -0
  88. package/cjs/workspace-management/WorkspaceProvider.js.map +1 -0
  89. package/cjs/workspace-management/defaultWorkspaceJSON.js +101 -0
  90. package/cjs/workspace-management/defaultWorkspaceJSON.js.map +1 -0
  91. package/cjs/workspace-management/screenshot-utils.js +25 -0
  92. package/cjs/workspace-management/screenshot-utils.js.map +1 -0
  93. package/cjs/workspace-management/useWorkspaceContextMenuItems.js +72 -0
  94. package/cjs/workspace-management/useWorkspaceContextMenuItems.js.map +1 -0
  95. package/esm/ShellContextProvider.js +23 -0
  96. package/esm/ShellContextProvider.js.map +1 -0
  97. package/esm/app-header/AppHeader.css.js +4 -0
  98. package/esm/app-header/AppHeader.css.js.map +1 -0
  99. package/esm/app-header/AppHeader.js +116 -0
  100. package/esm/app-header/AppHeader.js.map +1 -0
  101. package/esm/application-provider/ApplicationContext.js +15 -0
  102. package/esm/application-provider/ApplicationContext.js.map +1 -0
  103. package/esm/application-provider/ApplicationProvider.js +96 -0
  104. package/esm/application-provider/ApplicationProvider.js.map +1 -0
  105. package/esm/feature/Feature.js +52 -0
  106. package/esm/feature/Feature.js.map +1 -0
  107. package/esm/feature/FeatureErrorBoundary.js +28 -0
  108. package/esm/feature/FeatureErrorBoundary.js.map +1 -0
  109. package/esm/feature-and-layout-provider/FeatureAndLayoutProvider.js +56 -0
  110. package/esm/feature-and-layout-provider/FeatureAndLayoutProvider.js.map +1 -0
  111. package/esm/feature-list/FeatureList.css.js +4 -0
  112. package/esm/feature-list/FeatureList.css.js.map +1 -0
  113. package/esm/feature-list/FeatureList.js +107 -0
  114. package/esm/feature-list/FeatureList.js.map +1 -0
  115. package/esm/index.js +25 -0
  116. package/esm/index.js.map +1 -0
  117. package/esm/left-nav/LeftNav.css.js +4 -0
  118. package/esm/left-nav/LeftNav.css.js.map +1 -0
  119. package/esm/left-nav/LeftNav.js +200 -0
  120. package/esm/left-nav/LeftNav.js.map +1 -0
  121. package/esm/login/LoginPanel.css.js +4 -0
  122. package/esm/login/LoginPanel.css.js.map +1 -0
  123. package/esm/login/LoginPanel.js +108 -0
  124. package/esm/login/LoginPanel.js.map +1 -0
  125. package/esm/login/VuuLogo.js +132 -0
  126. package/esm/login/VuuLogo.js.map +1 -0
  127. package/esm/persistence-manager/LocalPersistenceManager.js +191 -0
  128. package/esm/persistence-manager/LocalPersistenceManager.js.map +1 -0
  129. package/esm/persistence-manager/PersistenceProvider.js +17 -0
  130. package/esm/persistence-manager/PersistenceProvider.js.map +1 -0
  131. package/esm/persistence-manager/RemotePersistenceManager.js +163 -0
  132. package/esm/persistence-manager/RemotePersistenceManager.js.map +1 -0
  133. package/esm/persistence-manager/StaticPersistenceManager.js +71 -0
  134. package/esm/persistence-manager/StaticPersistenceManager.js.map +1 -0
  135. package/esm/shell-layout-templates/context-panel/ContextPanel.css.js +4 -0
  136. package/esm/shell-layout-templates/context-panel/ContextPanel.css.js.map +1 -0
  137. package/esm/shell-layout-templates/context-panel/ContextPanel.js +98 -0
  138. package/esm/shell-layout-templates/context-panel/ContextPanel.js.map +1 -0
  139. package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +49 -0
  140. package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +1 -0
  141. package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +81 -0
  142. package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +1 -0
  143. package/esm/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +44 -0
  144. package/esm/shell-layout-templates/left-main-tabs/useLeftMainTabs.js.map +1 -0
  145. package/esm/shell-layout-templates/side-panel/SidePanel.css.js +4 -0
  146. package/esm/shell-layout-templates/side-panel/SidePanel.css.js.map +1 -0
  147. package/esm/shell-layout-templates/side-panel/SidePanel.js +34 -0
  148. package/esm/shell-layout-templates/side-panel/SidePanel.js.map +1 -0
  149. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +46 -0
  150. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +1 -0
  151. package/esm/shell-layout-templates/useShellLayout.js +21 -0
  152. package/esm/shell-layout-templates/useShellLayout.js.map +1 -0
  153. package/esm/shell.css.js +4 -0
  154. package/esm/shell.css.js.map +1 -0
  155. package/esm/shell.js +135 -0
  156. package/esm/shell.js.map +1 -0
  157. package/esm/theme-switch/ThemeSwitch.css.js +4 -0
  158. package/esm/theme-switch/ThemeSwitch.css.js.map +1 -0
  159. package/esm/theme-switch/ThemeSwitch.js +54 -0
  160. package/esm/theme-switch/ThemeSwitch.js.map +1 -0
  161. package/esm/user-settings/SettingsForm.css.js +4 -0
  162. package/esm/user-settings/SettingsForm.css.js.map +1 -0
  163. package/esm/user-settings/SettingsForm.js +162 -0
  164. package/esm/user-settings/SettingsForm.js.map +1 -0
  165. package/esm/user-settings/UserSettingsPanel.css.js +4 -0
  166. package/esm/user-settings/UserSettingsPanel.css.js.map +1 -0
  167. package/esm/user-settings/UserSettingsPanel.js +40 -0
  168. package/esm/user-settings/UserSettingsPanel.js.map +1 -0
  169. package/esm/workspace-management/LayoutList.css.js +4 -0
  170. package/esm/workspace-management/LayoutList.css.js.map +1 -0
  171. package/esm/workspace-management/LayoutList.js +114 -0
  172. package/esm/workspace-management/LayoutList.js.map +1 -0
  173. package/esm/workspace-management/LayoutTile.css.js +4 -0
  174. package/esm/workspace-management/LayoutTile.css.js.map +1 -0
  175. package/esm/workspace-management/LayoutTile.js +39 -0
  176. package/esm/workspace-management/LayoutTile.js.map +1 -0
  177. package/esm/workspace-management/SaveLayoutPanel.css.js +4 -0
  178. package/esm/workspace-management/SaveLayoutPanel.css.js.map +1 -0
  179. package/esm/workspace-management/SaveLayoutPanel.js +126 -0
  180. package/esm/workspace-management/SaveLayoutPanel.js.map +1 -0
  181. package/esm/workspace-management/WorkspaceProvider.js +262 -0
  182. package/esm/workspace-management/WorkspaceProvider.js.map +1 -0
  183. package/esm/workspace-management/defaultWorkspaceJSON.js +95 -0
  184. package/esm/workspace-management/defaultWorkspaceJSON.js.map +1 -0
  185. package/esm/workspace-management/screenshot-utils.js +23 -0
  186. package/esm/workspace-management/screenshot-utils.js.map +1 -0
  187. package/esm/workspace-management/useWorkspaceContextMenuItems.js +70 -0
  188. package/esm/workspace-management/useWorkspaceContextMenuItems.js.map +1 -0
  189. package/package.json +20 -17
  190. package/types/feature/FeatureErrorBoundary.d.ts +1 -1
  191. package/types/workspace-management/WorkspaceProvider.d.ts +5 -5
  192. package/src/ShellContextProvider.js +0 -20
  193. package/src/app-header/AppHeader.css.js +0 -21
  194. package/src/app-header/AppHeader.js +0 -97
  195. package/src/app-header/index.js +0 -1
  196. package/src/application-provider/ApplicationContext.js +0 -9
  197. package/src/application-provider/ApplicationProvider.js +0 -77
  198. package/src/application-provider/index.js +0 -1
  199. package/src/feature/Feature.js +0 -37
  200. package/src/feature/FeatureErrorBoundary.js +0 -33
  201. package/src/feature/Loader.js +0 -5
  202. package/src/feature/index.js +0 -1
  203. package/src/feature-and-layout-provider/FeatureAndLayoutProvider.js +0 -42
  204. package/src/feature-and-layout-provider/index.js +0 -1
  205. package/src/feature-list/FeatureList.css.js +0 -62
  206. package/src/feature-list/FeatureList.js +0 -128
  207. package/src/feature-list/index.js +0 -1
  208. package/src/get-layout-history.js +0 -7
  209. package/src/index.js +0 -14
  210. package/src/left-nav/LeftNav.css.js +0 -177
  211. package/src/left-nav/LeftNav.js +0 -193
  212. package/src/left-nav/index.js +0 -1
  213. package/src/login/LoginPanel.css.js +0 -72
  214. package/src/login/LoginPanel.js +0 -124
  215. package/src/login/VuuLogo.js +0 -108
  216. package/src/persistence-manager/LocalPersistenceManager.js +0 -156
  217. package/src/persistence-manager/PersistenceManager.js +0 -0
  218. package/src/persistence-manager/PersistenceProvider.js +0 -14
  219. package/src/persistence-manager/RemotePersistenceManager.js +0 -123
  220. package/src/persistence-manager/StaticPersistenceManager.js +0 -53
  221. package/src/persistence-manager/index.js +0 -5
  222. package/src/shell-layout-templates/context-panel/ContextPanel.css.js +0 -66
  223. package/src/shell-layout-templates/context-panel/ContextPanel.js +0 -92
  224. package/src/shell-layout-templates/context-panel/index.js +0 -1
  225. package/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +0 -44
  226. package/src/shell-layout-templates/index.js +0 -3
  227. package/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +0 -68
  228. package/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +0 -32
  229. package/src/shell-layout-templates/side-panel/SidePanel.css.js +0 -9
  230. package/src/shell-layout-templates/side-panel/SidePanel.js +0 -31
  231. package/src/shell-layout-templates/side-panel/index.js +0 -1
  232. package/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +0 -38
  233. package/src/shell-layout-templates/useShellLayout.js +0 -15
  234. package/src/shell.css.js +0 -59
  235. package/src/shell.js +0 -108
  236. package/src/theme-switch/ThemeSwitch.css.js +0 -34
  237. package/src/theme-switch/ThemeSwitch.js +0 -50
  238. package/src/theme-switch/index.js +0 -1
  239. package/src/user-settings/SettingsForm.css.js +0 -10
  240. package/src/user-settings/SettingsForm.js +0 -141
  241. package/src/user-settings/UserSettingsPanel.css.js +0 -9
  242. package/src/user-settings/UserSettingsPanel.js +0 -29
  243. package/src/user-settings/index.js +0 -2
  244. package/src/workspace-management/LayoutList.css.js +0 -74
  245. package/src/workspace-management/LayoutList.js +0 -130
  246. package/src/workspace-management/LayoutTile.css.js +0 -31
  247. package/src/workspace-management/LayoutTile.js +0 -41
  248. package/src/workspace-management/SaveLayoutPanel.css.js +0 -123
  249. package/src/workspace-management/SaveLayoutPanel.js +0 -141
  250. package/src/workspace-management/WorkspaceProvider.js +0 -209
  251. package/src/workspace-management/defaultWorkspaceJSON.js +0 -88
  252. package/src/workspace-management/index.js +0 -5
  253. package/src/workspace-management/screenshot-utils.js +0 -13
  254. package/src/workspace-management/useWorkspaceContextMenuItems.js +0 -58
@@ -1,74 +0,0 @@
1
- const css = `
2
- .vuuLayoutList {
3
- --vuuMeasuredContainer-flex: 1 1 1px;
4
- --vuuList-borderStyle: none;
5
- --vuuListItem-separator-color: transparent;
6
- background: var(--vuuLayoutList-background, var(--salt-container-primary-background));
7
- height: 100%;
8
- padding: 0 var(--vuuLayoutList-padding, 0);
9
- flex-direction: column;
10
- display: flex;
11
-
12
- & .vuuListItem {
13
- border-bottom: none;
14
- justify-content: space-between;
15
- }
16
- }
17
-
18
- .vuuLayoutList-header {
19
- flex: 0 0 48px;
20
- align-items: center;
21
- font-weight: 700;
22
- line-height: 2;
23
- display: flex;
24
- }
25
-
26
- .vuuLayoutList-content {
27
- flex-direction: column;
28
- flex: auto;
29
- font-size: 12px;
30
- font-weight: 700;
31
- display: flex;
32
- overflow: auto;
33
- }
34
-
35
- .vuuLayoutList-group {
36
- --vuuMeasuredContainer-flex: 0 0 auto;
37
- flex-direction: column;
38
- display: flex;
39
-
40
- & .vuuLayoutList-groupHeader {
41
- flex: 0 0 32px;
42
- padding: 8px 0;
43
- }
44
-
45
- & .vuuPalette {
46
- flex: auto;
47
- height: auto;
48
- }
49
- }
50
-
51
- .vuuLayoutList-group:first-child {
52
- margin-top: 12px;
53
- }
54
-
55
- .vuuLayoutList-group + .vuuLayoutList-group {
56
- margin-top: 24px;
57
- }
58
-
59
- .vuuLayoutList-screenshot {
60
- border: 1px solid #d6d7da;
61
- width: 60px;
62
- height: 45.6px;
63
- }
64
-
65
- .vuuLayoutList-layoutDetails {
66
- color: var(--light-text-secondary, #606477);
67
- font-size: 10px;
68
- font-weight: 600;
69
- line-height: 150%;
70
- }
71
-
72
-
73
- `;
74
- export default css;
@@ -1,130 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { createElement, useCallback, useMemo } from "react";
3
- import { IconButton } from "@vuu-ui/vuu-ui-controls";
4
- import { ListBox, Option } from "@salt-ds/core";
5
- import { VuuShellLocation } from "@vuu-ui/vuu-utils";
6
- import { useComponentCssInjection } from "@salt-ds/styles";
7
- import { useWindow } from "@salt-ds/window";
8
- import clsx from "clsx";
9
- import { LayoutTile } from "./LayoutTile.js";
10
- import { useWorkspace } from "./WorkspaceProvider.js";
11
- import { useLayouts } from "../feature-and-layout-provider/index.js";
12
- import { layoutFromJson, useLayoutProviderDispatch } from "@vuu-ui/vuu-layout";
13
- import LayoutList from "./LayoutList.css";
14
- const classBase = "vuuLayoutList";
15
- const NO_SELECTION = [];
16
- const LayoutList_LayoutList = ({ className, title, ...htmlAttributes })=>{
17
- const targetWindow = useWindow();
18
- useComponentCssInjection({
19
- testId: "vuu-layout-list",
20
- css: LayoutList,
21
- window: targetWindow
22
- });
23
- const { layoutMetadata, loadLayoutById } = useWorkspace();
24
- const { systemLayouts } = useLayouts();
25
- const handleLoadLayout = useCallback((layoutId)=>{
26
- if (layoutId) loadLayoutById(layoutId);
27
- }, [
28
- loadLayoutById
29
- ]);
30
- const dispatch = useLayoutProviderDispatch();
31
- const handleLoadSysLayout = (layoutId, layoutJSON)=>{
32
- if (layoutJSON) dispatch({
33
- type: "add",
34
- path: `#${VuuShellLocation.Workspace}`,
35
- component: layoutFromJson(layoutJSON, "0")
36
- });
37
- else throw Error("layoutJSON is required for system layouts");
38
- };
39
- const layoutsByGroup = layoutMetadata.reduce((acc, cur)=>{
40
- if (acc[cur.group]) return {
41
- ...acc,
42
- [cur.group]: [
43
- ...acc[cur.group],
44
- cur
45
- ]
46
- };
47
- return {
48
- ...acc,
49
- [cur.group]: [
50
- cur
51
- ]
52
- };
53
- }, {});
54
- let sysContent = [];
55
- if (systemLayouts) sysContent = [
56
- /*#__PURE__*/ jsxs("div", {
57
- className: `${classBase}-group`,
58
- children: [
59
- /*#__PURE__*/ jsx("div", {
60
- className: `${classBase}-groupHeader`,
61
- children: "System Layout"
62
- }),
63
- /*#__PURE__*/ jsx(ListBox, {
64
- selected: NO_SELECTION,
65
- children: systemLayouts.map((layout)=>/*#__PURE__*/ jsx(Option, {
66
- value: layout,
67
- children: /*#__PURE__*/ createElement(LayoutTile, {
68
- ...htmlAttributes,
69
- key: layout.id,
70
- metadata: layout,
71
- onLoadLayout: handleLoadSysLayout
72
- })
73
- }, layout.id))
74
- })
75
- ]
76
- }, 0)
77
- ];
78
- const content = useMemo(()=>Object.entries(layoutsByGroup).map(([heading, layoutMetadata], index)=>/*#__PURE__*/ jsxs("div", {
79
- className: `${classBase}-group`,
80
- children: [
81
- /*#__PURE__*/ jsx("div", {
82
- className: `${classBase}-groupHeader`,
83
- children: heading
84
- }),
85
- /*#__PURE__*/ jsx(ListBox, {
86
- selected: NO_SELECTION,
87
- children: layoutMetadata.map((layout)=>/*#__PURE__*/ jsxs(Option, {
88
- value: layout,
89
- children: [
90
- /*#__PURE__*/ createElement(LayoutTile, {
91
- ...htmlAttributes,
92
- key: layout.id,
93
- metadata: layout,
94
- onLoadLayout: handleLoadLayout
95
- }),
96
- /*#__PURE__*/ jsx(IconButton, {
97
- className: `${classBase}-menu`,
98
- "data-embedded": true,
99
- icon: "more-vert",
100
- appearance: "transparent",
101
- sentiment: "neutral"
102
- })
103
- ]
104
- }, layout.id))
105
- })
106
- ]
107
- }, index)), [
108
- handleLoadLayout,
109
- htmlAttributes,
110
- layoutsByGroup
111
- ]);
112
- return /*#__PURE__*/ jsxs("div", {
113
- ...htmlAttributes,
114
- className: clsx(classBase, "vuuScrollable"),
115
- children: [
116
- /*#__PURE__*/ jsx("div", {
117
- className: `${classBase}-header`,
118
- children: title
119
- }),
120
- /*#__PURE__*/ jsx("div", {
121
- className: `${classBase}-content`,
122
- children: [
123
- sysContent,
124
- ...content
125
- ]
126
- })
127
- ]
128
- });
129
- };
130
- export { LayoutList_LayoutList as LayoutList };
@@ -1,31 +0,0 @@
1
- const css = `
2
- .vuuLayoutTile-layoutTile {
3
- cursor: pointer;
4
- flex: auto;
5
- align-items: center;
6
- gap: 8px;
7
- padding: 8px 0;
8
- display: flex;
9
- }
10
-
11
- .vuuLayoutTile-layoutName {
12
- text-transform: uppercase;
13
- font-weight: 600;
14
- }
15
-
16
- .vuuLayoutTile-screenshot {
17
- border: 1px solid #d6d7da;
18
- width: 60px;
19
- height: 45.6px;
20
- }
21
-
22
- .vuuLayoutTile-layoutDetails {
23
- color: var(--salt-content-secondary-foreground);
24
- font-size: 10px;
25
- font-weight: 600;
26
- line-height: 150%;
27
- }
28
-
29
-
30
- `;
31
- export default css;
@@ -1,41 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { createElement } from "react";
3
- import { useComponentCssInjection } from "@salt-ds/styles";
4
- import { useWindow } from "@salt-ds/window";
5
- import LayoutTile from "./LayoutTile.css";
6
- const classBase = "vuuLayoutTile";
7
- const LayoutTile_LayoutTile = ({ metadata, onLoadLayout, ...htmlAttributes })=>{
8
- const targetWindow = useWindow();
9
- useComponentCssInjection({
10
- testId: "vuu-layout-tile",
11
- css: LayoutTile,
12
- window: targetWindow
13
- });
14
- return /*#__PURE__*/ createElement("div", {
15
- ...htmlAttributes,
16
- className: `${classBase}-layoutTile`,
17
- key: metadata?.id,
18
- onClick: ()=>onLoadLayout(metadata?.id, metadata.layoutJSON),
19
- children: [
20
- /*#__PURE__*/ jsx("img", {
21
- className: `${classBase}-screenshot`,
22
- src: metadata?.screenshot
23
- }),
24
- /*#__PURE__*/ jsxs("div", {
25
- children: [
26
- /*#__PURE__*/ jsx("div", {
27
- className: `${classBase}-layoutName`,
28
- children: metadata?.name
29
- }),
30
- /*#__PURE__*/ jsx("div", {
31
- className: `${classBase}-layoutDetails`,
32
- children: /*#__PURE__*/ jsx("div", {
33
- children: `${metadata?.created}`
34
- })
35
- })
36
- ]
37
- })
38
- ]
39
- });
40
- };
41
- export { LayoutTile_LayoutTile as LayoutTile };
@@ -1,123 +0,0 @@
1
- const css = `
2
- .vuuSaveLayoutPanel {
3
- --salt-selectable-foreground-hover: #6d18bdc3;
4
- --salt-selectable-foreground-selected: #6d18bd;
5
- --salt-selectable-borderColor-selected: #6d18bd;
6
- --saltInputLegacy-fontSize: 12px;
7
- --salt-text-label-fontSize: 10px;
8
- --saltFormFieldLegacy-label-paddingLeft: 0;
9
- --saltFormField-label-fontWeight: 400;
10
- --saltText-color: var(--text-secondary-foreground, #606477);
11
- flex-direction: column;
12
- align-items: flex-start;
13
- display: flex;
14
-
15
- & .saltFormField {
16
- border: solid 1px var(--salt-editable-borderColor);
17
- padding: var(--salt-spacing-50) var(--salt-spacing-200);
18
- }
19
-
20
- & .saltComboBox {
21
- & .saltPillInput-endAdornmentContainer {
22
- & .saltButton {
23
- border: none;
24
- width: 18px;
25
- transform: rotate(90deg);
26
- }
27
-
28
- & .saltButton:after {
29
- content: "";
30
- background-color: var(--salt-content-secondary-foreground);
31
- height: 20px;
32
- mask: var(--vuu-svg-triangle-right) center center/20px 20px;
33
- left: auto;
34
- top: var(--vuu-icon-top, auto);
35
- transform: var(--vuu-icon-transform, none);
36
- width: 20px;
37
- position: absolute;
38
- mask-repeat: no-repeat;
39
- }
40
- }
41
-
42
- & .saltPillInput-activationIndicator {
43
- display: none;
44
- }
45
- }
46
- }
47
-
48
- .spinner {
49
- background-image: var(--svg-spinner);
50
- width: 100px;
51
- height: 100px;
52
- }
53
-
54
- .vuuSaveLayoutPanel-panelContent {
55
- margin-top: var(--salt-spacing-200);
56
- gap: 32px;
57
- display: grid;
58
- }
59
-
60
- .vuuSaveLayoutPanel-inputText {
61
- color: var(--light-text-primary, #15171b);
62
- border: none;
63
- outline: none;
64
- width: 100%;
65
- padding-left: 4px;
66
- font-size: 12px;
67
- font-weight: 400;
68
- line-height: 16px;
69
- }
70
-
71
- .vuuSaveLayoutPanel-settingsGroup {
72
- flex-wrap: wrap;
73
- align-items: flex-end;
74
- gap: 10px;
75
- width: 100%;
76
- line-height: 16px;
77
- display: flex;
78
- }
79
-
80
- .vuuSaveLayoutPanel-screenshotContainer {
81
- background: var(--dark-text-primary, #fff);
82
- border: 1px solid #e8e8e8;
83
- justify-content: center;
84
- align-items: center;
85
- width: 304px;
86
- height: 208px;
87
- padding: 11px 15.5px;
88
- display: flex;
89
- }
90
-
91
- .vuuSaveLayoutPanel-screenshot {
92
- background: #d3d3d3 50% / cover no-repeat;
93
- width: 273px;
94
- height: 186px;
95
- }
96
-
97
- .vuuSaveLayoutPanel-buttonsContainer {
98
- justify-content: flex-end;
99
- align-self: stretch;
100
- align-items: flex-start;
101
- gap: 8px;
102
- padding-top: 24px;
103
- display: flex;
104
- }
105
-
106
- .vuuSaveLayoutPanel-cancelButton, .vuuSaveLayoutPanel-saveButton {
107
- letter-spacing: .48px;
108
- text-transform: uppercase;
109
- border-radius: 6px;
110
- align-items: flex-start;
111
- gap: 8px;
112
- height: fit-content;
113
- padding: 4px 8px;
114
- font-size: 12px;
115
- font-style: normal;
116
- font-weight: 700;
117
- line-height: 133.333%;
118
- display: flex;
119
- }
120
-
121
-
122
- `;
123
- export default css;
@@ -1,141 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Button, ComboBox, FormField, FormFieldLabel, Input, Option, Text } from "@salt-ds/core";
3
- import { useComponentCssInjection } from "@salt-ds/styles";
4
- import { useWindow } from "@salt-ds/window";
5
- import { useCallback, useEffect, useMemo, useState } from "react";
6
- import { takeScreenshot } from "./screenshot-utils.js";
7
- import SaveLayoutPanel from "./SaveLayoutPanel.css";
8
- import { useApplicationUser } from "../application-provider/index.js";
9
- const classBase = "vuuSaveLayoutPanel";
10
- const groups = [
11
- "Group 1",
12
- "Group 2",
13
- "Group 3",
14
- "Group 4",
15
- "Group 5"
16
- ];
17
- const SaveLayoutPanel_SaveLayoutPanel = (props)=>{
18
- const { defaultTitle = "", onCancel, onSave, componentId } = props;
19
- const targetWindow = useWindow();
20
- useComponentCssInjection({
21
- testId: "vuu-save-layout-panel",
22
- css: SaveLayoutPanel,
23
- window: targetWindow
24
- });
25
- const [layoutName, setLayoutName] = useState(defaultTitle);
26
- const [group, setGroup] = useState("");
27
- const [screenshot, setScreenshot] = useState();
28
- const [screenshotErrorMessage, setScreenshotErrorMessage] = useState();
29
- const { username } = useApplicationUser();
30
- useEffect(()=>{
31
- if (componentId) takeScreenshot(document.getElementById(componentId)).then((screenshot)=>{
32
- setScreenshot(screenshot);
33
- }).catch((error)=>{
34
- setScreenshotErrorMessage(error.message);
35
- });
36
- }, [
37
- componentId
38
- ]);
39
- const handleSubmit = ()=>{
40
- onSave({
41
- name: layoutName,
42
- group,
43
- screenshot: screenshot ?? "",
44
- user: username
45
- });
46
- };
47
- const screenshotContent = useMemo(()=>{
48
- if (screenshot) return /*#__PURE__*/ jsx("img", {
49
- className: `${classBase}-screenshot`,
50
- src: screenshot,
51
- alt: "screenshot of current layout"
52
- });
53
- if (screenshotErrorMessage) return /*#__PURE__*/ jsx(Text, {
54
- children: screenshotErrorMessage
55
- });
56
- return /*#__PURE__*/ jsx("div", {
57
- className: "spinner"
58
- });
59
- }, [
60
- screenshot,
61
- screenshotErrorMessage
62
- ]);
63
- const handleSelectionChange = useCallback((e, [selectedValue])=>{
64
- if ("Tab" !== e.key || selectedValue.toLowerCase().startsWith(group.toLowerCase())) setGroup(selectedValue || "");
65
- }, [
66
- group
67
- ]);
68
- const handleChange = useCallback((e)=>{
69
- setGroup(e.target.value);
70
- }, []);
71
- return /*#__PURE__*/ jsxs("div", {
72
- className: `${classBase}`,
73
- children: [
74
- /*#__PURE__*/ jsxs("div", {
75
- className: `${classBase}-panelContent`,
76
- children: [
77
- /*#__PURE__*/ jsxs(FormField, {
78
- children: [
79
- /*#__PURE__*/ jsx(FormFieldLabel, {
80
- children: "Group"
81
- }),
82
- /*#__PURE__*/ jsx(ComboBox, {
83
- "data-embedded": true,
84
- inputProps: {
85
- autoComplete: "off",
86
- className: `${classBase}-inputText`,
87
- placeholder: "Select Group or Enter New Name"
88
- },
89
- onChange: handleChange,
90
- onSelectionChange: handleSelectionChange,
91
- value: group,
92
- children: groups.map((group, i)=>/*#__PURE__*/ jsx(Option, {
93
- value: group
94
- }, i))
95
- })
96
- ]
97
- }),
98
- /*#__PURE__*/ jsxs(FormField, {
99
- children: [
100
- /*#__PURE__*/ jsx(FormFieldLabel, {
101
- children: "Layout Name"
102
- }),
103
- /*#__PURE__*/ jsx(Input, {
104
- "data-embedded": true,
105
- inputProps: {
106
- className: `${classBase}-inputText`,
107
- placeholder: "Enter Layout Name"
108
- },
109
- onChange: (event)=>setLayoutName(event.target.value),
110
- value: layoutName
111
- })
112
- ]
113
- }),
114
- /*#__PURE__*/ jsx("div", {
115
- className: `${classBase}-screenshotContainer`,
116
- children: screenshotContent
117
- })
118
- ]
119
- }),
120
- /*#__PURE__*/ jsxs("div", {
121
- className: `${classBase}-buttonsContainer`,
122
- children: [
123
- /*#__PURE__*/ jsx(Button, {
124
- className: `${classBase}-cancelButton`,
125
- onClick: onCancel,
126
- children: "Cancel"
127
- }),
128
- /*#__PURE__*/ jsx(Button, {
129
- appearance: "solid",
130
- className: `${classBase}-saveButton`,
131
- onClick: handleSubmit,
132
- disabled: "" === layoutName || "" === group,
133
- sentiment: "accented",
134
- children: "Save"
135
- })
136
- ]
137
- })
138
- ]
139
- });
140
- };
141
- export { SaveLayoutPanel_SaveLayoutPanel as SaveLayoutPanel };