11import IOBrowserPlatform from "@interopio/browser-platform" ;
2- import { IOConnectHome , type UserData } from "@interopio/home-ui-react" ;
2+ import { IOConnectHome , type UserData , type Auth0User } from "@interopio/home-ui-react" ;
33import type { IOConnectInitSettings } from "@interopio/react-hooks" ;
44import IOModals from "@interopio/modals-api" ;
55import IOSearch from "@interopio/search-api" ;
@@ -25,7 +25,7 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
2525 const licenseKey = ( userData . type === "auth0" ? userData . user [ "https://interop.io/io_cb_license_key" ] as string : undefined ) ?? import . meta. env . VITE_IO_CB_LICENSE_KEY as string ;
2626
2727 // Extract user details from login
28- const user = userData . user ;
28+ const user : Auth0User = userData . user as Auth0User ;
2929
3030 // Platform configuration
3131 return {
@@ -60,7 +60,7 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
6060 type : "window" ,
6161 "title" : "Excel Playground" ,
6262 details : {
63- url : ' https://interopio.github.io/excel-playground/'
63+ url : " https://interopio.github.io/excel-playground/"
6464 } ,
6565 customProperties : {
6666 includeInWorkspaces : true
@@ -69,7 +69,67 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
6969 ]
7070 } ,
7171 layouts : {
72- mode : "idb"
72+ mode : "idb" ,
73+ local : [ {
74+ name : "Welcome" ,
75+ type : "Global" ,
76+ components : [ {
77+ type : "workspaceFrame" ,
78+ componentType : "application" ,
79+ application : "workspaces-demo" ,
80+ state : {
81+ bounds : {
82+ top : 0 ,
83+ left : 0 ,
84+ height : 0 ,
85+ width : 0 ,
86+ } ,
87+ context : {
88+ isPlatform : true ,
89+ } ,
90+ instanceId : "g42-welcome" ,
91+ selectedWorkspace : 0 ,
92+ workspaces : [ {
93+ children : [ {
94+ type : "row" ,
95+ config : { } ,
96+ children : [
97+ {
98+ type : "group" ,
99+ config : { } ,
100+ children : [ {
101+ type : "window" ,
102+ config : {
103+ title : "Outlook" ,
104+ appName : 'outlook-demo' ,
105+ url : `${ outlookAppUrl } `
106+ }
107+ } ]
108+ } ,
109+ {
110+ type : "group" ,
111+ config : { } ,
112+ children : [
113+ {
114+ type : "window" ,
115+ config : {
116+ title : "Excel" ,
117+ appName : "excel-playground" ,
118+ url : "https://interopio.github.io/excel-playground/"
119+ }
120+ }
121+ ]
122+ } ] ,
123+ } ] ,
124+ config : {
125+ name : "Office"
126+ } ,
127+ context : { }
128+ } ]
129+ }
130+ } ]
131+ }
132+ ]
73133 } ,
74134 channels : {
75135 definitions : config . channels
@@ -85,7 +145,7 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
85145 }
86146 } ,
87147 systemLogger : {
88- level : "debug "
148+ level : "warn "
89149 } ,
90150 intentResolver : {
91151 enable : true
@@ -102,10 +162,10 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
102162 // Gateway configuration - connect to local io.Bridge
103163 gateway : {
104164 logging : {
105- level : ' warn' ,
106- appender : ( info ) => {
107- console . log ( `[${ info . namespace } ]: ${ info . message } ` ) ;
108- } ,
165+ level : " warn" ,
166+ appender : ( info ) => {
167+ console . log ( `[${ info . namespace } ]: ${ info . message } ` ) ;
168+ } ,
109169 } ,
110170 bridge : {
111171 url : bridgeUrl ,
@@ -117,7 +177,7 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
117177 visibility : [
118178 {
119179 restrictions : "cluster" ,
120- identity : { application : new RegExp ( / ( O u t l o o k | I O X L A d d i n ) / ) }
180+ identity : { application : new RegExp ( / ( O u t l o o k | I O X L A d d i n ) / ) }
121181 } ,
122182 ]
123183 } ,
@@ -139,8 +199,11 @@ const getConfig = (userData: UserData): IOConnectInitSettings => {
139199 } ,
140200 // User details required when connecting to io.Bridge
141201 user : {
142- id : user ?. id || 'anonymous' ,
143- username : user ?. username || 'anonymous'
202+ id : user . id ,
203+ username : user . name ,
204+ firstName : user . given_name ,
205+ lastName : user . family_name ,
206+ email : user . email
144207 } ,
145208 // Workspaces App configuration
146209 workspaces : {
@@ -159,11 +222,11 @@ const homeConfig = {
159222 login : {
160223 type : "auth0" as const ,
161224 providerOptions : {
162- domain : requireNonEmptyString ( import . meta. env . VITE_AUTH0_DOMAIN , ' VITE_AUTH0_DOMAIN' ) ,
163- clientId : requireNonEmptyString ( import . meta. env . VITE_AUTH0_CLIENT_ID , ' VITE_AUTH0_CLIENT_ID' ) ,
225+ domain : requireNonEmptyString ( import . meta. env . VITE_AUTH0_DOMAIN , " VITE_AUTH0_DOMAIN" ) ,
226+ clientId : requireNonEmptyString ( import . meta. env . VITE_AUTH0_CLIENT_ID , " VITE_AUTH0_CLIENT_ID" ) ,
164227 authorizationParams : {
165- audience : requireNonEmptyString ( import . meta. env . VITE_AUTH0_AUDIENCE , ' VITE_AUTH0_AUDIENCE' ) ,
166- scope : import . meta. env . VITE_AUTH0_SCOPE ?? ' openid profile email' ,
228+ audience : requireNonEmptyString ( import . meta. env . VITE_AUTH0_AUDIENCE , " VITE_AUTH0_AUDIENCE" ) ,
229+ scope : import . meta. env . VITE_AUTH0_SCOPE ?? " openid profile email" ,
167230 redirect_uri : appBaseUrl . toString ( ) ,
168231 }
169232 } ,
0 commit comments