@vuu-ui/vuu-shell 0.0.26

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 (222) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +0 -0
  3. package/cjs/ShellContextProvider.js +31 -0
  4. package/cjs/ShellContextProvider.js.map +1 -0
  5. package/cjs/app-header/AppHeader.css.js +6 -0
  6. package/cjs/app-header/AppHeader.css.js.map +1 -0
  7. package/cjs/app-header/AppHeader.js +66 -0
  8. package/cjs/app-header/AppHeader.js.map +1 -0
  9. package/cjs/connection-status/ConnectionStatusIndicator.css.js +6 -0
  10. package/cjs/connection-status/ConnectionStatusIndicator.css.js.map +1 -0
  11. package/cjs/connection-status/ConnectionStatusIndicator.js +51 -0
  12. package/cjs/connection-status/ConnectionStatusIndicator.js.map +1 -0
  13. package/cjs/feature/Feature.js +56 -0
  14. package/cjs/feature/Feature.js.map +1 -0
  15. package/cjs/feature/FeatureErrorBoundary.js +30 -0
  16. package/cjs/feature/FeatureErrorBoundary.js.map +1 -0
  17. package/cjs/feature/Loader.js +8 -0
  18. package/cjs/feature/Loader.js.map +1 -0
  19. package/cjs/feature-list/FeatureList.css.js +6 -0
  20. package/cjs/feature-list/FeatureList.css.js.map +1 -0
  21. package/cjs/feature-list/FeatureList.js +52 -0
  22. package/cjs/feature-list/FeatureList.js.map +1 -0
  23. package/cjs/index.js +51 -0
  24. package/cjs/index.js.map +1 -0
  25. package/cjs/layout-management/LayoutList.css.js +6 -0
  26. package/cjs/layout-management/LayoutList.css.js.map +1 -0
  27. package/cjs/layout-management/LayoutList.js +75 -0
  28. package/cjs/layout-management/LayoutList.js.map +1 -0
  29. package/cjs/layout-management/LayoutTile.css.js +6 -0
  30. package/cjs/layout-management/LayoutTile.css.js.map +1 -0
  31. package/cjs/layout-management/LayoutTile.js +36 -0
  32. package/cjs/layout-management/LayoutTile.js.map +1 -0
  33. package/cjs/layout-management/SaveLayoutPanel.css.js +6 -0
  34. package/cjs/layout-management/SaveLayoutPanel.css.js.map +1 -0
  35. package/cjs/layout-management/SaveLayoutPanel.js +149 -0
  36. package/cjs/layout-management/SaveLayoutPanel.js.map +1 -0
  37. package/cjs/layout-management/screenshot-utils.js +25 -0
  38. package/cjs/layout-management/screenshot-utils.js.map +1 -0
  39. package/cjs/layout-management/useLayoutContextMenuItems.js +72 -0
  40. package/cjs/layout-management/useLayoutContextMenuItems.js.map +1 -0
  41. package/cjs/layout-management/useLayoutManager.js +218 -0
  42. package/cjs/layout-management/useLayoutManager.js.map +1 -0
  43. package/cjs/left-nav/LeftNav.css.js +6 -0
  44. package/cjs/left-nav/LeftNav.css.js.map +1 -0
  45. package/cjs/left-nav/LeftNav.js +166 -0
  46. package/cjs/left-nav/LeftNav.js.map +1 -0
  47. package/cjs/login/LoginPanel.css.js +6 -0
  48. package/cjs/login/LoginPanel.css.js.map +1 -0
  49. package/cjs/login/LoginPanel.js +108 -0
  50. package/cjs/login/LoginPanel.js.map +1 -0
  51. package/cjs/login/VuuLogo.js +134 -0
  52. package/cjs/login/VuuLogo.js.map +1 -0
  53. package/cjs/login/login-utils.js +31 -0
  54. package/cjs/login/login-utils.js.map +1 -0
  55. package/cjs/persistence-management/LocalPersistenceManager.js +184 -0
  56. package/cjs/persistence-management/LocalPersistenceManager.js.map +1 -0
  57. package/cjs/persistence-management/RemotePersistenceManager.js +164 -0
  58. package/cjs/persistence-management/RemotePersistenceManager.js.map +1 -0
  59. package/cjs/persistence-management/defaultApplicationJson.js +42 -0
  60. package/cjs/persistence-management/defaultApplicationJson.js.map +1 -0
  61. package/cjs/session-editing-form/SessionEditingForm.css.js +6 -0
  62. package/cjs/session-editing-form/SessionEditingForm.css.js.map +1 -0
  63. package/cjs/session-editing-form/SessionEditingForm.js +280 -0
  64. package/cjs/session-editing-form/SessionEditingForm.js.map +1 -0
  65. package/cjs/shell-layouts/context-panel/ContextPanel.css.js +6 -0
  66. package/cjs/shell-layouts/context-panel/ContextPanel.css.js.map +1 -0
  67. package/cjs/shell-layouts/context-panel/ContextPanel.js +70 -0
  68. package/cjs/shell-layouts/context-panel/ContextPanel.js.map +1 -0
  69. package/cjs/shell-layouts/side-panel/SidePanel.css.js +6 -0
  70. package/cjs/shell-layouts/side-panel/SidePanel.css.js.map +1 -0
  71. package/cjs/shell-layouts/side-panel/SidePanel.js +36 -0
  72. package/cjs/shell-layouts/side-panel/SidePanel.js.map +1 -0
  73. package/cjs/shell-layouts/useFullHeightLeftPanel.js +41 -0
  74. package/cjs/shell-layouts/useFullHeightLeftPanel.js.map +1 -0
  75. package/cjs/shell-layouts/useInlayLeftPanel.js +78 -0
  76. package/cjs/shell-layouts/useInlayLeftPanel.js.map +1 -0
  77. package/cjs/shell-layouts/useShellLayout.js +15 -0
  78. package/cjs/shell-layouts/useShellLayout.js.map +1 -0
  79. package/cjs/shell.css.js +6 -0
  80. package/cjs/shell.css.js.map +1 -0
  81. package/cjs/shell.js +137 -0
  82. package/cjs/shell.js.map +1 -0
  83. package/cjs/shellTypes.js +8 -0
  84. package/cjs/shellTypes.js.map +1 -0
  85. package/cjs/theme-switch/ThemeSwitch.css.js +6 -0
  86. package/cjs/theme-switch/ThemeSwitch.css.js.map +1 -0
  87. package/cjs/theme-switch/ThemeSwitch.js +56 -0
  88. package/cjs/theme-switch/ThemeSwitch.js.map +1 -0
  89. package/esm/ShellContextProvider.js +28 -0
  90. package/esm/ShellContextProvider.js.map +1 -0
  91. package/esm/app-header/AppHeader.css.js +4 -0
  92. package/esm/app-header/AppHeader.css.js.map +1 -0
  93. package/esm/app-header/AppHeader.js +64 -0
  94. package/esm/app-header/AppHeader.js.map +1 -0
  95. package/esm/connection-status/ConnectionStatusIndicator.css.js +4 -0
  96. package/esm/connection-status/ConnectionStatusIndicator.css.js.map +1 -0
  97. package/esm/connection-status/ConnectionStatusIndicator.js +49 -0
  98. package/esm/connection-status/ConnectionStatusIndicator.js.map +1 -0
  99. package/esm/feature/Feature.js +54 -0
  100. package/esm/feature/Feature.js.map +1 -0
  101. package/esm/feature/FeatureErrorBoundary.js +28 -0
  102. package/esm/feature/FeatureErrorBoundary.js.map +1 -0
  103. package/esm/feature/Loader.js +6 -0
  104. package/esm/feature/Loader.js.map +1 -0
  105. package/esm/feature-list/FeatureList.css.js +4 -0
  106. package/esm/feature-list/FeatureList.css.js.map +1 -0
  107. package/esm/feature-list/FeatureList.js +50 -0
  108. package/esm/feature-list/FeatureList.js.map +1 -0
  109. package/esm/index.js +20 -0
  110. package/esm/index.js.map +1 -0
  111. package/esm/layout-management/LayoutList.css.js +4 -0
  112. package/esm/layout-management/LayoutList.css.js.map +1 -0
  113. package/esm/layout-management/LayoutList.js +73 -0
  114. package/esm/layout-management/LayoutList.js.map +1 -0
  115. package/esm/layout-management/LayoutTile.css.js +4 -0
  116. package/esm/layout-management/LayoutTile.css.js.map +1 -0
  117. package/esm/layout-management/LayoutTile.js +34 -0
  118. package/esm/layout-management/LayoutTile.js.map +1 -0
  119. package/esm/layout-management/SaveLayoutPanel.css.js +4 -0
  120. package/esm/layout-management/SaveLayoutPanel.css.js.map +1 -0
  121. package/esm/layout-management/SaveLayoutPanel.js +147 -0
  122. package/esm/layout-management/SaveLayoutPanel.js.map +1 -0
  123. package/esm/layout-management/screenshot-utils.js +23 -0
  124. package/esm/layout-management/screenshot-utils.js.map +1 -0
  125. package/esm/layout-management/useLayoutContextMenuItems.js +70 -0
  126. package/esm/layout-management/useLayoutContextMenuItems.js.map +1 -0
  127. package/esm/layout-management/useLayoutManager.js +214 -0
  128. package/esm/layout-management/useLayoutManager.js.map +1 -0
  129. package/esm/left-nav/LeftNav.css.js +4 -0
  130. package/esm/left-nav/LeftNav.css.js.map +1 -0
  131. package/esm/left-nav/LeftNav.js +164 -0
  132. package/esm/left-nav/LeftNav.js.map +1 -0
  133. package/esm/login/LoginPanel.css.js +4 -0
  134. package/esm/login/LoginPanel.css.js.map +1 -0
  135. package/esm/login/LoginPanel.js +106 -0
  136. package/esm/login/LoginPanel.js.map +1 -0
  137. package/esm/login/VuuLogo.js +132 -0
  138. package/esm/login/VuuLogo.js.map +1 -0
  139. package/esm/login/login-utils.js +26 -0
  140. package/esm/login/login-utils.js.map +1 -0
  141. package/esm/persistence-management/LocalPersistenceManager.js +182 -0
  142. package/esm/persistence-management/LocalPersistenceManager.js.map +1 -0
  143. package/esm/persistence-management/RemotePersistenceManager.js +162 -0
  144. package/esm/persistence-management/RemotePersistenceManager.js.map +1 -0
  145. package/esm/persistence-management/defaultApplicationJson.js +39 -0
  146. package/esm/persistence-management/defaultApplicationJson.js.map +1 -0
  147. package/esm/session-editing-form/SessionEditingForm.css.js +4 -0
  148. package/esm/session-editing-form/SessionEditingForm.css.js.map +1 -0
  149. package/esm/session-editing-form/SessionEditingForm.js +278 -0
  150. package/esm/session-editing-form/SessionEditingForm.js.map +1 -0
  151. package/esm/shell-layouts/context-panel/ContextPanel.css.js +4 -0
  152. package/esm/shell-layouts/context-panel/ContextPanel.css.js.map +1 -0
  153. package/esm/shell-layouts/context-panel/ContextPanel.js +68 -0
  154. package/esm/shell-layouts/context-panel/ContextPanel.js.map +1 -0
  155. package/esm/shell-layouts/side-panel/SidePanel.css.js +4 -0
  156. package/esm/shell-layouts/side-panel/SidePanel.css.js.map +1 -0
  157. package/esm/shell-layouts/side-panel/SidePanel.js +34 -0
  158. package/esm/shell-layouts/side-panel/SidePanel.js.map +1 -0
  159. package/esm/shell-layouts/useFullHeightLeftPanel.js +39 -0
  160. package/esm/shell-layouts/useFullHeightLeftPanel.js.map +1 -0
  161. package/esm/shell-layouts/useInlayLeftPanel.js +76 -0
  162. package/esm/shell-layouts/useInlayLeftPanel.js.map +1 -0
  163. package/esm/shell-layouts/useShellLayout.js +13 -0
  164. package/esm/shell-layouts/useShellLayout.js.map +1 -0
  165. package/esm/shell.css.js +4 -0
  166. package/esm/shell.css.js.map +1 -0
  167. package/esm/shell.js +135 -0
  168. package/esm/shell.js.map +1 -0
  169. package/esm/shellTypes.js +5 -0
  170. package/esm/shellTypes.js.map +1 -0
  171. package/esm/theme-switch/ThemeSwitch.css.js +4 -0
  172. package/esm/theme-switch/ThemeSwitch.css.js.map +1 -0
  173. package/esm/theme-switch/ThemeSwitch.js +54 -0
  174. package/esm/theme-switch/ThemeSwitch.js.map +1 -0
  175. package/package.json +48 -0
  176. package/types/ShellContextProvider.d.ts +16 -0
  177. package/types/app-header/AppHeader.d.ts +12 -0
  178. package/types/app-header/index.d.ts +1 -0
  179. package/types/connection-status/ConnectionStatusIndicator.d.ts +10 -0
  180. package/types/connection-status/index.d.ts +1 -0
  181. package/types/feature/Feature.d.ts +26 -0
  182. package/types/feature/FeatureErrorBoundary.d.ts +13 -0
  183. package/types/feature/Loader.d.ts +2 -0
  184. package/types/feature/index.d.ts +1 -0
  185. package/types/feature-list/FeatureList.d.ts +6 -0
  186. package/types/feature-list/index.d.ts +1 -0
  187. package/types/get-layout-history.d.ts +8 -0
  188. package/types/index.d.ts +13 -0
  189. package/types/layout-management/LayoutList.d.ts +2 -0
  190. package/types/layout-management/LayoutTile.d.ts +8 -0
  191. package/types/layout-management/SaveLayoutPanel.d.ts +10 -0
  192. package/types/layout-management/index.d.ts +5 -0
  193. package/types/layout-management/layoutTypes.d.ts +19 -0
  194. package/types/layout-management/screenshot-utils.d.ts +6 -0
  195. package/types/layout-management/useLayoutContextMenuItems.d.ts +6 -0
  196. package/types/layout-management/useLayoutManager.d.ts +26 -0
  197. package/types/left-nav/LeftNav.d.ts +17 -0
  198. package/types/left-nav/index.d.ts +1 -0
  199. package/types/login/LoginPanel.d.ts +7 -0
  200. package/types/login/VuuLogo.d.ts +2 -0
  201. package/types/login/index.d.ts +2 -0
  202. package/types/login/login-utils.d.ts +4 -0
  203. package/types/persistence-management/LocalPersistenceManager.d.ts +21 -0
  204. package/types/persistence-management/PersistenceManager.d.ts +55 -0
  205. package/types/persistence-management/RemotePersistenceManager.d.ts +22 -0
  206. package/types/persistence-management/defaultApplicationJson.d.ts +4 -0
  207. package/types/persistence-management/index.d.ts +4 -0
  208. package/types/session-editing-form/SessionEditingForm.d.ts +24 -0
  209. package/types/session-editing-form/index.d.ts +1 -0
  210. package/types/shell-layouts/context-panel/ContextPanel.d.ts +10 -0
  211. package/types/shell-layouts/context-panel/index.d.ts +1 -0
  212. package/types/shell-layouts/index.d.ts +3 -0
  213. package/types/shell-layouts/side-panel/SidePanel.d.ts +8 -0
  214. package/types/shell-layouts/side-panel/index.d.ts +1 -0
  215. package/types/shell-layouts/useFullHeightLeftPanel.d.ts +3 -0
  216. package/types/shell-layouts/useInlayLeftPanel.d.ts +3 -0
  217. package/types/shell-layouts/useShellLayout.d.ts +10 -0
  218. package/types/shell.d.ts +21 -0
  219. package/types/shellTypes.d.ts +29 -0
  220. package/types/theme-switch/ThemeSwitch.d.ts +8 -0
  221. package/types/theme-switch/index.d.ts +1 -0
  222. package/types/use-force-render.d.ts +1 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2015 UBS
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
File without changes
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+
6
+ const defaultConfig = {};
7
+ const ShellContext = React.createContext(defaultConfig);
8
+ const Provider = ({
9
+ children,
10
+ context,
11
+ inheritedContext
12
+ }) => {
13
+ const mergedContext = {
14
+ ...inheritedContext,
15
+ ...context
16
+ };
17
+ return /* @__PURE__ */ jsxRuntime.jsx(ShellContext.Provider, { value: mergedContext, children });
18
+ };
19
+ const ShellContextProvider = ({
20
+ children,
21
+ value
22
+ }) => {
23
+ return /* @__PURE__ */ jsxRuntime.jsx(ShellContext.Consumer, { children: (context) => /* @__PURE__ */ jsxRuntime.jsx(Provider, { context: value, inheritedContext: context, children }) });
24
+ };
25
+ const useShellContext = () => {
26
+ return React.useContext(ShellContext);
27
+ };
28
+
29
+ exports.ShellContextProvider = ShellContextProvider;
30
+ exports.useShellContext = useShellContext;
31
+ //# sourceMappingURL=ShellContextProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShellContextProvider.js","sources":["../src/ShellContextProvider.tsx"],"sourcesContent":["import {\n DefaultColumnConfiguration,\n ListOption,\n} from \"@vuu-ui/vuu-table-types\";\nimport type { RpcResponseHandler } from \"@vuu-ui/vuu-data-types\";\nimport { createContext, ReactElement, ReactNode, useContext } from \"react\";\nimport type { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type LookupTableProvider = (table: VuuTable) => ListOption[];\n\nexport interface ShellContextProps {\n getDefaultColumnConfig?: DefaultColumnConfiguration;\n getLookupValues?: LookupTableProvider;\n handleRpcResponse?: RpcResponseHandler;\n}\n\nconst defaultConfig = {};\n\nconst ShellContext = createContext<ShellContextProps>(defaultConfig);\n\nexport interface ShellProviderProps {\n children: ReactNode;\n value?: ShellContextProps;\n}\n\nconst Provider = ({\n children,\n context,\n inheritedContext,\n}: {\n children: ReactNode;\n context?: ShellContextProps;\n inheritedContext?: ShellContextProps;\n}) => {\n // TODO functions provided at multiple levels must be merged\n const mergedContext = {\n ...inheritedContext,\n ...context,\n };\n return (\n <ShellContext.Provider value={mergedContext}>\n {children}\n </ShellContext.Provider>\n );\n};\n\nexport const ShellContextProvider = ({\n children,\n value,\n}: ShellProviderProps): ReactElement => {\n return (\n <ShellContext.Consumer>\n {(context) => (\n <Provider context={value} inheritedContext={context}>\n {children}\n </Provider>\n )}\n </ShellContext.Consumer>\n );\n};\n\nexport const useShellContext = () => {\n return useContext(ShellContext);\n};\n"],"names":["createContext","jsx","useContext"],"mappings":";;;;;AAgBA,MAAM,gBAAgB,EAAC,CAAA;AAEvB,MAAM,YAAA,GAAeA,oBAAiC,aAAa,CAAA,CAAA;AAOnE,MAAM,WAAW,CAAC;AAAA,EAChB,QAAA;AAAA,EACA,OAAA;AAAA,EACA,gBAAA;AACF,CAIM,KAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA;AAAA,IACpB,GAAG,gBAAA;AAAA,IACH,GAAG,OAAA;AAAA,GACL,CAAA;AACA,EAAA,sCACG,YAAa,CAAA,QAAA,EAAb,EAAsB,KAAA,EAAO,eAC3B,QACH,EAAA,CAAA,CAAA;AAEJ,CAAA,CAAA;AAEO,MAAM,uBAAuB,CAAC;AAAA,EACnC,QAAA;AAAA,EACA,KAAA;AACF,CAAwC,KAAA;AACtC,EAAA,uBACGC,cAAA,CAAA,YAAA,CAAa,QAAb,EAAA,EACE,QAAC,EAAA,CAAA,OAAA,qBACCA,cAAA,CAAA,QAAA,EAAA,EAAS,OAAS,EAAA,KAAA,EAAO,gBAAkB,EAAA,OAAA,EACzC,UACH,CAEJ,EAAA,CAAA,CAAA;AAEJ,EAAA;AAEO,MAAM,kBAAkB,MAAM;AACnC,EAAA,OAAOC,iBAAW,YAAY,CAAA,CAAA;AAChC;;;;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var appHeaderCss = ".vuuAppHeader {\n --saltButton-borderRadius: 6px;\n --saltButton-text-color: var(--vuu-color-gray-50);\n --saltButton-padding: 12px;\n --vuuToolbarItem-height: 26px;\n --vuuOverflowContainer-gap: 8px;\n --vuu-icon-color: var(--vuu-color-gray-45);\n --vuu-icon-size: 16px;\n --vuuToolbar-background: var(--vuuAppHeader-background, var(--vuu-color-gray-28));\n --vuuToolbar-borderWidth: 1px;\n --vuuToolbar-borderStyle: solid; \n --vuuToolbar-borderColor: var(--vuu-color-gray-30);\n\n align-items: center;\n display: flex;\n justify-content: flex-end;\n}\n\n.vuu-theme .vuuAppHeader {\n border-radius: 8px;\n \n margin-bottom: 8px;\n}\n\n";
4
+
5
+ module.exports = appHeaderCss;
6
+ //# sourceMappingURL=AppHeader.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppHeader.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var vuuUiControls = require('@vuu-ui/vuu-ui-controls');
5
+ var core = require('@salt-ds/core');
6
+ var styles = require('@salt-ds/styles');
7
+ var window = require('@salt-ds/window');
8
+ var cx = require('clsx');
9
+ var React = require('react');
10
+ var loginUtils = require('../login/login-utils.js');
11
+ var AppHeader$1 = require('./AppHeader.css.js');
12
+
13
+ const classBase = "vuuAppHeader";
14
+ const AppHeader = ({
15
+ className: classNameProp,
16
+ layoutId,
17
+ loginUrl,
18
+ onNavigate,
19
+ onSwitchTheme,
20
+ themeMode: _,
21
+ user,
22
+ ...htmlAttributes
23
+ }) => {
24
+ const targetWindow = window.useWindow();
25
+ styles.useComponentCssInjection({
26
+ testId: "vuu-app-header",
27
+ css: AppHeader$1,
28
+ window: targetWindow
29
+ });
30
+ const className = cx(classBase, classNameProp);
31
+ const handleLogout = React.useCallback(() => {
32
+ loginUtils.logout(loginUrl);
33
+ }, [loginUrl]);
34
+ return /* @__PURE__ */ jsxRuntime.jsxs(
35
+ vuuUiControls.Toolbar,
36
+ {
37
+ alignItems: "end",
38
+ className,
39
+ showSeparators: true,
40
+ ...htmlAttributes,
41
+ children: [
42
+ /* @__PURE__ */ jsxRuntime.jsx(core.Button, { className: `${classBase}-menuItem`, variant: "secondary", children: "Help" }),
43
+ /* @__PURE__ */ jsxRuntime.jsxs(core.Button, { className: `${classBase}-menuItem`, variant: "secondary", children: [
44
+ "History ",
45
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-icon": "history" })
46
+ ] }),
47
+ /* @__PURE__ */ jsxRuntime.jsxs(core.Button, { className: `${classBase}-menuItem`, variant: "secondary", children: [
48
+ "View ",
49
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-icon": "settings" })
50
+ ] }),
51
+ /* @__PURE__ */ jsxRuntime.jsx(
52
+ core.Button,
53
+ {
54
+ className: `${classBase}-menuItem`,
55
+ onClick: handleLogout,
56
+ variant: "secondary",
57
+ children: "Log out"
58
+ }
59
+ )
60
+ ]
61
+ }
62
+ );
63
+ };
64
+
65
+ exports.AppHeader = AppHeader;
66
+ //# sourceMappingURL=AppHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppHeader.js","sources":["../../src/app-header/AppHeader.tsx"],"sourcesContent":["import { Toolbar } from \"@vuu-ui/vuu-ui-controls\";\nimport { ThemeMode } from \"@vuu-ui/vuu-utils\";\nimport { Button } from \"@salt-ds/core\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { HTMLAttributes, useCallback } from \"react\";\nimport { logout } from \"../login\";\nimport { VuuUser } from \"../shell\";\n\nimport appHeaderCss from \"./AppHeader.css\";\n\nconst classBase = \"vuuAppHeader\";\nexport interface AppHeaderProps extends HTMLAttributes<HTMLDivElement> {\n layoutId: string;\n loginUrl?: string;\n onNavigate: (id: string) => void;\n onSwitchTheme?: (mode: ThemeMode) => void;\n themeMode?: ThemeMode;\n user: VuuUser;\n}\n\nexport const AppHeader = ({\n className: classNameProp,\n layoutId,\n loginUrl,\n onNavigate,\n onSwitchTheme,\n themeMode: _,\n user,\n ...htmlAttributes\n}: AppHeaderProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-app-header\",\n css: appHeaderCss,\n window: targetWindow,\n });\n\n const className = cx(classBase, classNameProp);\n // const handleSwitchTheme = useCallback(\n // (mode: ThemeMode) => onSwitchTheme?.(mode),\n // [onSwitchTheme]\n // );\n\n const handleLogout = useCallback(() => {\n logout(loginUrl);\n }, [loginUrl]);\n\n return (\n <Toolbar\n alignItems=\"end\"\n className={className}\n showSeparators\n {...htmlAttributes}\n >\n <Button className={`${classBase}-menuItem`} variant=\"secondary\">\n Help\n </Button>\n <Button className={`${classBase}-menuItem`} variant=\"secondary\">\n History <span data-icon=\"history\" />\n </Button>\n <Button className={`${classBase}-menuItem`} variant=\"secondary\">\n View <span data-icon=\"settings\" />\n </Button>\n <Button\n className={`${classBase}-menuItem`}\n onClick={handleLogout}\n variant=\"secondary\"\n >\n Log out\n </Button>\n {/* <ThemeSwitch\n data-align=\"right\"\n defaultMode={themeMode}\n onChange={handleSwitchTheme}\n /> */}\n {/* <UserProfile\n layoutId={layoutId}\n loginUrl={loginUrl}\n onNavigate={onNavigate}\n user={user}\n /> */}\n </Toolbar>\n );\n};\n"],"names":["useWindow","useComponentCssInjection","appHeaderCss","useCallback","logout","jsxs","Toolbar","jsx","Button"],"mappings":";;;;;;;;;;;;AAYA,MAAM,SAAY,GAAA,cAAA,CAAA;AAUX,MAAM,YAAY,CAAC;AAAA,EACxB,SAAW,EAAA,aAAA;AAAA,EACX,QAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,aAAA;AAAA,EACA,SAAW,EAAA,CAAA;AAAA,EACX,IAAA;AAAA,EACA,GAAG,cAAA;AACL,CAAsB,KAAA;AACpB,EAAA,MAAM,eAAeA,gBAAU,EAAA,CAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,gBAAA;AAAA,IACR,GAAK,EAAAC,WAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAED,EAAM,MAAA,SAAA,GAAY,EAAG,CAAA,SAAA,EAAW,aAAa,CAAA,CAAA;AAM7C,EAAM,MAAA,YAAA,GAAeC,kBAAY,MAAM;AACrC,IAAAC,iBAAA,CAAO,QAAQ,CAAA,CAAA;AAAA,GACjB,EAAG,CAAC,QAAQ,CAAC,CAAA,CAAA;AAEb,EACE,uBAAAC,eAAA;AAAA,IAACC,qBAAA;AAAA,IAAA;AAAA,MACC,UAAW,EAAA,KAAA;AAAA,MACX,SAAA;AAAA,MACA,cAAc,EAAA,IAAA;AAAA,MACb,GAAG,cAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAACC,eAAO,SAAW,EAAA,CAAA,EAAG,SAAS,CAAa,SAAA,CAAA,EAAA,OAAA,EAAQ,aAAY,QAEhE,EAAA,MAAA,EAAA,CAAA;AAAA,wCACCA,WAAO,EAAA,EAAA,SAAA,EAAW,GAAG,SAAS,CAAA,SAAA,CAAA,EAAa,SAAQ,WAAY,EAAA,QAAA,EAAA;AAAA,UAAA,UAAA;AAAA,0BACtDD,cAAA,CAAC,MAAK,EAAA,EAAA,WAAA,EAAU,SAAU,EAAA,CAAA;AAAA,SACpC,EAAA,CAAA;AAAA,wCACCC,WAAO,EAAA,EAAA,SAAA,EAAW,GAAG,SAAS,CAAA,SAAA,CAAA,EAAa,SAAQ,WAAY,EAAA,QAAA,EAAA;AAAA,UAAA,OAAA;AAAA,0BACzDD,cAAA,CAAC,MAAK,EAAA,EAAA,WAAA,EAAU,UAAW,EAAA,CAAA;AAAA,SAClC,EAAA,CAAA;AAAA,wBACAA,cAAA;AAAA,UAACC,WAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,GAAG,SAAS,CAAA,SAAA,CAAA;AAAA,YACvB,OAAS,EAAA,YAAA;AAAA,YACT,OAAQ,EAAA,WAAA;AAAA,YACT,QAAA,EAAA,SAAA;AAAA,WAAA;AAAA,SAED;AAAA,OAAA;AAAA,KAAA;AAAA,GAYF,CAAA;AAEJ;;;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var connectionStatusIndicatorCss = ".vuuStatus-container {\n\tdisplay: flex;\n}\n\n.vuuStatus-text {\n\talign-self: center;\n}\n\n\n.vuuStatus {\n\t--vuu-icon-height: 18px;\n\t--vuu-icon-padding: var(--vuuStatus-padding, 6px);\n\t--vuu-icon-width: var(--vuuStatus-width, auto);\n\t--vuu-icon-min-width: var(--vuuStatus-min-width, 20px);\n\talign-items: center;\n\tdisplay: inline-flex;\n\theight: var(--vuu-icon-height);\n\tjustify-content: center;\n\tmin-width: var(--vuu-icon-min-width);\n\tpadding: 0 var(--vuu-icon-padding);\n\twidth: var(--vuu-icon-width);\n\tposition: relative;\n}\n\n.vuuStatus[data-icon]::after {\n\tinset: 0 0 0 0;\n\tcontent: '';\n\tbox-shadow: 0 0 0 0 black;\n\tposition: absolute;\n\tmask: var(--vuu-icon-svg) center center/20px 20px no-repeat;\n\t-webkit-mask: var(--vuu-icon-svg) center center/20px 20px no-repeat;\n}\n\n.vuuActiveStatus::after {\n\t--vuu-icon-svg: var(--svg-active-status);\n\tbackground-color: rgb(0, 255, 0);\n}\n\n.vuuConnectingStatus::after {\n\t--vuu-icon-svg: var(--svg-connecting-status);\n\tbackground-color: orange;\n\ttransform: scale(1);\n\tanimation: infinite pulse 1s;\n}\n\n.vuuDisconnectedStatus::after {\n\t--vuu-icon-svg: var(--svg-disconnected-status);\n\tbackground-color: red;\n\ttransform: scale(1);\n\tanimation: infinite pulse 0.5s;\n}\n\n@keyframes pulse {\n\t0% {\n\t\ttransform: scale(0.95);\n\t\tbox-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);\n\t}\n\n\t70% {\n\t\ttransform: scale(1);\n\t\tbox-shadow: 0 0 0 0 rgba(0, 0, 0, 0);\n\t}\n\n\t100% {\n\t\ttransform: scale(0.95);\n\t\tbox-shadow: 0 0 0 0 rgba(0, 0, 0, 0);\n\t}\n}";
4
+
5
+ module.exports = connectionStatusIndicatorCss;
6
+ //# sourceMappingURL=ConnectionStatusIndicator.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectionStatusIndicator.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+ var styles = require('@salt-ds/styles');
6
+ var window = require('@salt-ds/window');
7
+ var cx = require('clsx');
8
+ var ConnectionStatusIndicator$1 = require('./ConnectionStatusIndicator.css.js');
9
+
10
+ const ConnectionStatusIndicator = ({
11
+ connectionStatus,
12
+ className,
13
+ element = "span",
14
+ ...props
15
+ }) => {
16
+ const targetWindow = window.useWindow();
17
+ styles.useComponentCssInjection({
18
+ testId: "vuu-connection-status-indicator",
19
+ css: ConnectionStatusIndicator$1,
20
+ window: targetWindow
21
+ });
22
+ const [classBase, setClassBase] = React.useState("vuuConnectingStatus");
23
+ React.useEffect(() => {
24
+ switch (connectionStatus) {
25
+ case "connected":
26
+ case "reconnected":
27
+ setClassBase("vuuActiveStatus");
28
+ break;
29
+ case "connecting":
30
+ setClassBase("vuuConnectingStatus");
31
+ break;
32
+ case "disconnected":
33
+ setClassBase("vuuDisconnectedStatus");
34
+ break;
35
+ }
36
+ }, [connectionStatus]);
37
+ const statusIcon = React.createElement(element, {
38
+ ...props,
39
+ className: cx("vuuStatus vuuIcon", classBase, className)
40
+ });
41
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "vuuStatus-container salt-theme", children: [
42
+ statusIcon,
43
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "vuuStatus-text", children: [
44
+ "Status: ",
45
+ connectionStatus.toUpperCase()
46
+ ] })
47
+ ] }) });
48
+ };
49
+
50
+ exports.ConnectionStatusIndicator = ConnectionStatusIndicator;
51
+ //# sourceMappingURL=ConnectionStatusIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectionStatusIndicator.js","sources":["../../src/connection-status/ConnectionStatusIndicator.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\n\nimport cx from \"clsx\";\n\nimport connectionStatusIndicatorCss from \"./ConnectionStatusIndicator.css\";\n\ntype connectionStatus =\n | \"connected\"\n | \"reconnected\"\n | \"connecting\"\n | \"disconnected\";\n\ninterface ConnectionStatusProps {\n connectionStatus: connectionStatus;\n className?: string;\n props?: unknown;\n element?: string;\n}\n\nexport const ConnectionStatusIndicator = ({\n connectionStatus,\n className,\n element = \"span\",\n ...props\n}: ConnectionStatusProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-connection-status-indicator\",\n css: connectionStatusIndicatorCss,\n window: targetWindow,\n });\n\n const [classBase, setClassBase] = useState<string>(\"vuuConnectingStatus\");\n useEffect(() => {\n switch (connectionStatus) {\n case \"connected\":\n case \"reconnected\":\n setClassBase(\"vuuActiveStatus\");\n break;\n case \"connecting\":\n setClassBase(\"vuuConnectingStatus\");\n break;\n case \"disconnected\":\n setClassBase(\"vuuDisconnectedStatus\");\n break;\n default:\n break;\n }\n }, [connectionStatus]);\n\n const statusIcon = React.createElement(element, {\n ...props,\n className: cx(\"vuuStatus vuuIcon\", classBase, className),\n });\n\n return (\n <>\n <div className=\"vuuStatus-container salt-theme\">\n {statusIcon}\n <div className=\"vuuStatus-text\">\n Status: {connectionStatus.toUpperCase()}\n </div>\n </div>\n </>\n );\n};\n"],"names":["useWindow","useComponentCssInjection","connectionStatusIndicatorCss","useState","useEffect","jsx","Fragment","jsxs"],"mappings":";;;;;;;;;AAqBO,MAAM,4BAA4B,CAAC;AAAA,EACxC,gBAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAU,GAAA,MAAA;AAAA,EACV,GAAG,KAAA;AACL,CAA6B,KAAA;AAC3B,EAAA,MAAM,eAAeA,gBAAU,EAAA,CAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,iCAAA;AAAA,IACR,GAAK,EAAAC,2BAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAED,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAIC,eAAiB,qBAAqB,CAAA,CAAA;AACxE,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,QAAQ,gBAAkB;AAAA,MACxB,KAAK,WAAA,CAAA;AAAA,MACL,KAAK,aAAA;AACH,QAAA,YAAA,CAAa,iBAAiB,CAAA,CAAA;AAC9B,QAAA,MAAA;AAAA,MACF,KAAK,YAAA;AACH,QAAA,YAAA,CAAa,qBAAqB,CAAA,CAAA;AAClC,QAAA,MAAA;AAAA,MACF,KAAK,cAAA;AACH,QAAA,YAAA,CAAa,uBAAuB,CAAA,CAAA;AACpC,QAAA,MAAA;AAEA,KACJ;AAAA,GACF,EAAG,CAAC,gBAAgB,CAAC,CAAA,CAAA;AAErB,EAAM,MAAA,UAAA,GAAa,KAAM,CAAA,aAAA,CAAc,OAAS,EAAA;AAAA,IAC9C,GAAG,KAAA;AAAA,IACH,SAAW,EAAA,EAAA,CAAG,mBAAqB,EAAA,SAAA,EAAW,SAAS,CAAA;AAAA,GACxD,CAAA,CAAA;AAED,EAAA,uBAEIC,cAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,kBAAAC,eAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAU,gCACZ,EAAA,QAAA,EAAA;AAAA,IAAA,UAAA;AAAA,oBACDA,eAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAU,gBAAiB,EAAA,QAAA,EAAA;AAAA,MAAA,UAAA;AAAA,MACrB,iBAAiB,WAAY,EAAA;AAAA,KACxC,EAAA,CAAA;AAAA,GAAA,EACF,CACF,EAAA,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var vuuLayout = require('@vuu-ui/vuu-layout');
5
+ var vuuUtils = require('@vuu-ui/vuu-utils');
6
+ var React = require('react');
7
+ var FeatureErrorBoundary = require('./FeatureErrorBoundary.js');
8
+ var Loader = require('./Loader.js');
9
+
10
+ const componentsMap = /* @__PURE__ */ new Map();
11
+ const useCachedFeature = (url) => {
12
+ React.useEffect(
13
+ () => () => {
14
+ componentsMap.delete(url);
15
+ },
16
+ [url]
17
+ );
18
+ if (!componentsMap.has(url)) {
19
+ componentsMap.set(
20
+ url,
21
+ React.lazy(() => import(
22
+ /* @vite-ignore */
23
+ url
24
+ ))
25
+ );
26
+ }
27
+ const lazyFeature = componentsMap.get(url);
28
+ if (!lazyFeature) {
29
+ throw Error(`Unable to load Lazy Feature at url ${url}`);
30
+ } else {
31
+ return lazyFeature;
32
+ }
33
+ };
34
+ function RawFeature({
35
+ url,
36
+ css,
37
+ ComponentProps: params,
38
+ ...props
39
+ }) {
40
+ if (css) {
41
+ vuuUtils.importCSS(css).then((styleSheet) => {
42
+ document.adoptedStyleSheets = [
43
+ ...document.adoptedStyleSheets,
44
+ styleSheet
45
+ ];
46
+ });
47
+ }
48
+ const LazyFeature = useCachedFeature(url);
49
+ return /* @__PURE__ */ jsxRuntime.jsx(FeatureErrorBoundary.FeatureErrorBoundary, { url, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(Loader.Loader, {}), children: /* @__PURE__ */ jsxRuntime.jsx(LazyFeature, { ...props, ...params }) }) });
50
+ }
51
+ const Feature = React.memo(RawFeature);
52
+ Feature.displayName = "Feature";
53
+ vuuLayout.registerComponent("Feature", Feature, "view");
54
+
55
+ exports.Feature = Feature;
56
+ //# sourceMappingURL=Feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Feature.js","sources":["../../src/feature/Feature.tsx"],"sourcesContent":["import { registerComponent, ViewProps } from \"@vuu-ui/vuu-layout\";\nimport { importCSS } from \"@vuu-ui/vuu-utils\";\nimport React, { Suspense, useEffect } from \"react\";\nimport { FeatureErrorBoundary } from \"./FeatureErrorBoundary\";\nimport { Loader } from \"./Loader\";\n\n/**\n * Ensure we never lazy load the same component more than once\n */\nconst componentsMap = new Map<string, ReturnType<typeof React.lazy>>();\nconst useCachedFeature = (url: string) => {\n useEffect(\n () => () => {\n componentsMap.delete(url);\n },\n [url]\n );\n\n if (!componentsMap.has(url)) {\n componentsMap.set(\n url,\n React.lazy(() => import(/* @vite-ignore */ url))\n );\n }\n\n const lazyFeature = componentsMap.get(url);\n\n if (!lazyFeature) {\n throw Error(`Unable to load Lazy Feature at url ${url}`);\n } else {\n return lazyFeature;\n }\n};\n\nexport interface FeatureProps<P extends object | undefined = any> {\n /**\n props that will be passed to the lazily loaded component.\n */\n ComponentProps?: P;\n ViewProps?: Partial<Pick<ViewProps, \"closeable\" | \"header\">>;\n css?: string;\n height?: number;\n title?: string;\n /** \n The url of javascript bundle to lazily load. Bundle must provide a default export\n and that export must be a React component.\n */\n url: string;\n width?: number;\n}\n\nfunction RawFeature<Params extends object | undefined>({\n url,\n css,\n ComponentProps: params,\n ...props\n}: FeatureProps<Params>) {\n // useEffect(() => {\n // console.log(\"%cFeature mount\", \"color: green;\");\n // return () => {\n // console.log(\"%cFeature unmount\", \"color:red;\");\n // };\n // }, []);\n\n if (css) {\n // import(/* @vite-ignore */ css, { assert: { type: \"css\" } }).then(\n // (cssModule) => {\n // console.log(\"%cInject Styles\", \"color: blue;font-weight: bold\");\n // document.adoptedStyleSheets = [\n // ...document.adoptedStyleSheets,\n // cssModule.default,\n // ];\n // }\n // );\n // Polyfill until cypress build supports import assertions\n // Note: already fully supported in esbuild and vite\n importCSS(css).then((styleSheet) => {\n document.adoptedStyleSheets = [\n ...document.adoptedStyleSheets,\n styleSheet,\n ];\n });\n }\n\n const LazyFeature = useCachedFeature(url);\n return (\n <FeatureErrorBoundary url={url}>\n <Suspense fallback={<Loader />}>\n <LazyFeature {...props} {...params} />\n </Suspense>\n </FeatureErrorBoundary>\n );\n}\n\n/**\n Feature is a wrapper around React Lazy Loading. It will load a component\n from the given url. That url must resolve to a javascript bundle with a\n single default export. That export must be a React component.\n */\nexport const Feature = React.memo(RawFeature);\nFeature.displayName = \"Feature\";\nregisterComponent(\"Feature\", Feature, \"view\");\n"],"names":["useEffect","importCSS","FeatureErrorBoundary","jsx","Suspense","Loader","registerComponent"],"mappings":";;;;;;;;;AASA,MAAM,aAAA,uBAAoB,GAA2C,EAAA,CAAA;AACrE,MAAM,gBAAA,GAAmB,CAAC,GAAgB,KAAA;AACxC,EAAAA,eAAA;AAAA,IACE,MAAM,MAAM;AACV,MAAA,aAAA,CAAc,OAAO,GAAG,CAAA,CAAA;AAAA,KAC1B;AAAA,IACA,CAAC,GAAG,CAAA;AAAA,GACN,CAAA;AAEA,EAAA,IAAI,CAAC,aAAA,CAAc,GAAI,CAAA,GAAG,CAAG,EAAA;AAC3B,IAAc,aAAA,CAAA,GAAA;AAAA,MACZ,GAAA;AAAA,MACA,KAAA,CAAM,KAAK,MAAM;AAAA;AAAA,QAA0B,GAAA;AAAA,OAAI,CAAA;AAAA,KACjD,CAAA;AAAA,GACF;AAEA,EAAM,MAAA,WAAA,GAAc,aAAc,CAAA,GAAA,CAAI,GAAG,CAAA,CAAA;AAEzC,EAAA,IAAI,CAAC,WAAa,EAAA;AAChB,IAAM,MAAA,KAAA,CAAM,CAAsC,mCAAA,EAAA,GAAG,CAAE,CAAA,CAAA,CAAA;AAAA,GAClD,MAAA;AACL,IAAO,OAAA,WAAA,CAAA;AAAA,GACT;AACF,CAAA,CAAA;AAmBA,SAAS,UAA8C,CAAA;AAAA,EACrD,GAAA;AAAA,EACA,GAAA;AAAA,EACA,cAAgB,EAAA,MAAA;AAAA,EAChB,GAAG,KAAA;AACL,CAAyB,EAAA;AAQvB,EAAA,IAAI,GAAK,EAAA;AAYP,IAAAC,kBAAA,CAAU,GAAG,CAAA,CAAE,IAAK,CAAA,CAAC,UAAe,KAAA;AAClC,MAAA,QAAA,CAAS,kBAAqB,GAAA;AAAA,QAC5B,GAAG,QAAS,CAAA,kBAAA;AAAA,QACZ,UAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AAEA,EAAM,MAAA,WAAA,GAAc,iBAAiB,GAAG,CAAA,CAAA;AACxC,EAAA,sCACGC,yCAAqB,EAAA,EAAA,GAAA,EACpB,QAAC,kBAAAC,cAAA,CAAAC,cAAA,EAAA,EAAS,0BAAWD,cAAA,CAAAE,aAAA,EAAA,EAAO,CAC1B,EAAA,QAAA,kBAAAF,cAAA,CAAC,eAAa,GAAG,KAAA,EAAQ,GAAG,MAAA,EAAQ,GACtC,CACF,EAAA,CAAA,CAAA;AAEJ,CAAA;AAOa,MAAA,OAAA,GAAU,KAAM,CAAA,IAAA,CAAK,UAAU,EAAA;AAC5C,OAAA,CAAQ,WAAc,GAAA,SAAA,CAAA;AACtBG,2BAAkB,CAAA,SAAA,EAAW,SAAS,MAAM,CAAA;;;;"}
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+
6
+ class FeatureErrorBoundary extends React.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ this.state = { errorMessage: null };
10
+ }
11
+ static getDerivedStateFromError(error) {
12
+ return { errorMessage: error.message };
13
+ }
14
+ componentDidCatch(error, errorInfo) {
15
+ console.log(`error creating component at ${this.props.url}`);
16
+ console.log(error, errorInfo);
17
+ }
18
+ render() {
19
+ if (this.state.errorMessage) {
20
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { children: "An error occured while creating component." }),
22
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: this.state.errorMessage })
23
+ ] });
24
+ }
25
+ return this.props.children;
26
+ }
27
+ }
28
+
29
+ exports.FeatureErrorBoundary = FeatureErrorBoundary;
30
+ //# sourceMappingURL=FeatureErrorBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureErrorBoundary.js","sources":["../../src/feature/FeatureErrorBoundary.tsx"],"sourcesContent":["import React, { ErrorInfo, ReactNode } from \"react\";\nimport { FeatureProps } from \"./Feature\";\n\nexport interface FeatureErrorBoundaryProps extends FeatureProps {\n children: ReactNode;\n}\n\nexport class FeatureErrorBoundary extends React.Component<\n FeatureErrorBoundaryProps,\n any\n> {\n constructor(props: FeatureErrorBoundaryProps) {\n super(props);\n this.state = { errorMessage: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n // Update state so the next render will show the fallback UI.\n return { errorMessage: error.message };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // You can also log the error to an error reporting service\n console.log(`error creating component at ${this.props.url}`);\n console.log(error, errorInfo);\n }\n\n render() {\n if (this.state.errorMessage) {\n return (\n <>\n <h1>An error occured while creating component.</h1>\n <p>{this.state.errorMessage}</p>\n </>\n );\n }\n\n return this.props.children;\n }\n}\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;AAOa,MAAA,oBAAA,SAA6B,MAAM,SAG9C,CAAA;AAAA,EACA,YAAY,KAAkC,EAAA;AAC5C,IAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AACX,IAAK,IAAA,CAAA,KAAA,GAAQ,EAAE,YAAA,EAAc,IAAK,EAAA,CAAA;AAAA,GACpC;AAAA,EAEA,OAAO,yBAAyB,KAAc,EAAA;AAE5C,IAAO,OAAA,EAAE,YAAc,EAAA,KAAA,CAAM,OAAQ,EAAA,CAAA;AAAA,GACvC;AAAA,EAEA,iBAAA,CAAkB,OAAc,SAAsB,EAAA;AAEpD,IAAA,OAAA,CAAQ,GAAI,CAAA,CAAA,4BAAA,EAA+B,IAAK,CAAA,KAAA,CAAM,GAAG,CAAE,CAAA,CAAA,CAAA;AAC3D,IAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,SAAS,CAAA,CAAA;AAAA,GAC9B;AAAA,EAEA,MAAS,GAAA;AACP,IAAI,IAAA,IAAA,CAAK,MAAM,YAAc,EAAA;AAC3B,MAAA,uBAEIA,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAAC,QAAG,QAA0C,EAAA,4CAAA,EAAA,CAAA;AAAA,wBAC7CA,cAAA,CAAA,GAAA,EAAA,EAAG,QAAK,EAAA,IAAA,CAAA,KAAA,CAAM,YAAa,EAAA,CAAA;AAAA,OAC9B,EAAA,CAAA,CAAA;AAAA,KAEJ;AAEA,IAAA,OAAO,KAAK,KAAM,CAAA,QAAA,CAAA;AAAA,GACpB;AACF;;;;"}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+
5
+ const Loader = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hwLoader" });
6
+
7
+ exports.Loader = Loader;
8
+ //# sourceMappingURL=Loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Loader.js","sources":["../../src/feature/Loader.tsx"],"sourcesContent":["// TODO\nexport const Loader = () => <div className=\"hwLoader\"></div>;\n"],"names":["jsx"],"mappings":";;;;AACO,MAAM,MAAS,GAAA,sBAAOA,cAAA,CAAA,KAAA,EAAA,EAAI,WAAU,UAAW,EAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var featureListCss = ".vuuFeatureList {\n background: var(--vuuFeatureList-background, var(--salt-container-primary-background));\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 195px 32px 16px 24px;\n}\n\n.vuuFeatureList-header {\n flex: 0 0 40px;\n font-size: 12px;\n font-weight: 700;\n line-height: 2;\n}\n\n.vuuFeatureList-content {\n flex: 1 1 auto;\n font-size: 12px;\n font-weight: 700;\n}\n\n";
4
+
5
+ module.exports = featureListCss;
6
+ //# sourceMappingURL=FeatureList.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureList.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var vuuLayout = require('@vuu-ui/vuu-layout');
5
+ var styles = require('@salt-ds/styles');
6
+ var window = require('@salt-ds/window');
7
+ var Feature = require('../feature/Feature.js');
8
+ var FeatureList$1 = require('./FeatureList.css.js');
9
+
10
+ const classBase = "vuuFeatureList";
11
+ const FeatureList = ({
12
+ features,
13
+ title = "VUU TABLES",
14
+ ...htmlAttributes
15
+ }) => {
16
+ const targetWindow = window.useWindow();
17
+ styles.useComponentCssInjection({
18
+ testId: "vuu-feature-list",
19
+ css: FeatureList$1,
20
+ window: targetWindow
21
+ });
22
+ const ViewProps = {};
23
+ const listProps = {
24
+ height: "100%"
25
+ };
26
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...htmlAttributes, className: classBase, children: [
27
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-header`, children: title }),
28
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-content`, children: /* @__PURE__ */ jsxRuntime.jsx(
29
+ vuuLayout.Palette,
30
+ {
31
+ orientation: "vertical",
32
+ ListProps: listProps,
33
+ ViewProps,
34
+ children: features.map((featureProps, i) => /* @__PURE__ */ jsxRuntime.jsx(
35
+ vuuLayout.PaletteItem,
36
+ {
37
+ closeable: true,
38
+ label: featureProps.title,
39
+ resizeable: true,
40
+ resize: "defer",
41
+ header: true,
42
+ children: /* @__PURE__ */ jsxRuntime.jsx(Feature.Feature, { ...featureProps })
43
+ },
44
+ i
45
+ ))
46
+ }
47
+ ) })
48
+ ] });
49
+ };
50
+
51
+ exports.FeatureList = FeatureList;
52
+ //# sourceMappingURL=FeatureList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureList.js","sources":["../../src/feature-list/FeatureList.tsx"],"sourcesContent":["import { Palette, PaletteItem } from \"@vuu-ui/vuu-layout\";\nimport { ListProps } from \"@vuu-ui/vuu-ui-controls\";\nimport { HTMLAttributes } from \"react\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\n\nimport { Feature, FeatureProps } from \"../feature/Feature\";\n\nimport featureListCss from \"./FeatureList.css\";\n\nconst classBase = \"vuuFeatureList\";\n\nexport interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {\n features: FeatureProps[];\n}\n\nexport const FeatureList = ({\n features,\n title = \"VUU TABLES\",\n ...htmlAttributes\n}: FeatureListProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-feature-list\",\n css: featureListCss,\n window: targetWindow,\n });\n\n const ViewProps = {};\n\n const listProps: Partial<ListProps> = {\n height: \"100%\",\n };\n\n return (\n <div {...htmlAttributes} className={classBase}>\n <div className={`${classBase}-header`}>{title}</div>\n <div className={`${classBase}-content`}>\n <Palette\n orientation=\"vertical\"\n ListProps={listProps}\n ViewProps={ViewProps}\n >\n {features.map((featureProps, i) => (\n <PaletteItem\n closeable\n key={i}\n label={featureProps.title}\n resizeable\n resize=\"defer\"\n header\n >\n <Feature {...featureProps} />\n </PaletteItem>\n ))}\n </Palette>\n </div>\n </div>\n );\n};\n"],"names":["useWindow","useComponentCssInjection","featureListCss","jsxs","jsx","Palette","PaletteItem","Feature"],"mappings":";;;;;;;;;AAUA,MAAM,SAAY,GAAA,gBAAA,CAAA;AAMX,MAAM,cAAc,CAAC;AAAA,EAC1B,QAAA;AAAA,EACA,KAAQ,GAAA,YAAA;AAAA,EACR,GAAG,cAAA;AACL,CAAwB,KAAA;AACtB,EAAA,MAAM,eAAeA,gBAAU,EAAA,CAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,kBAAA;AAAA,IACR,GAAK,EAAAC,aAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAED,EAAA,MAAM,YAAY,EAAC,CAAA;AAEnB,EAAA,MAAM,SAAgC,GAAA;AAAA,IACpC,MAAQ,EAAA,MAAA;AAAA,GACV,CAAA;AAEA,EAAA,uBACGC,eAAA,CAAA,KAAA,EAAA,EAAK,GAAG,cAAA,EAAgB,WAAW,SAClC,EAAA,QAAA,EAAA;AAAA,oBAAAC,cAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,WAAY,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,oBAC7CA,cAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,CAAA,EAAG,SAAS,CAC1B,QAAA,CAAA,EAAA,QAAA,kBAAAA,cAAA;AAAA,MAACC,iBAAA;AAAA,MAAA;AAAA,QACC,WAAY,EAAA,UAAA;AAAA,QACZ,SAAW,EAAA,SAAA;AAAA,QACX,SAAA;AAAA,QAEC,QAAS,EAAA,QAAA,CAAA,GAAA,CAAI,CAAC,YAAA,EAAc,CAC3B,qBAAAD,cAAA;AAAA,UAACE,qBAAA;AAAA,UAAA;AAAA,YACC,SAAS,EAAA,IAAA;AAAA,YAET,OAAO,YAAa,CAAA,KAAA;AAAA,YACpB,UAAU,EAAA,IAAA;AAAA,YACV,MAAO,EAAA,OAAA;AAAA,YACP,MAAM,EAAA,IAAA;AAAA,YAEN,QAAA,kBAAAF,cAAA,CAACG,eAAS,EAAA,EAAA,GAAG,YAAc,EAAA,CAAA;AAAA,WAAA;AAAA,UANtB,CAAA;AAAA,SAQR,CAAA;AAAA,OAAA;AAAA,KAEL,EAAA,CAAA;AAAA,GACF,EAAA,CAAA,CAAA;AAEJ;;;;"}