@vuu-ui/vuu-shell 0.8.32 → 0.8.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
- "name": "@vuu-ui/vuu-shell",
3
- "version": "0.8.32",
2
+ "version": "0.8.33",
4
3
  "description": "VUU UI Shell",
5
4
  "author": "heswell",
6
5
  "license": "Apache-2.0",
7
- "devDependnecies": {
8
- "@vuu-ui/vuu-data-types": "0.8.32",
9
- "@vuu-ui/vuu-protocol-types": "0.8.32",
10
- "@vuu-ui/vuu-table-types": "0.8.32"
6
+ "devDependencies": {
7
+ "@vuu-ui/vuu-data-types": "0.8.33",
8
+ "@vuu-ui/vuu-protocol-types": "0.8.33",
9
+ "@vuu-ui/vuu-table-types": "0.8.33"
11
10
  },
12
11
  "dependencies": {
13
12
  "@salt-ds/core": "1.17.0",
14
- "@vuu-ui/vuu-data-react": "0.8.32",
15
- "@vuu-ui/vuu-data-remote": "0.8.32",
16
- "@vuu-ui/vuu-icons": "0.8.32",
17
- "@vuu-ui/vuu-layout": "0.8.32",
18
- "@vuu-ui/vuu-popups": "0.8.32",
19
- "@vuu-ui/vuu-ui-controls": "0.8.32",
20
- "@vuu-ui/vuu-utils": "0.8.32",
13
+ "@vuu-ui/vuu-data-remote": "0.8.33",
14
+ "@vuu-ui/vuu-icons": "0.8.33",
15
+ "@vuu-ui/vuu-filters": "0.8.33",
16
+ "@vuu-ui/vuu-layout": "0.8.33",
17
+ "@vuu-ui/vuu-popups": "0.8.33",
18
+ "@vuu-ui/vuu-table": "0.8.33",
19
+ "@vuu-ui/vuu-ui-controls": "0.8.33",
20
+ "@vuu-ui/vuu-utils": "0.8.33",
21
21
  "html-to-image": "^1.11.11"
22
22
  },
23
23
  "peerDependencies": {
@@ -27,14 +27,11 @@
27
27
  },
28
28
  "sideEffects": false,
29
29
  "files": [
30
- "cjs",
31
- "esm",
32
- "index.css",
33
- "index.css.map",
30
+ "README.md",
34
31
  "/types"
35
32
  ],
36
- "style": "index.css",
37
- "module": "esm/index.js",
38
33
  "main": "cjs/index.js",
34
+ "module": "esm/index.js",
35
+ "name": "@vuu-ui/vuu-shell",
39
36
  "types": "types/index.d.ts"
40
37
  }
@@ -1,7 +1,7 @@
1
1
  import { DefaultColumnConfiguration, ListOption } from "@vuu-ui/vuu-table-types";
2
- import { RpcResponseHandler } from "@vuu-ui/vuu-data-react";
2
+ import type { RpcResponseHandler } from "@vuu-ui/vuu-data-types";
3
3
  import { ReactElement, ReactNode } from "react";
4
- import { VuuTable } from "@vuu-ui/vuu-protocol-types";
4
+ import type { VuuTable } from "@vuu-ui/vuu-protocol-types";
5
5
  export type LookupTableProvider = (table: VuuTable) => ListOption[];
6
6
  export interface ShellContextProps {
7
7
  getDefaultColumnConfig?: DefaultColumnConfiguration;
@@ -2,3 +2,4 @@ export * from "./SaveLayoutPanel";
2
2
  export * from "./LayoutList";
3
3
  export * from "./layoutTypes";
4
4
  export * from "./useLayoutManager";
5
+ export * from "./useLayoutContextMenuItems";
@@ -1,5 +1,5 @@
1
1
  import { PersistenceManager } from "./PersistenceManager";
2
- import { ApplicationJSON, LayoutJSON } from "@vuu-ui/vuu-layout/src/layout-reducer";
2
+ import { ApplicationJSON, LayoutJSON } from "@vuu-ui/vuu-layout";
3
3
  import { LayoutMetadata, LayoutMetadataDto } from "../layout-management";
4
4
  export type CreateLayoutResponseDto = {
5
5
  metadata: LayoutMetadata;
@@ -2,4 +2,3 @@ export * from "./defaultApplicationJson";
2
2
  export * from "./PersistenceManager";
3
3
  export * from "./LocalPersistenceManager";
4
4
  export * from "./RemotePersistenceManager";
5
- export * from "./useLayoutContextMenuItems";
package/LICENSE DELETED
@@ -1,201 +0,0 @@
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/cjs/index.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";var Bo=Object.create;var Ue=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Zo=Object.getPrototypeOf,qo=Object.prototype.hasOwnProperty;var zo=(e,t)=>{for(var o in t)Ue(e,o,{get:t[o],enumerable:!0})},Ft=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Uo(t))!qo.call(e,r)&&r!==o&&Ue(e,r,{get:()=>t[r],enumerable:!(a=Oo(t,r))||a.enumerable});return e};var V=(e,t,o)=>(o=e!=null?Bo(Zo(e)):{},Ft(t||!e||!e.__esModule?Ue(o,"default",{value:e,enumerable:!0}):o,e)),Jo=e=>Ft(Ue({},"__esModule",{value:!0}),e);var kt=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)};var lt=(e,t,o)=>(kt(e,t,"read from private field"),o?o.call(e):t.get(e)),Dt=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o)},At=(e,t,o,a)=>(kt(e,t,"write to private field"),a?a.call(e,o):t.set(e,o),o);var Ya={};zo(Ya,{AppHeader:()=>dt,ConnectionStatusIcon:()=>Go,ContextPanel:()=>Pt,Feature:()=>ke,FeatureList:()=>tt,LayoutList:()=>wt,LayoutManagementContext:()=>Lt,LayoutManagementProvider:()=>Ia,LeftNav:()=>Ba,LoginPanel:()=>_o,SaveLayoutPanel:()=>yt,SessionEditingForm:()=>Ua,Shell:()=>za,ShellContextProvider:()=>Qa,SidePanel:()=>Mt,ThemeSwitch:()=>Xa,getAuthDetailsFromCookies:()=>Ee,getAuthModeFromCookies:()=>$t,isTableSchema:()=>_a,isWildcardSchema:()=>Ja,logout:()=>ct,redirectToLogin:()=>Bt,useLayoutManager:()=>ce,useShellContext:()=>ja,useShellLayout:()=>Et});module.exports=Jo(Ya);var Ot=require("react"),Ut=require("@vuu-ui/vuu-ui-controls"),Zt=V(require("clsx"));var Q=require("react"),oe=require("@salt-ds/core"),ut=require("@vuu-ui/vuu-ui-controls");var Ht=require("react"),v=require("react/jsx-runtime"),Rt=()=>(0,Ht.useMemo)(()=>(0,v.jsxs)("svg",{width:"184",height:"90",viewBox:"0 0 184 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,v.jsxs)("g",{clipPath:"url(#clip0_1173_59965)",children:[(0,v.jsx)("path",{d:"M77.0775 31.1019L69.4572 15.1795L66.3997 13.7093L47.6353 44.165L75.7224 61.2361L81.8124 51.2694L77.0775 31.1019Z",fill:"url(#paint0_linear_1173_59965)"}),(0,v.jsx)("path",{d:"M82.4101 49.7431C81.0488 51.8314 79.1993 53.648 76.8897 54.9809C74.2954 56.4792 71.4601 57.194 68.6623 57.194C63.3422 57.194 58.1597 54.6188 55.0209 49.971L30.5358 7.8193L30.5232 7.84116C25.8791 0.274825 16.0118 -2.26289 8.27258 2.21011C0.411306 6.74866 -2.26753 16.7872 2.28587 24.625L35.5054 81.8189C36.9856 84.3691 39.0542 86.3668 41.4358 87.7527C41.4545 87.7652 41.4733 87.7777 41.4921 87.7902C41.5015 87.7964 41.514 87.8027 41.5234 87.8089C42.6312 88.4457 43.8079 88.942 45.0253 89.3072C45.116 89.3353 45.2099 89.3634 45.3007 89.3883C45.7388 89.5101 46.1801 89.6193 46.6276 89.7067C46.7121 89.7223 46.7966 89.7317 46.8811 89.7473C47.241 89.8097 47.604 89.8628 47.967 89.9003C48.111 89.9159 48.2549 89.9315 48.3989 89.9408C48.8151 89.9752 49.2313 89.997 49.6507 90.0001C49.6726 90.0001 49.6945 90.0001 49.7132 90.0001C49.7195 90.0001 49.7226 90.0001 49.7289 90.0001C49.7352 90.0001 49.7383 90.0001 49.7445 90.0001C50.1983 90.0001 50.6552 89.9752 51.109 89.9377C51.2123 89.9283 51.3155 89.919 51.422 89.9065C51.8663 89.8597 52.3107 89.8004 52.7551 89.7192C52.7614 89.7192 52.7676 89.7192 52.7739 89.7192C53.2621 89.6287 53.7503 89.5101 54.2322 89.3727C54.2635 89.3634 54.2917 89.354 54.323 89.3446C55.024 89.1418 55.7156 88.8889 56.3978 88.5861C56.4104 88.5799 56.426 88.5736 56.4385 88.5674C56.958 88.3364 57.4712 88.0836 57.9751 87.7933C58.4852 87.4999 58.9703 87.1815 59.4334 86.8413C59.8371 86.5478 60.2252 86.2357 60.6039 85.9048C61.0639 85.499 61.4989 85.0745 61.9026 84.6282C62.2062 84.2942 62.4972 83.9446 62.7757 83.5825C62.8665 83.4639 62.951 83.3421 63.0355 83.2235C63.2264 82.9613 63.4079 82.6929 63.5831 82.4182C63.6739 82.2746 63.7646 82.1342 63.8523 81.9906C63.8867 81.9344 63.9242 81.8813 63.9555 81.8251L82.5854 49.7525H82.4039L82.4101 49.7431Z",fill:"url(#paint1_linear_1173_59965)"}),(0,v.jsx)("path",{d:"M82.8264 32.8436L81.4181 30.4464L75.3375 19.1687L72.5178 14.3929C71.9858 13.1225 70.7309 12.2266 69.26 12.2266C67.3104 12.2266 65.7331 13.8029 65.7331 15.7445C65.7331 16.4031 65.924 17.0086 66.2401 17.5362L66.2025 17.5611L77.1557 36.1617C78.4764 38.4372 78.83 41.0873 78.1509 43.6281C77.4718 46.169 75.8445 48.2915 73.5631 49.6119C72.0609 50.4797 70.3553 50.9385 68.6341 50.9385C65.1166 50.9385 61.84 49.0563 60.0812 46.0285L44.3368 19.2654H44.3681L37.7179 7.81917L37.7054 7.84102C37.5896 7.65061 37.455 7.47893 37.333 7.29477L37.1452 6.97326C37.1452 6.97326 37.1296 6.98262 37.1233 6.98887C34.0001 2.55332 29.0054 0.0780356 23.8512 0.0187285V0H15.3515V0.0436999C21.2881 -0.368328 27.2247 2.46593 30.5232 7.84102L30.5357 7.81917L55.0177 49.974C58.1566 54.6187 63.3422 57.197 68.6592 57.197C71.4569 57.197 74.2922 56.4853 76.8866 54.9839C79.1961 53.651 81.0425 51.8312 82.407 49.7461H82.5885L82.5259 49.8523C83.399 48.4695 84.0687 46.9462 84.5006 45.3231C85.6304 41.0904 85.042 36.6705 82.8201 32.8467L82.8264 32.8436Z",fill:"#F37880"}),(0,v.jsxs)("g",{opacity:"0.86",children:[(0,v.jsx)("path",{d:"M66.1994 17.5642L77.1526 36.1648C78.4732 38.4403 78.8269 41.0904 78.1478 43.6313C77.7347 45.1795 76.9648 46.5716 75.9133 47.7234C77.2903 46.4686 78.2823 44.8486 78.7737 43.007C79.4527 40.4661 79.0991 37.816 77.7785 35.5405L66.8253 16.94L66.8628 16.915C66.5467 16.3875 66.3558 15.7819 66.3558 15.1233C66.3558 14.3117 66.6344 13.5657 67.0975 12.9695C66.2651 13.6125 65.7299 14.6176 65.7299 15.7476C65.7299 16.4062 65.9208 17.0118 66.2369 17.5393L66.1994 17.5642Z",fill:"white"}),(0,v.jsx)("path",{d:"M82.5382 49.8335L82.5291 49.8487C82.5291 49.8487 82.5352 49.8365 82.5413 49.8304C82.5413 49.8304 82.5413 49.8304 82.5413 49.8335H82.5382Z",fill:"white"}),(0,v.jsx)("path",{d:"M77.5156 54.3596C74.9213 55.8579 72.0859 56.5727 69.2882 56.5727C63.9681 56.5727 58.7856 53.9975 55.6467 49.3497L31.1616 7.19488L31.1491 7.21673C28.9053 3.56154 25.4441 1.08626 21.5917 0H15.3515V0.0436999C21.2881 -0.368328 27.2247 2.46593 30.5232 7.84102L30.5357 7.81917L55.0177 49.974C58.1566 54.6187 63.3422 57.197 68.6592 57.197C71.4569 57.197 74.2922 56.4853 76.8866 54.9839C78.2698 54.1848 79.4809 53.2109 80.5293 52.1122C79.6311 52.9581 78.6266 53.7166 77.5125 54.3596H77.5156Z",fill:"white"})]})]}),(0,v.jsx)("path",{d:"M117.046 58.661C116.362 58.661 115.792 58.509 115.336 58.205C114.906 57.8757 114.551 57.3943 114.272 56.761L104.354 34.493C104.076 33.8597 104 33.3023 104.126 32.821C104.253 32.3397 104.519 31.9597 104.924 31.681C105.33 31.4023 105.811 31.263 106.368 31.263C107.103 31.263 107.648 31.4277 108.002 31.757C108.382 32.061 108.699 32.5297 108.952 33.163L117.958 54.025H116.324L125.292 33.125C125.571 32.517 125.9 32.061 126.28 31.757C126.66 31.4277 127.192 31.263 127.876 31.263C128.434 31.263 128.89 31.4023 129.244 31.681C129.624 31.9597 129.865 32.3397 129.966 32.821C130.068 33.3023 129.979 33.8597 129.7 34.493L119.782 56.761C119.504 57.3943 119.149 57.8757 118.718 58.205C118.313 58.509 117.756 58.661 117.046 58.661Z",fill:"white"}),(0,v.jsx)("path",{d:"M144.63 58.737C142.781 58.737 141.147 58.4963 139.728 58.015C138.335 57.5337 137.157 56.8243 136.194 55.887C135.232 54.9243 134.51 53.7337 134.028 52.315C133.547 50.8963 133.306 49.2497 133.306 47.375V33.733C133.306 32.897 133.509 32.2763 133.914 31.871C134.345 31.4657 134.953 31.263 135.738 31.263C136.524 31.263 137.119 31.4657 137.524 31.871C137.955 32.2763 138.17 32.897 138.17 33.733V47.337C138.17 49.7437 138.715 51.555 139.804 52.771C140.919 53.9617 142.528 54.557 144.63 54.557C146.733 54.557 148.329 53.9617 149.418 52.771C150.508 51.555 151.052 49.7437 151.052 47.337V33.733C151.052 32.897 151.255 32.2763 151.66 31.871C152.091 31.4657 152.699 31.263 153.484 31.263C154.244 31.263 154.827 31.4657 155.232 31.871C155.663 32.2763 155.878 32.897 155.878 33.733V47.375C155.878 49.8577 155.448 51.9477 154.586 53.645C153.75 55.3423 152.496 56.6217 150.824 57.483C149.152 58.319 147.088 58.737 144.63 58.737Z",fill:"white"}),(0,v.jsx)("path",{d:"M172.685 58.737C170.836 58.737 169.202 58.4963 167.783 58.015C166.39 57.5337 165.212 56.8243 164.249 55.887C163.286 54.9243 162.564 53.7337 162.083 52.315C161.602 50.8963 161.361 49.2497 161.361 47.375V33.733C161.361 32.897 161.564 32.2763 161.969 31.871C162.4 31.4657 163.008 31.263 163.793 31.263C164.578 31.263 165.174 31.4657 165.579 31.871C166.01 32.2763 166.225 32.897 166.225 33.733V47.337C166.225 49.7437 166.77 51.555 167.859 52.771C168.974 53.9617 170.582 54.557 172.685 54.557C174.788 54.557 176.384 53.9617 177.473 52.771C178.562 51.555 179.107 49.7437 179.107 47.337V33.733C179.107 32.897 179.31 32.2763 179.715 31.871C180.146 31.4657 180.754 31.263 181.539 31.263C182.299 31.263 182.882 31.4657 183.287 31.871C183.718 32.2763 183.933 32.897 183.933 33.733V47.375C183.933 49.8577 183.502 51.9477 182.641 53.645C181.805 55.3423 180.551 56.6217 178.879 57.483C177.207 58.319 175.142 58.737 172.685 58.737Z",fill:"white"}),(0,v.jsxs)("defs",{children:[(0,v.jsxs)("linearGradient",{id:"paint0_linear_1173_59965",x1:"47.6353",y1:"37.4727",x2:"81.8124",y2:"37.4727",gradientUnits:"userSpaceOnUse",children:[(0,v.jsx)("stop",{stopColor:"#4906A5"}),(0,v.jsx)("stop",{offset:"1",stopColor:"#D3423A"})]}),(0,v.jsxs)("linearGradient",{id:"paint1_linear_1173_59965",x1:"0.0670626",y1:"45.0017",x2:"82.5916",y2:"45.0017",gradientUnits:"userSpaceOnUse",children:[(0,v.jsx)("stop",{stopColor:"#7C06A5"}),(0,v.jsx)("stop",{offset:"1",stopColor:"#D3423A"})]}),(0,v.jsx)("clipPath",{id:"clip0_1173_59965",children:(0,v.jsx)("rect",{width:"85",height:"90",fill:"white",transform:"translate(0.0670471)"})})]})]}),[]);var It=V(require("clsx"));var M=require("react/jsx-runtime"),ie="vuuLoginPanel",_o=({appName:e="Demo App",className:t,requirePassword:o=!0,onSubmit:a,...r})=>{let[n,i]=(0,Q.useState)(""),[s,l]=(0,Q.useState)(""),c=(0,Q.useRef)(null),m=()=>{a(n,s)},y=h=>{i(h.target.value)},N=h=>{l(h.target.value)},C=(0,Q.useCallback)(()=>{o||a(n)},[a,o,n]),d=(0,Q.useCallback)(()=>{n&&a(n,s)},[a,s,n]),u=n.trim()!==""&&(o===!1||s.trim()!=="");return(0,Q.useEffect)(()=>{var h;console.log("inputRef",{input:c.current}),(h=c.current)==null||h.focus()},[]),(0,M.jsxs)("div",{...r,className:(0,It.default)(ie,t),children:[(0,M.jsxs)("div",{className:`${ie}-branding`,children:[(0,M.jsx)(Rt,{}),(0,M.jsx)("div",{className:`${ie}-appName`,children:e})]}),(0,M.jsxs)("div",{className:`${ie}-form`,children:[(0,M.jsx)("div",{className:`${ie}-title`,children:"Welcome Back"}),(0,M.jsxs)(oe.FormField,{children:[(0,M.jsx)(oe.FormFieldLabel,{children:"Username"}),(0,M.jsx)(ut.VuuInput,{value:n,id:"text-username",inputRef:c,onChange:y,onCommit:C})]}),o?(0,M.jsxs)(oe.FormField,{children:[(0,M.jsx)(oe.FormFieldLabel,{children:"Password"}),(0,M.jsx)(ut.VuuInput,{className:`${ie}-password`,inputProps:{type:"password"},value:s,id:"text-password",onChange:N,onCommit:d,endAdornment:(0,M.jsx)("span",{"data-icon":"eye",style:{cursor:"pointer"}})})]}):null,(0,M.jsx)(oe.Button,{className:`${ie}-login`,disabled:!u,onClick:m,variant:"cta",children:"Login"})]})]})};var Ze=require("@vuu-ui/vuu-utils"),$t=()=>{let e=(0,Ze.getCookieValue)("vuu-auth-mode");return e!=null?e:""},Ee=()=>{let e=(0,Ze.getCookieValue)("vuu-username"),t=(0,Ze.getCookieValue)("vuu-auth-token");return[e,t]},Wo=()=>$t()==="login"?"login.html":"demo.html",Bt=(e=Wo())=>{window.location.href=e},ct=e=>{document.cookie="vuu-username= ; expires = Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="vuu-auth-token= ; expires = Thu, 01 Jan 1970 00:00:00 GMT",Bt(e)};var Ve=require("@salt-ds/core");var K=require("react/jsx-runtime"),Ne="vuuAppHeader",dt=({className:e,layoutId:t,loginUrl:o,onNavigate:a,onSwitchTheme:r,themeMode:n,user:i,...s})=>{let l=(0,Zt.default)(Ne,e),c=(0,Ot.useCallback)(()=>{ct(o)},[o]);return(0,K.jsxs)(Ut.Toolbar,{alignItems:"end",className:l,showSeparators:!0,...s,children:[(0,K.jsx)(Ve.Button,{className:`${Ne}-menuItem`,variant:"secondary",children:"Help"}),(0,K.jsxs)(Ve.Button,{className:`${Ne}-menuItem`,variant:"secondary",children:["History ",(0,K.jsx)("span",{"data-icon":"history"})]}),(0,K.jsxs)(Ve.Button,{className:`${Ne}-menuItem`,variant:"secondary",children:["View ",(0,K.jsx)("span",{"data-icon":"settings"})]}),(0,K.jsx)(Ve.Button,{className:`${Ne}-menuItem`,onClick:c,variant:"secondary",children:"Log out"})]})};var ve=V(require("react")),qt=V(require("clsx"));var se=require("react/jsx-runtime"),Go=({connectionStatus:e,className:t,element:o="span",...a})=>{let[r,n]=(0,ve.useState)("vuuConnectingStatus");(0,ve.useEffect)(()=>{switch(e){case"connected":case"reconnected":n("vuuActiveStatus");break;case"connecting":n("vuuConnectingStatus");break;case"disconnected":n("vuuDisconnectedStatus");break;default:break}},[e]);let i=ve.default.createElement(o,{...a,className:(0,qt.default)("vuuStatus vuuIcon",r,t)});return(0,se.jsx)(se.Fragment,{children:(0,se.jsxs)("div",{className:"vuuStatus-container salt-theme",children:[i,(0,se.jsxs)("div",{className:"vuuStatus-text",children:["Status: ",e.toUpperCase()]})]})})};var ue=V(require("react")),Gt=require("@vuu-ui/vuu-layout");var zt=V(require("react")),le=require("react/jsx-runtime"),qe=class extends zt.default.Component{constructor(t){super(t),this.state={errorMessage:null}}static getDerivedStateFromError(t){return{errorMessage:t.message}}componentDidCatch(t,o){console.log(`error creating component at ${this.props.url}`),console.log(t,o)}render(){return this.state.errorMessage?(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("h1",{children:"An error occured while creating component."}),(0,le.jsx)("p",{children:this.state.errorMessage})]}):this.props.children}};var _t=require("react/jsx-runtime"),Jt=()=>(0,_t.jsx)("div",{className:"hwLoader"});var Wt=async e=>{let t=new CSSStyleSheet;return fetch(e).then(o=>o.text()).then(o=>t.replace(o))};var Fe=require("react/jsx-runtime"),ze=new Map,Qo=e=>{(0,ue.useEffect)(()=>()=>{ze.delete(e)},[e]),ze.has(e)||ze.set(e,ue.default.lazy(()=>import(e)));let t=ze.get(e);if(t)return t;throw Error(`Unable to load Lazy Feature at url ${e}`)};function jo({url:e,css:t,ComponentProps:o,...a}){t&&Wt(t).then(n=>{document.adoptedStyleSheets=[...document.adoptedStyleSheets,n]});let r=Qo(e);return(0,Fe.jsx)(qe,{url:e,children:(0,Fe.jsx)(ue.Suspense,{fallback:(0,Fe.jsx)(Jt,{}),children:(0,Fe.jsx)(r,{...a,...o})})})}var ke=ue.default.memo(jo);ke.displayName="Feature";(0,Gt.registerComponent)("Feature",ke,"view");var be=require("@vuu-ui/vuu-ui-controls");function Qt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let o=document.implementation.createHTMLDocument(),a=o.createElement("base"),r=o.createElement("a");return o.head.appendChild(a),o.body.appendChild(r),t&&(a.href=t),r.href=e,r.href}var jt=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function k(e){let t=[];for(let o=0,a=e.length;o<a;o++)t.push(e[o]);return t}function Je(e,t){let a=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return a?parseFloat(a.replace("px","")):0}function Ko(e){let t=Je(e,"border-left-width"),o=Je(e,"border-right-width");return e.clientWidth+t+o}function Xo(e){let t=Je(e,"border-top-width"),o=Je(e,"border-bottom-width");return e.clientHeight+t+o}function pt(e,t={}){let o=t.width||Ko(e),a=t.height||Xo(e);return{width:o,height:a}}function Kt(){let e,t;try{t=process}catch{}let o=t&&t.env?t.env.devicePixelRatio:null;return o&&(e=parseInt(o,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var F=16384;function Xt(e){(e.width>F||e.height>F)&&(e.width>F&&e.height>F?e.width>e.height?(e.height*=F/e.width,e.width=F):(e.width*=F/e.height,e.height=F):e.width>F?(e.height*=F/e.width,e.width=F):(e.width*=F/e.height,e.height=F))}function ye(e){return new Promise((t,o)=>{let a=new Image;a.decode=()=>t(a),a.onload=()=>t(a),a.onerror=o,a.crossOrigin="anonymous",a.decoding="async",a.src=e})}async function Yo(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Yt(e,t,o){let a="http://www.w3.org/2000/svg",r=document.createElementNS(a,"svg"),n=document.createElementNS(a,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${o}`),r.setAttribute("viewBox",`0 0 ${t} ${o}`),n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("externalResourcesRequired","true"),r.appendChild(n),n.appendChild(e),Yo(r)}var E=(e,t)=>{if(e instanceof t)return!0;let o=Object.getPrototypeOf(e);return o===null?!1:o.constructor.name===t.name||E(o,t)};function ea(e){let t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function ta(e){return k(e).map(t=>{let o=e.getPropertyValue(t),a=e.getPropertyPriority(t);return`${t}: ${o}${a?" !important":""};`}).join(" ")}function oa(e,t,o){let a=`.${e}:${t}`,r=o.cssText?ea(o):ta(o);return document.createTextNode(`${a}{${r}}`)}function eo(e,t,o){let a=window.getComputedStyle(e,o),r=a.getPropertyValue("content");if(r===""||r==="none")return;let n=jt();try{t.className=`${t.className} ${n}`}catch{return}let i=document.createElement("style");i.appendChild(oa(n,o,a)),t.appendChild(i)}function to(e,t){eo(e,t,":before"),eo(e,t,":after")}var oo="application/font-woff",ao="image/jpeg",aa={woff:oo,woff2:oo,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ao,jpeg:ao,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function na(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function xe(e){let t=na(e).toLowerCase();return aa[t]||""}function ra(e){return e.split(/,/)[1]}function De(e){return e.search(/^(data:)/)!==-1}function ht(e,t){return`data:${t};base64,${e}`}async function ft(e,t,o){let a=await fetch(e,t);if(a.status===404)throw new Error(`Resource "${a.url}" not found`);let r=await a.blob();return new Promise((n,i)=>{let s=new FileReader;s.onerror=i,s.onloadend=()=>{try{n(o({res:a,result:s.result}))}catch(l){i(l)}},s.readAsDataURL(r)})}var mt={};function ia(e,t,o){let a=e.replace(/\?.*/,"");return o&&(a=e),/ttf|otf|eot|woff2?/i.test(a)&&(a=a.replace(/.*\//,"")),t?`[${t}]${a}`:a}async function Le(e,t,o){let a=ia(e,t,o.includeQueryParams);if(mt[a]!=null)return mt[a];o.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{let n=await ft(e,o.fetchRequestInit,({res:i,result:s})=>(t||(t=i.headers.get("Content-Type")||""),ra(s)));r=ht(n,t)}catch(n){r=o.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;n&&(i=typeof n=="string"?n:n.message),i&&console.warn(i)}return mt[a]=r,r}async function sa(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ye(t)}async function la(e,t){if(e.currentSrc){let n=document.createElement("canvas"),i=n.getContext("2d");n.width=e.clientWidth,n.height=e.clientHeight,i==null||i.drawImage(e,0,0,n.width,n.height);let s=n.toDataURL();return ye(s)}let o=e.poster,a=xe(o),r=await Le(o,a,t);return ye(r)}async function ua(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await Ae(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function ca(e,t){return E(e,HTMLCanvasElement)?sa(e):E(e,HTMLVideoElement)?la(e,t):E(e,HTMLIFrameElement)?ua(e):e.cloneNode(!1)}var da=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function pa(e,t,o){var a,r;let n=[];return da(e)&&e.assignedNodes?n=k(e.assignedNodes()):E(e,HTMLIFrameElement)&&(!((a=e.contentDocument)===null||a===void 0)&&a.body)?n=k(e.contentDocument.body.childNodes):n=k(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),n.length===0||E(e,HTMLVideoElement)||await n.reduce((i,s)=>i.then(()=>Ae(s,o)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function ma(e,t){let o=t.style;if(!o)return;let a=window.getComputedStyle(e);a.cssText?(o.cssText=a.cssText,o.transformOrigin=a.transformOrigin):k(a).forEach(r=>{let n=a.getPropertyValue(r);r==="font-size"&&n.endsWith("px")&&(n=`${Math.floor(parseFloat(n.substring(0,n.length-2)))-.1}px`),E(e,HTMLIFrameElement)&&r==="display"&&n==="inline"&&(n="block"),r==="d"&&t.getAttribute("d")&&(n=`path(${t.getAttribute("d")})`),o.setProperty(r,n,a.getPropertyPriority(r))})}function ha(e,t){E(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),E(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function fa(e,t){if(E(e,HTMLSelectElement)){let o=t,a=Array.from(o.children).find(r=>e.value===r.getAttribute("value"));a&&a.setAttribute("selected","")}}function ga(e,t){return E(t,Element)&&(ma(e,t),to(e,t),ha(e,t),fa(e,t)),t}async function va(e,t){let o=e.querySelectorAll?e.querySelectorAll("use"):[];if(o.length===0)return e;let a={};for(let n=0;n<o.length;n++){let s=o[n].getAttribute("xlink:href");if(s){let l=e.querySelector(s),c=document.querySelector(s);!l&&c&&!a[s]&&(a[s]=await Ae(c,t,!0))}}let r=Object.values(a);if(r.length){let n="http://www.w3.org/1999/xhtml",i=document.createElementNS(n,"svg");i.setAttribute("xmlns",n),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";let s=document.createElementNS(n,"defs");i.appendChild(s);for(let l=0;l<r.length;l++)s.appendChild(r[l]);e.appendChild(i)}return e}async function Ae(e,t,o){return!o&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(a=>ca(a,t)).then(a=>pa(e,a,t)).then(a=>ga(e,a)).then(a=>va(a,t))}var no=/url\((['"]?)([^'"]+?)\1\)/g,ya=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,xa=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function La(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ba(e){let t=[];return e.replace(no,(o,a,r)=>(t.push(r),o)),t.filter(o=>!De(o))}async function wa(e,t,o,a,r){try{let n=o?Qt(t,o):t,i=xe(t),s;if(r){let l=await r(n);s=ht(l,i)}else s=await Le(n,i,a);return e.replace(La(t),`$1${s}$3`)}catch{}return e}function Ca(e,{preferredFontFormat:t}){return t?e.replace(xa,o=>{for(;;){let[a,,r]=ya.exec(o)||[];if(!r)return"";if(r===t)return`src: ${a};`}}):e}function gt(e){return e.search(no)!==-1}async function _e(e,t,o){if(!gt(e))return e;let a=Ca(e,o);return ba(a).reduce((n,i)=>n.then(s=>wa(s,i,t,o)),Promise.resolve(a))}async function We(e,t,o){var a;let r=(a=t.style)===null||a===void 0?void 0:a.getPropertyValue(e);if(r){let n=await _e(r,null,o);return t.style.setProperty(e,n,t.style.getPropertyPriority(e)),!0}return!1}async function Sa(e,t){await We("background",e,t)||await We("background-image",e,t),await We("mask",e,t)||await We("mask-image",e,t)}async function Ta(e,t){let o=E(e,HTMLImageElement);if(!(o&&!De(e.src))&&!(E(e,SVGImageElement)&&!De(e.href.baseVal)))return;let a=o?e.src:e.href.baseVal,r=await Le(a,xe(a),t);await new Promise((n,i)=>{e.onload=n,e.onerror=i;let s=e;s.decode&&(s.decode=n),s.loading==="lazy"&&(s.loading="eager"),o?(e.srcset="",e.src=r):e.href.baseVal=r})}async function Pa(e,t){let a=k(e.childNodes).map(r=>vt(r,t));await Promise.all(a).then(()=>e)}async function vt(e,t){E(e,Element)&&(await Sa(e,t),await Ta(e,t),await Pa(e,t))}function ro(e,t){let{style:o}=e;t.backgroundColor&&(o.backgroundColor=t.backgroundColor),t.width&&(o.width=`${t.width}px`),t.height&&(o.height=`${t.height}px`);let a=t.style;return a!=null&&Object.keys(a).forEach(r=>{o[r]=a[r]}),e}var io={};async function so(e){let t=io[e];if(t!=null)return t;let a=await(await fetch(e)).text();return t={url:e,cssText:a},io[e]=t,t}async function lo(e,t){let o=e.cssText,a=/url\(["']?([^"')]+)["']?\)/g,n=(o.match(/url\([^)]+\)/g)||[]).map(async i=>{let s=i.replace(a,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),ft(s,t.fetchRequestInit,({result:l})=>(o=o.replace(i,`url(${l})`),[i,l]))});return Promise.all(n).then(()=>o)}function uo(e){if(e==null)return[];let t=[],o=/(\/\*[\s\S]*?\*\/)/gi,a=e.replace(o,""),r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let l=r.exec(a);if(l===null)break;t.push(l[0])}a=a.replace(r,"");let n=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(i,"gi");for(;;){let l=n.exec(a);if(l===null){if(l=s.exec(a),l===null)break;n.lastIndex=s.lastIndex}else s.lastIndex=n.lastIndex;t.push(l[0])}return t}async function Ma(e,t){let o=[],a=[];return e.forEach(r=>{if("cssRules"in r)try{k(r.cssRules||[]).forEach((n,i)=>{if(n.type===CSSRule.IMPORT_RULE){let s=i+1,l=n.href,c=so(l).then(m=>lo(m,t)).then(m=>uo(m).forEach(y=>{try{r.insertRule(y,y.startsWith("@import")?s+=1:r.cssRules.length)}catch(N){console.error("Error inserting rule from remote css",{rule:y,error:N})}})).catch(m=>{console.error("Error loading remote css",m.toString())});a.push(c)}})}catch(n){let i=e.find(s=>s.href==null)||document.styleSheets[0];r.href!=null&&a.push(so(r.href).then(s=>lo(s,t)).then(s=>uo(s).forEach(l=>{i.insertRule(l,r.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",n)}}),Promise.all(a).then(()=>(e.forEach(r=>{if("cssRules"in r)try{k(r.cssRules||[]).forEach(n=>{o.push(n)})}catch(n){console.error(`Error while reading CSS rules from ${r.href}`,n)}}),o))}function Ea(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>gt(t.style.getPropertyValue("src")))}async function Na(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");let o=k(e.ownerDocument.styleSheets),a=await Ma(o,t);return Ea(a)}async function co(e,t){let o=await Na(e,t);return(await Promise.all(o.map(r=>{let n=r.parentStyleSheet?r.parentStyleSheet.href:null;return _e(r.cssText,n,t)}))).join(`
2
- `)}async function po(e,t){let o=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await co(e,t);if(o){let a=document.createElement("style"),r=document.createTextNode(o);a.appendChild(r),e.firstChild?e.insertBefore(a,e.firstChild):e.appendChild(a)}}async function Va(e,t={}){let{width:o,height:a}=pt(e,t),r=await Ae(e,t,!0);return await po(r,t),await vt(r,t),ro(r,t),await Yt(r,o,a)}async function Fa(e,t={}){let{width:o,height:a}=pt(e,t),r=await Va(e,t),n=await ye(r),i=document.createElement("canvas"),s=i.getContext("2d"),l=t.pixelRatio||Kt(),c=t.canvasWidth||o,m=t.canvasHeight||a;return i.width=c*l,i.height=m*l,t.skipAutoScale||Xt(i),i.style.width=`${c}`,i.style.height=`${m}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,i.width,i.height)),s.drawImage(n,0,0,i.width,i.height),i}async function mo(e,t={}){return(await Fa(e,t)).toDataURL()}var ho=e=>new Promise((t,o)=>{mo(e,{cacheBust:!0}).then(a=>{a||o(new Error("No Screenshot available")),t(a)}).catch(a=>{console.error("the following error occurred while taking a screenshot of a DOMNode",a),o(new Error("Error taking screenshot"))})});var T=require("@salt-ds/core"),Z=require("react");var g=require("react/jsx-runtime"),D="saveLayoutPanel",Ge=`${D}-formField`,ka=["Group 1","Group 2","Group 3","Group 4","Group 5"],Da=["Value 1","Value 2","Value 3"],fo=["Value 1","Value 2","Value 3"],yt=e=>{let{defaultTitle:t="",onCancel:o,onSave:a,componentId:r}=e,[n,i]=(0,Z.useState)(t),[s,l]=(0,Z.useState)(""),[c,m]=(0,Z.useState)([]),[y,N]=(0,Z.useState)(fo[0]),[C,d]=(0,Z.useState)(),[u,h]=(0,Z.useState)(),[P]=Ee();(0,Z.useEffect)(()=>{r&&ho(document.getElementById(r)).then(f=>{d(f)}).catch(f=>{h(f.message)})},[r]);let W=()=>{a({name:n,group:s,screenshot:C!=null?C:"",user:P})},R=(0,Z.useMemo)(()=>C?(0,g.jsx)("img",{className:`${D}-screenshot`,src:C,alt:"screenshot of current layout"}):u?(0,g.jsx)(T.Text,{children:u}):(0,g.jsx)("div",{className:"spinner"}),[C,u]);return(0,g.jsxs)("div",{className:`${D}-panelContainer`,children:[(0,g.jsxs)("div",{className:`${D}-panelContent`,children:[(0,g.jsxs)("div",{className:`${D}-formContainer`,children:[(0,g.jsxs)(T.FormField,{className:Ge,children:[(0,g.jsx)(T.FormFieldLabel,{children:"Group"}),(0,g.jsx)(be.ComboBox,{source:ka,allowFreeText:!0,InputProps:{inputProps:{className:`${D}-inputText`,placeholder:"Select Group or Enter New Name",onChange:f=>l(f.target.value)}},width:"100%",onSelectionChange:(f,I)=>l(I||"")})]}),(0,g.jsxs)(T.FormField,{className:Ge,children:[(0,g.jsx)(T.FormFieldLabel,{children:"Layout Name"}),(0,g.jsx)(T.Input,{inputProps:{className:`${D}-inputText`,placeholder:"Enter Layout Name"},onChange:f=>i(f.target.value),value:n})]}),(0,g.jsxs)(T.FormField,{className:Ge,children:[(0,g.jsx)(T.FormFieldLabel,{children:"Some Layout Setting"}),(0,g.jsx)("div",{className:`${D}-settingsGroup`,children:Da.map((f,I)=>(0,g.jsx)(be.Checkbox,{onToggle:()=>m(S=>S.includes(f)?S.filter(A=>A!==f):[...S,f]),checked:c.includes(f),label:f},I))})]}),(0,g.jsxs)(T.FormField,{className:Ge,children:[(0,g.jsx)(T.FormFieldLabel,{children:"Some Layout Setting"}),(0,g.jsx)("div",{className:`${D}-settingsGroup`,children:fo.map((f,I)=>(0,g.jsx)(be.RadioButton,{onClick:()=>N(f),checked:y===f,label:f,groupName:"radioGroup"},I))})]})]}),(0,g.jsx)("div",{className:`${D}-screenshotContainer`,children:R})]}),(0,g.jsxs)("div",{className:`${D}-buttonsContainer`,children:[(0,g.jsx)(T.Button,{className:`${D}-cancelButton`,onClick:o,children:"Cancel"}),(0,g.jsx)(T.Button,{className:`${D}-saveButton`,onClick:W,disabled:n===""||s==="",children:"Save"})]})]})};var bo=require("@vuu-ui/vuu-ui-controls");var x=V(require("react")),Ie=require("@vuu-ui/vuu-layout"),yo=require("@vuu-ui/vuu-popups");var Qe={layout:{type:"Component",id:"loading-main",props:{}}},je={layout:{type:"Stack",id:"main-tabs",props:{className:"vuuShell-mainTabs",TabstripProps:{allowAddTab:!0,allowCloseTab:!0,allowRenameTab:!0,animateSelectionThumb:!1,location:"main-tab",variant:"primary"},preserve:!0,active:0},children:[{props:{id:"tab1",title:"Tab 1",className:"vuuShell-Placeholder"},type:"Placeholder"}]}};var ae=require("@vuu-ui/vuu-utils");var Xe=require("@vuu-ui/vuu-utils");var Aa="layouts/metadata",Ha="layouts/layouts",we,Ke=class{constructor(t){this.username=Ee()[0];this.metadataSaveLocation=`${Aa}/${this.username}`;this.layoutsSaveLocation=`${Ha}/${this.username}`;Dt(this,we,`api/vui/${this.username}`);this.loadLayouts=()=>new Promise(t=>{let o=(0,ae.getLocalEntity)(this.layoutsSaveLocation);t(o||[])});this.saveLayoutsWithMetadata=(t,o)=>{(0,ae.saveLocalEntity)(this.layoutsSaveLocation,t),(0,ae.saveLocalEntity)(this.metadataSaveLocation,o)};this.validateIds=async t=>Promise.all([this.validateId(t,"metadata").catch(o=>o.message),this.validateId(t,"layout").catch(o=>o.message)]).then(o=>{let a=o.filter(r=>r!==void 0).join("; ");if(a)throw new Error(a)});this.validateId=(t,o)=>new Promise((a,r)=>{(o==="metadata"?()=>this.loadMetadata():()=>this.loadLayouts())().then(i=>{switch(i.filter(l=>l.id===t).length){case 1:{a();break}case 0:{r(new Error(`No ${o} with ID ${t}`));break}default:r(new Error(`Non-unique ${o} with ID ${t}`))}})});t&&At(this,we,t)}createLayout(t,o){return new Promise(a=>{Promise.all([this.loadLayouts(),this.loadMetadata()]).then(([r,n])=>{let i=(0,Xe.getUniqueId)(),s={...t,id:i,created:(0,Xe.formatDate)({date:"dd.mm.yyyy"})(new Date)};this.saveLayoutsWithMetadata([...r,{id:i,json:o}],[...n,s]),a(s)})})}updateLayout(t,o,a){return new Promise((r,n)=>{this.validateIds(t).then(()=>Promise.all([this.loadLayouts(),this.loadMetadata()])).then(([i,s])=>{let l=i.map(m=>m.id===t?{...m,json:a}:m),c=s.map(m=>m.id===t?{...m,...o}:m);this.saveLayoutsWithMetadata(l,c),r()}).catch(i=>n(i))})}deleteLayout(t){return new Promise((o,a)=>{this.validateIds(t).then(()=>Promise.all([this.loadLayouts(),this.loadMetadata()])).then(([r,n])=>{let i=r.filter(l=>l.id!==t),s=n.filter(l=>l.id!==t);this.saveLayoutsWithMetadata(i,s),o()}).catch(r=>a(r))})}loadLayout(t){return new Promise((o,a)=>{this.validateId(t,"layout").then(()=>this.loadLayouts()).then(r=>{let n=r.find(i=>i.id===t);n?o(n.json):a(new Error(`no layout found matching id ${t}`))}).catch(r=>a(r))})}loadMetadata(){return new Promise(t=>{let o=(0,ae.getLocalEntity)(this.metadataSaveLocation);t(o||[])})}loadApplicationJSON(){return new Promise(t=>{let o=(0,ae.getLocalEntity)(lt(this,we));t(o||je)})}saveApplicationJSON(t){return new Promise((o,a)=>{(0,ae.saveLocalEntity)(lt(this,we),t)?o():a(new Error("Application Json failed to save"))})}};we=new WeakMap;var He=require("react");var vo=require("react/jsx-runtime"),go=e=>{let{saveLayout:t}=ce(),o=(0,He.useCallback)(()=>{e(void 0)},[e]),a=(0,He.useCallback)(i=>{t(i),e(void 0)},[t,e]),[r,n]=(0,He.useMemo)(()=>[(i,s)=>{let l=i.split(" "),c=[];return l.includes("main-tab")&&c.push({label:"Save Layout",action:"save-layout",options:s},{label:"Layout Settings",action:"layout-settings",options:s}),c},i=>{var s,l;return console.log("menu action",{action:i}),i.menuId==="save-layout"?(e({content:(0,vo.jsx)(yt,{onCancel:o,onSave:a,componentId:(s=i.options)==null?void 0:s.controlledComponentId,defaultTitle:(l=i.options)==null?void 0:l.controlledComponentTitle}),title:"Save Layout",hideCloseButton:!0}),!0):!1}],[o,a,e]);return{buildMenuOptions:r,handleMenuAction:n}};var xo=require("react/jsx-runtime"),xt,Re=()=>(xt===void 0&&(xt=new Ke),xt),Lt=x.default.createContext({getApplicationSettings:()=>{},layoutMetadata:[],saveLayout:()=>{},applicationJson:je,saveApplicationLayout:()=>{},saveApplicationSettings:()=>{},loadLayoutById:()=>{}}),Ra=(e,t)=>{var o;return((o=e.props)==null?void 0:o.title)!==void 0?e:{...e,props:{...e.props,title:t.name}}},Ia=e=>{let[t,o]=(0,x.useState)([]),[,a]=(0,x.useState)({}),r=(0,yo.useNotifications)(),n=(0,x.useRef)(Qe),i=(0,x.useCallback)((d,u=!0)=>{n.current=d,u&&a({})},[]),s=(0,x.useCallback)((d,u=!0)=>{i({...n.current,layout:d},u)},[i]),l=(0,x.useCallback)(d=>{i({...n.current,settings:{...n.current.settings,...d}},!1)},[i]);(0,x.useEffect)(()=>{let d=Re();d.loadMetadata().then(u=>{o(u)}).catch(u=>{r({type:"error",header:"Failed to Load Layouts",body:"Could not load list of available layouts"}),console.error("Error occurred while retrieving metadata",u)}),d.loadApplicationJSON().then(u=>{i(u)}).catch(u=>{r({type:"error",header:"Failed to Load Layout",body:"Could not load your latest view"}),console.error("Error occurred while retrieving application layout",u)})},[r,i]);let c=(0,x.useCallback)(d=>{(0,Ie.isLayoutJSON)(d)?(s(d,!1),Re().saveApplicationJSON(n.current)):console.error("Tried to save invalid application layout",d)},[s]),m=(0,x.useCallback)(d=>{let u=(0,Ie.resolveJSONPath)(n.current.layout,"#main-tabs.ACTIVE_CHILD");u&&(0,Ie.isLayoutJSON)(u)?Re().createLayout(d,Ra(u,d)).then(h=>{r({type:"success",header:"Layout Saved Successfully",body:`${h.name} saved successfully`}),o(P=>[...P,h])}).catch(h=>{r({type:"error",header:"Failed to Save Layout",body:`Failed to save layout ${d.name}`}),console.error("Error occurred while saving layout",h)}):(console.error("Tried to save invalid layout",u),r({type:"error",header:"Failed to Save Layout",body:"Cannot save invalid layout"}))},[r]),y=(0,x.useCallback)((d,u)=>{let{settings:h}=n.current;l(u?{...h,[u]:d}:d),Re().saveApplicationJSON(n.current)},[l]),N=(0,x.useCallback)(d=>{let{settings:u}=n.current;return d?u==null?void 0:u[d]:u},[]),C=(0,x.useCallback)(d=>{Re().loadLayout(d).then(u=>{var P,W;let{layout:h}=n.current;s({...h,children:(h.children||[]).concat(u),props:{...h.props,active:(W=(P=h.children)==null?void 0:P.length)!=null?W:0}})}).catch(u=>{r({type:"error",header:"Failed to Load Layout",body:"Failed to load the requested layout"}),console.error("Error occurred while loading layout",u)})},[r,s]);return(0,xo.jsx)(Lt.Provider,{value:{getApplicationSettings:N,layoutMetadata:t,saveLayout:m,applicationJson:n.current,saveApplicationLayout:c,saveApplicationSettings:y,loadLayoutById:C},children:e.children})},ce=()=>(0,x.useContext)(Lt);var X=require("react/jsx-runtime"),Ye="vuuLayoutTile",Lo=e=>{let{metadata:t,handleLoadLayout:o}=e;return(0,X.jsx)("div",{role:"listitem",children:(0,X.jsxs)("div",{className:`${Ye}-layoutTile`,role:"button",onClick:()=>o(t==null?void 0:t.id),children:[(0,X.jsx)("img",{className:`${Ye}-screenshot`,src:t==null?void 0:t.screenshot}),(0,X.jsxs)("div",{children:[(0,X.jsx)("div",{className:`${Ye}-layoutName`,children:t==null?void 0:t.name}),(0,X.jsx)("div",{className:`${Ye}-layoutDetails`,children:(0,X.jsx)("div",{children:`${t==null?void 0:t.user}, ${t==null?void 0:t.created}`})})]})]},t==null?void 0:t.id)})};var q=require("react/jsx-runtime"),bt="vuuLayoutList",wt=e=>{let{layoutMetadata:t,loadLayoutById:o}=ce(),a=n=>{n&&o(n)},r=t.reduce((n,i)=>n[i.group]?{...n,[i.group]:[...n[i.group],i]}:{...n,[i.group]:[i]},{});return(0,q.jsxs)("div",{className:bt,...e,role:"listbox","aria-label":"my layouts",children:[(0,q.jsx)("div",{className:`${bt}-header`,children:"My Layouts"}),(0,q.jsx)(bo.List,{height:"auto",source:Object.entries(r),ListItem:({item:n})=>{if(!n)return(0,q.jsx)(q.Fragment,{});let[i,s]=n;return(0,q.jsxs)("div",{role:"list","aria-label":i,children:[(0,q.jsx)("div",{className:`${bt}-groupName`,children:i}),s.map(l=>(0,q.jsx)(Lo,{metadata:l,handleLoadLayout:a},l.id))]})}})]})};var wo=require("@vuu-ui/vuu-icons"),at=require("@vuu-ui/vuu-layout"),de=require("@vuu-ui/vuu-ui-controls"),Co=require("@vuu-ui/vuu-utils"),ot=V(require("clsx")),Se=require("react");var et=require("@vuu-ui/vuu-layout");var ne=require("react/jsx-runtime"),Ct="vuuFeatureList",tt=({features:e,title:t="VUU TABLES",...o})=>{let a={},r={height:"100%"};return(0,ne.jsxs)("div",{...o,className:Ct,children:[(0,ne.jsx)("div",{className:`${Ct}-header`,children:t}),(0,ne.jsx)("div",{className:`${Ct}-content`,children:(0,ne.jsx)(et.Palette,{orientation:"vertical",ListProps:r,ViewProps:a,children:e.map((n,i)=>(0,ne.jsx)(et.PaletteItem,{closeable:!0,label:n.title,resizeable:!0,resize:"defer",header:!0,children:(0,ne.jsx)(ke,{...n})},i))})})]})};var b=require("react/jsx-runtime"),Ce="vuuLeftNav",$a=(e,t)=>e===0?t?"menu-full":"menu-icons":t?"menu-full-content":"menu-icons-content",Ba=e=>{let t=(0,at.useLayoutProviderDispatch)(),[o]=(0,Co.useThemeAttributes)(),{"data-path":a,defaultExpanded:r=!0,defaultActiveTabIndex:n=0,features:i,onActiveChange:s,onTogglePrimaryMenu:l,sizeCollapsed:c=80,sizeContent:m=300,sizeExpanded:y=240,style:N,tableFeatures:C,...d}=e,[u,h]=(0,Se.useState)({activeTabIndex:n,expanded:r}),P=(0,Se.useCallback)((S,A)=>S===0?A?y:c:A?y+m:c+m,[c,m,y]),W=(0,Se.useCallback)(S=>{let{activeTabIndex:A,expanded:G}=u;if(h({activeTabIndex:S,expanded:G}),S===0||A===0){let L=P(S,G);t({type:"layout-resize",path:"#vuu-side-panel",size:L})}s==null||s(S)},[t,P,u,s]),R=$a(u.activeTabIndex,u.expanded),f=(0,Se.useCallback)(()=>{let{activeTabIndex:S,expanded:A}=u,G=!A;h({activeTabIndex:S,expanded:G}),t({type:"layout-resize",path:"#vuu-side-panel",size:P(S,G)}),l==null||l(G)},[t,P,u,l]),I={...N,"--nav-menu-collapsed-width":`${c}px`,"--nav-menu-expanded-width":`${y}px`,"--nav-menu-content-width":`${m}px`};return(0,b.jsxs)("div",{...d,className:(0,ot.default)(Ce,`${Ce}-${R}`),style:I,children:[(0,b.jsxs)("div",{className:(0,ot.default)(`${Ce}-menu-primary`,o),"data-mode":"dark",children:[(0,b.jsx)("div",{className:"vuuLeftNav-logo",children:(0,b.jsx)(wo.VuuLogo,{})}),(0,b.jsx)("div",{className:`${Ce}-main`,children:(0,b.jsxs)(de.Tabstrip,{activeTabIndex:u.activeTabIndex,animateSelectionThumb:!1,className:`${Ce}-Tabstrip`,onActiveChange:W,orientation:"vertical",children:[(0,b.jsx)(de.Tab,{"data-icon":"demo",label:"DEMO"}),(0,b.jsx)(de.Tab,{"data-icon":"features",label:"VUU FEATURES"}),(0,b.jsx)(de.Tab,{"data-icon":"tables",label:"VUU TABLES"}),(0,b.jsx)(de.Tab,{"data-icon":"layouts",label:"MY LAYOUTS"})]})}),(0,b.jsx)("div",{className:"vuuLeftNav-buttonBar",children:(0,b.jsx)("button",{className:(0,ot.default)("vuuLeftNav-toggleButton",{"vuuLeftNav-toggleButton-open":R.startsWith("menu-full"),"vuuLeftNav-toggleButton-closed":R.startsWith("menu-icons")}),"data-icon":R.startsWith("menu-full")?"chevron-left":"chevron-right",onClick:f})})]}),(0,b.jsxs)(at.Stack,{active:u.activeTabIndex-1,className:`${Ce}-menu-secondary`,showTabs:!1,children:[(0,b.jsx)(tt,{features:i,title:"VUU FEATURES"}),(0,b.jsx)(tt,{features:C,title:"VUU TABLES"}),(0,b.jsx)("div",{className:"vuuLeftNav-drawer",children:(0,b.jsx)(wt,{})})]})]})};var Mo=require("@vuu-ui/vuu-data-remote"),z=require("@vuu-ui/vuu-utils"),$e=require("@salt-ds/core"),St=V(require("clsx")),w=require("react");var H=require("react/jsx-runtime"),Y="vuuSessionEditingForm",So=(e,t)=>{let o=e.find(a=>a.name===t);if(o)return o;throw Error(`SessionEditingForm, no field '${t}' found`)},To=e=>{let{dataset:{field:t},value:o}=e.target;if(t===void 0)throw Error("SessionEditingForm, form field has no field name");return[t,o]},ee={uninitialised:0,unchanged:1,changed:2,invalid:3};function Po(e,t,o=!1){switch(t){case"int":case"long":{let a=parseInt(e,10);if((0,z.isValidNumber)(a))return a;if(o)throw Error("SessionEditingForm getTypedValue");return}case"double":{let a=parseFloat(e);return(0,z.isValidNumber)(a)?a:void 0}case"boolean":return e==="true";default:return e}}var Oa=(e,t)=>{if(e)return e;if(t)return new Mo.VuuDataSource({bufferSize:0,table:t.table,columns:t.columns.map(o=>o.name)});throw Error("SessionEditingForm: either a DataSource or a TableSchema must be provided")},Ua=({className:e,config:{fields:t,key:o},dataSource:a,id:r,onClose:n,schema:i,...s})=>{let[l,c]=(0,w.useState)(),[m,y]=(0,w.useState)(""),N=(0,w.useRef)(null),C=(0,w.useRef)(),d=(0,w.useRef)(ee.uninitialised),u=(0,w.useMemo)(()=>{let p=B=>{if($){let O={};for(let te of u.columns)O[te]=B[$[te]];d.current===ee.uninitialised&&(d.current=ee.unchanged,C.current=O),c(O)}},L=Oa(a,i),$=(0,z.buildColumnMap)(L.columns);return L.subscribe({range:{from:0,to:5}},B=>{B.type==="viewport-update"&&B.rows&&(d.current===ee.uninitialised?p(B.rows[0]):console.log("what do we do with server updates"))}),L},[a,i]),h=(0,$e.useIdMemo)(r),P=(0,w.useCallback)(p=>{let[L,$]=To(p),{type:B}=So(t,L),O=Po($,B);c((te={})=>{let U={...te,[L]:O},$o=(0,z.shallowEquals)(U,C.current);return d.current=$o?ee.unchanged:O!==void 0?ee.changed:ee.invalid,U})},[t]),W=(0,w.useCallback)(p=>{let[L,$]=To(p),{type:B}=So(t,L),O=l==null?void 0:l[o],te=Po($,B,!0);typeof O=="string"&&u.menuRpcCall({rowKey:O,field:L,value:te,type:"VP_EDIT_CELL_RPC"})},[u,t,o,l]),R=(0,w.useCallback)(p=>{typeof p=="object"&&p!==null&&"type"in p&&p.type==="CLOSE_DIALOG_ACTION"&&n()},[n]),f=(0,w.useCallback)(async()=>{let p=await u.menuRpcCall({type:"VP_EDIT_SUBMIT_FORM_RPC"});(0,z.isErrorResponse)(p)?y(p.error):(0,z.hasAction)(p)&&R(p.action)},[R,u]),I=(0,w.useCallback)(p=>{p.key==="Enter"&&d.current===ee.changed&&f()},[f]),S=(0,w.useCallback)(()=>{n()},[n]),A=p=>{var $;let L=String(($=l==null?void 0:l[p.name])!=null?$:"");return p.readonly||p.name===o?(0,H.jsx)("div",{className:`${Y}-fieldValue vuuReadOnly`,children:L}):(0,H.jsx)("input",{className:`${Y}-fieldValue`,"data-field":p.name,onBlur:W,onChange:P,type:"text",value:L,id:`${h}-input-${p.name}`})};(0,w.useEffect)(()=>{if(N.current){let p=N.current.querySelector("input");p&&setTimeout(()=>{p.focus(),p.select()},100)}},[]),(0,w.useEffect)(()=>()=>{u&&u.unsubscribe()},[u]);let G=d.current===ee.changed;return(0,H.jsxs)("div",{...s,className:(0,St.default)(Y,e),children:[m?(0,H.jsx)("div",{className:`${Y}-errorBanner`,"data-icon":"error",title:m,children:"Error, edit(s) not saved"}):void 0,(0,H.jsx)("div",{className:`${Y}-content`,ref:N,onKeyDown:I,children:t.map(p=>{var L;return(0,H.jsxs)("div",{className:`${Y}-field`,children:[(0,H.jsx)("label",{className:(0,St.default)(`${Y}-fieldLabel`,{[`${Y}-required`]:p.required}),htmlFor:`${h}-input-${p.name}`,children:(L=p==null?void 0:p.label)!=null?L:p.description}),A(p)]},p.name)})}),(0,H.jsxs)("div",{className:`${Y}-buttonbar salt-theme salt-density-high`,children:[(0,H.jsx)($e.Button,{type:"submit",variant:"cta",disabled:!G,onClick:f,children:"Submit"}),(0,H.jsx)($e.Button,{variant:"secondary",onClick:S,children:"Cancel"})]})]})};var Ao=require("@vuu-ui/vuu-data-remote"),Pe=require("@vuu-ui/vuu-layout"),rt=require("@vuu-ui/vuu-popups"),Me=require("@vuu-ui/vuu-utils"),Ho=V(require("clsx")),_=require("react");var Eo=require("@salt-ds/core"),Tt=V(require("clsx")),nt=require("react"),Te=require("@vuu-ui/vuu-layout");var re=require("react/jsx-runtime"),J="vuuContextPanel",Pt=({className:e,expanded:t=!1,content:o,overlay:a=!1,title:r})=>{let n=(0,Te.useLayoutProviderDispatch)(),i=(0,nt.useCallback)(()=>{n({path:"#context-panel",propName:"expanded",propValue:!1,type:"set-prop"})},[n]),s=(0,Tt.default)(J,e,{[`${J}-expanded`]:t,[`${J}-inline`]:a!==!0,[`${J}-overlay`]:a}),l=(0,nt.useMemo)(()=>o&&t?(0,Te.layoutFromJson)(o,"context-0"):null,[o,t]);return(0,re.jsx)("div",{className:(0,Tt.default)(J,s,{[`${J}-expanded`]:t}),children:(0,re.jsxs)(Te.View,{className:`${J}-inner`,header:!1,id:"context-panel",children:[(0,re.jsxs)("div",{className:`${J}-header`,children:[(0,re.jsx)("h2",{className:`${J}-title`,children:r}),(0,re.jsx)(Eo.Button,{className:`${J}-close`,"data-icon":"close",onClick:i,variant:"secondary"})]}),(0,re.jsx)("div",{className:`${J}-content`,children:l})]})})};var Be=require("@vuu-ui/vuu-layout");var No=require("react"),Vo=V(require("clsx"));var Fo=require("react/jsx-runtime"),Za="vuuShellSidePanel",Mt=({children:e,open:t=!0,sizeClosed:o=90,sizeOpen:a=200,style:r,...n})=>{let i=(0,No.useMemo)(()=>({...r,"--shell-left-nav-size":t?`${a}px`:`${o}px`}),[t,o,a,r]);return(0,Fo.jsx)("div",{...n,className:(0,Vo.default)(Za),style:i,children:e})};var pe=require("react/jsx-runtime"),ko=({appHeader:e,LeftSidePanelProps:t})=>(0,pe.jsxs)(Be.Flexbox,{className:"App",style:{flexDirection:"row",height:"100%",width:"100%"},children:[(0,pe.jsx)(Mt,{...t,id:"vuu-side-panel"}),(0,pe.jsxs)(Be.Flexbox,{className:"vuuShell-content",style:{flex:1,flexDirection:"column"},children:[e,(0,pe.jsx)(Be.DraggableLayout,{dropTarget:!0,style:{flex:1}},"main-content")]}),(0,pe.jsx)(Pt,{id:"context-panel",overlay:!0})]});var j=require("@vuu-ui/vuu-layout"),he=require("react"),me=require("react/jsx-runtime"),Do=({appHeader:e,LeftSidePanelProps:t})=>{let o=(0,he.useRef)(null),[a,r]=(0,he.useState)(!0),n=(0,he.useCallback)(s=>{var c;let l=s.target;(c=o.current)!=null&&c.contains(l)||r(!a)},[a]),i=(0,he.useCallback)(s=>{let l=[];return l.push((0,me.jsx)(j.Drawer,{onClick:n,open:a,position:"left",inline:!0,peekaboo:!0,sizeOpen:200,toggleButton:"end",children:(0,me.jsx)(j.View,{className:"vuuShell-palette",id:"vw-app-palette",ref:o,style:{height:"100%"},children:s},"app-palette")},"left-panel")),l},[n,a]);return(0,me.jsxs)(j.Flexbox,{className:"App",style:{flexDirection:"column",height:"100%",width:"100%"},children:[e,(0,me.jsx)(j.DockLayout,{style:{flex:1},children:i(t==null?void 0:t.children).concat((0,me.jsx)(j.DraggableLayout,{dropTarget:!0,style:{width:"100%",height:"100%"}},"main-content"))})]})};var Et=({leftSidePanelLayout:e="inlay",...t})=>(e==="inlay"?Do:ko)(t);var fe=require("react/jsx-runtime");typeof Pe.StackLayout!="function"&&console.warn("StackLayout module not loaded, will be unsbale to deserialize from layout JSON");var{error:Nt}=(0,Me.logger)("Shell"),qa={},za=({LayoutProps:e,LeftSidePanelProps:t=qa,children:o,className:a,leftSidePanelLayout:r,loginUrl:n,saveLocation:i,saveUrl:s,serverUrl:l,user:c,...m})=>{let y=(0,_.useRef)(null),{dialog:N,setDialogState:C}=(0,rt.useDialog)(),d=(0,_.useRef)("latest"),{applicationJson:u,saveApplicationLayout:h,loadLayoutById:P}=ce(),{buildMenuOptions:W,handleMenuAction:R}=go(C),[f,I]=(0,_.useState)("connected"),S=(0,_.useCallback)(U=>{try{h(U)}catch{Nt==null||Nt("Failed to save layout")}},[h]),A=(0,_.useCallback)(U=>{y.current&&(y.current.dataset.mode=U)},[]),G=(0,_.useCallback)(U=>{d.current=U,P(U)},[P]);(0,_.useMemo)(async()=>{if(l&&c.token){let U=await(0,Ao.connectToServer)({authToken:c.token,url:l,username:c.username});I(U)}},[l,c.token,c.username]);let[p,L,$]=(0,Me.useThemeAttributes)(),B=(0,Ho.default)("vuuShell",a,p,L),O=u===Qe,te=Et({LeftSidePanelProps:t,leftSidePanelLayout:r,appHeader:(0,fe.jsx)(dt,{layoutId:d.current,loginUrl:n,user:c,onNavigate:G,onSwitchTheme:A})});return f==="rejected"&&console.log("game over, no connection to server"),O?null:(0,fe.jsx)(Me.ThemeProvider,{children:(0,fe.jsxs)(rt.ContextMenuProvider,{menuActionHandler:R,menuBuilder:W,children:[(0,fe.jsx)(Pe.LayoutProvider,{...e,layout:u.layout,onLayoutChange:S,children:(0,fe.jsx)(Pe.DraggableLayout,{className:B,"data-mode":$,ref:y,...m,children:te})}),o||N]})})};var Ja=e=>e==="*",_a=e=>typeof e=="object"&&typeof e.module=="string"&&typeof e.table=="string";var st=require("react"),it=require("react/jsx-runtime"),Wa={},Vt=(0,st.createContext)(Wa),Ga=({children:e,context:t,inheritedContext:o})=>{let a={...o,...t};return(0,it.jsx)(Vt.Provider,{value:a,children:e})},Qa=({children:e,value:t})=>(0,it.jsx)(Vt.Consumer,{children:o=>(0,it.jsx)(Ga,{context:t,inheritedContext:o,children:e})}),ja=()=>(0,st.useContext)(Vt);var Ro=V(require("clsx")),ge=require("@salt-ds/core"),Io=require("react");var Oe=require("react/jsx-runtime"),Ka="vuuThemeSwitch",Xa=({className:e,defaultMode:t,mode:o,onChange:a,...r})=>{let[n,i]=(0,ge.useControlled)({controlled:o,default:t!=null?t:"light",name:"ThemeSwitch",state:"mode"}),s=(0,Io.useCallback)(c=>{let{value:m}=c.target;i(m),a(m)},[a,i]),l=(0,Ro.default)(Ka,e);return(0,Oe.jsxs)(ge.ToggleButtonGroup,{className:l,...r,onChange:s,value:n,children:[(0,Oe.jsx)(ge.ToggleButton,{"aria-label":"alert","data-icon":"light",value:"light"}),(0,Oe.jsx)(ge.ToggleButton,{"aria-label":"home","data-icon":"dark",value:"dark"})]})};
3
- //# sourceMappingURL=index.js.map