@insight-health/aura 0.0.12 → 0.1.0-beta.0
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/dist/auraWidget.d.ts +7 -3
- package/dist/auraWidget.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +75 -70
- package/dist/index.umd.js +2 -2
- package/dist/types.d.ts +4 -26
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -1
- package/dist/globalConfig.d.ts +0 -27
- package/dist/globalConfig.d.ts.map +0 -1
- package/dist/root.d.ts +0 -11
- package/dist/root.d.ts.map +0 -1
- package/dist/utils/eventBus.d.ts +0 -8
- package/dist/utils/eventBus.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logger.d.ts +0 -6
- package/dist/utils/logger.d.ts.map +0 -1
package/dist/auraWidget.d.ts
CHANGED
|
@@ -7,10 +7,11 @@ import { RegisterTemplatesPayload, AuraWidgetInitParams, AuraWidgetEmitEvent, Au
|
|
|
7
7
|
declare class AuraWidgetService {
|
|
8
8
|
private config;
|
|
9
9
|
private widgetFrame;
|
|
10
|
-
private
|
|
10
|
+
private unsubscriptions;
|
|
11
11
|
private messageQueue;
|
|
12
12
|
private isQueueingEnabled;
|
|
13
13
|
private methodRegistry;
|
|
14
|
+
private eventBus;
|
|
14
15
|
isFrameReady: boolean;
|
|
15
16
|
isFrameAuthenticated: boolean;
|
|
16
17
|
constructor();
|
|
@@ -46,10 +47,13 @@ declare class AuraWidgetService {
|
|
|
46
47
|
*/
|
|
47
48
|
unregisterMethod: <N extends keyof SupportedMethods>(name: N) => boolean;
|
|
48
49
|
/**
|
|
49
|
-
* Get SDK
|
|
50
|
+
* Get SDK config
|
|
50
51
|
*/
|
|
51
52
|
getConfig: () => AuraWidgetInitParams | null;
|
|
52
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Get SDK version from core package
|
|
55
|
+
*/
|
|
56
|
+
getVersion: () => any;
|
|
53
57
|
}
|
|
54
58
|
export declare const AuraWidget: AuraWidgetService;
|
|
55
59
|
export {};
|
package/dist/auraWidget.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auraWidget.d.ts","sourceRoot":"","sources":["../src/auraWidget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auraWidget.d.ts","sourceRoot":"","sources":["../src/auraWidget.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EAEpB,mBAAmB,EACnB,UAAU,EAEV,gBAAgB,EAChB,4BAA4B,EAC5B,+BAA+B,EAC/B,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAC;AA2BjB;;;GAGG;AACH,cAAM,iBAAiB;IACrB,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,QAAQ,CAAkB;IAClC,YAAY,EAAE,OAAO,CAAS;IAC9B,oBAAoB,EAAE,OAAO,CAAS;;IAqBtC,OAAO,CAAC,WAAW,CASjB;IAEF,OAAO,CAAC,WAAW,CAEjB;IAEF,OAAO,CAAC,YAAY,CAKlB;IAEF,OAAO,CAAC,UAAU,CAMhB;IAEF,OAAO,CAAC,UAAU,CAEhB;IAEF,OAAO,CAAC,WAAW,CAMjB;IAEF,OAAO,CAAC,gBAAgB,CAoDtB;IAEF,IAAI,GAAI,QAAQ,oBAAoB,8CAkFlC;IAEF,OAAO,GAAI,QAAQ,UAAU,UAkB3B;IAEF,QAAQ,GAAI,QAAQ,WAAW,UAO7B;IAEF,eAAe,GAAI,cAAc,YAAY,UAO3C;IAEF,IAAI,aAeF;IAEF,IAAI,aAIF;IAEF,KAAK,aAYH;IAEF,OAAO,GAAI,OAAO,mBAAmB,UAGnC;IAGF,IAAI,UANc,mBAAmB,UAMjB;IAEpB,EAAE,GAAI,MAAM,MAAM,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAErE;IAEF,iBAAiB,GAAI,SAAS,wBAAwB,UAKpD;IAEF,qBAAqB,GAAI,SAAS,4BAA4B,UAK5D;IAEF;;;;OAIG;IACH,cAAc,GAAI,CAAC,SAAS,MAAM,gBAAgB,EAChD,MAAM,CAAC,EACP,SAAS,gBAAgB,CAAC,CAAC,CAAC,KAC3B,IAAI,CAWL;IAEF;;;;OAIG;IACH,gBAAgB,GAAI,CAAC,SAAS,MAAM,gBAAgB,EAAE,MAAM,CAAC,KAAG,OAAO,CAErE;IAEF;;OAEG;IACH,SAAS,oCAEP;IAEF;;OAEG;IACH,UAAU,YAER;CACH;AAWD,eAAO,MAAM,UAAU,mBAAgB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x={insightBaseUrl:"https://anywhere.insighthealth.ai"};let
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x={insightBaseUrl:"https://anywhere.insighthealth.ai"};let p=null;function A(){return p}function v(i){p={...x,...i}}function O(i){v(i)}function g(){const i=A();if(!i)throw new Error("Insight SDK not configured. Call configure() first to set global configuration.");return i}class C{constructor(){this.events={},this.subscribe=(e,t)=>(this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}),this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach(s=>s(t))}}}function U(i){return{log:e=>{console.log(`[${i}]: ${e}`)},warn:e=>{console.warn(`[${i}]: ${e}`)},error:e=>{console.error(`[${i}]: ${e}`)}}}const u=U("Insight Health Aura Widget"),f={opacity:"0",pointerEvents:"none",width:"0",height:"0",maxWidth:"0",maxHeight:"0"},W={border:"none",borderRadius:"10px",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",overflow:"hidden",background:"#fff",position:"fixed",bottom:"20px",right:"20px",transition:"opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",zIndex:"9999"};class B{constructor(){this.config=null,this.widgetFrame=null,this.unsubscriptions=[],this.messageQueue=[],this.isQueueingEnabled=!1,this.methodRegistry={},this.eventBus=new C,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.postMessage=e=>{var s;if(!((s=this.widgetFrame)!=null&&s.contentWindow)){u.warn("No widget iframe to communicate with");return}const t=g();this.widgetFrame.contentWindow.postMessage(e,{targetOrigin:t.insightBaseUrl})},this.enableQueue=()=>{this.isQueueingEnabled=!0},this.disableQueue=(e=!1)=>{this.isQueueingEnabled=!1,e&&this.flushQueue()},this.flushQueue=()=>{const e=[...this.messageQueue];this.clearQueue(),e.forEach(t=>{this.postMessage(t)})},this.clearQueue=()=>{this.messageQueue=[]},this.sendOrQueue=e=>{if(this.isQueueingEnabled){this.messageQueue.push(e);return}this.postMessage(e)},this.handleMethodCall=async e=>{const{callId:t,methodName:s,args:a}=e,r=this.methodRegistry[s];if(!r){this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!1,error:{message:`Method "${s}" is not registered`,code:"METHOD_NOT_FOUND"}}});return}try{const n=await r(a||{});this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!0,result:n}})}catch(n){const h=n instanceof Error?n:new Error(String(n));this.postMessage({type:"Method.Response",payload:{callId:t,success:!1,methodName:s,error:{message:h.message,code:"METHOD_EXECUTION_ERROR",stack:h.stack,name:h.name,cause:h.cause,apiResponse:h.response}}})}},this.init=e=>new Promise(t=>{if(!this.widgetFrame){this.reset(),this.enableQueue();const s=g(),{themeConfig:a,entitlements:r={},tenantId:n,tenantName:h,user:w,language:y,container:c,widgetId:b,widgetStyles:o}=e;this.config=e,this.isFrameReady=!1,this.widgetFrame=document.createElement("iframe");const F=(o==null?void 0:o.width)||"350px",M=(o==null?void 0:o.height)||"600px",E={...W,...o,...f};Object.assign(this.widgetFrame.style,E),this.widgetFrame.id=b||"aura-widget",this.widgetFrame.setAttribute("allow",`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`),this.widgetFrame.src=`${s.insightBaseUrl}`,this.widgetFrame.__desiredWidth=F,this.widgetFrame.__desiredHeight=M,this.widgetFrame.onerror=()=>{u.error(`Failed to load iframe. Please ensure your Content Security Policy includes:
|
|
2
2
|
frame-src ${s.insightBaseUrl}
|
|
3
|
-
`)},(c&&document.querySelector(c)||document.body).appendChild(this.widgetFrame);const
|
|
3
|
+
`)},(c&&document.querySelector(c)||document.body).appendChild(this.widgetFrame);const Q=this.eventBus.subscribe("Auth.Ready",()=>{this.isFrameReady=!0,a&&this.setTheme(a),r&&this.setEntitlements(r),this.setUser({tenantId:n,tenantName:h,user:w,language:y})}),R=this.eventBus.subscribe("Auth.Complete",l=>{var m;this.isFrameAuthenticated=!0,this.disableQueue(!0),t(l),(m=e.onAuthenticated)==null||m.call(e,l)});this.unsubscriptions.push(Q,R)}}),this.setUser=e=>{const t=this.config.partnerKey,{tenantId:s,tenantName:a,user:r,language:n}=e;this.config.tenantId=s,this.config.tenantName=a,this.config.user=r,this.config.language=n,this.isFrameAuthenticated=!1,this.postMessage({type:"Auth.Login",payload:{partnerKey:t,tenantId:s,tenantName:a,user:r,language:n}})},this.setTheme=e=>{this.postMessage({type:"Theme.Update",payload:{...e}})},this.setEntitlements=e=>{this.postMessage({type:"Entitlements.Update",payload:{entitlements:e}})},this.show=()=>{if(this.widgetFrame){const e=this.widgetFrame.__desiredWidth||"350px",t=this.widgetFrame.__desiredHeight||"600px",s={opacity:"1",pointerEvents:"auto",width:e,height:t,maxWidth:e,maxHeight:t};Object.assign(this.widgetFrame.style,{...s})}},this.hide=()=>{this.widgetFrame&&Object.assign(this.widgetFrame.style,{...f})},this.reset=()=>{this.widgetFrame&&this.widgetFrame.remove(),this.widgetFrame=null,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.unsubscriptions.forEach(e=>e==null?void 0:e()),this.unsubscriptions=[],this.disableQueue(),this.clearQueue(),this.methodRegistry={}},this.command=e=>{this.sendOrQueue(e),this.show()},this.emit=this.command,this.on=(e,t)=>this.eventBus.subscribe(e,t),this.registerTemplates=e=>{this.sendOrQueue({type:"Template.Register",payload:e})},this.autoRegisterTemplates=e=>{this.sendOrQueue({type:"Template.AutoRegister",payload:e})},this.registerMethod=(e,t)=>{if(typeof e!="string"){u.error("Method name must be a string");return}if(typeof t!="function"){u.error("Method handler for name "+e+" must be a function");return}this.methodRegistry[e]=t},this.unregisterMethod=e=>delete this.methodRegistry[e],this.getConfig=()=>this.config,this.getVersion=()=>"0.1.0-beta.0",window.addEventListener("message",e=>{var t;if(!(e.source!==((t=this.widgetFrame)==null?void 0:t.contentWindow)||!e.data)){if(e.data.type==="Method.Call"){this.handleMethodCall(e.data.payload);return}this.eventBus.emit(e.data.type,e.data.payload)}})}}let d=null;function T(){return d||(d=new B),d}const $=T();exports.AuraWidget=$;exports.configure=O;exports.getConfig=g;
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
const x = {
|
|
2
2
|
insightBaseUrl: "https://anywhere.insighthealth.ai"
|
|
3
3
|
};
|
|
4
|
-
let
|
|
4
|
+
let p = null;
|
|
5
5
|
function A() {
|
|
6
|
-
return
|
|
6
|
+
return p;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
8
|
+
function v(i) {
|
|
9
|
+
p = { ...x, ...i };
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
11
|
+
function $(i) {
|
|
12
|
+
v(i);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function m() {
|
|
15
15
|
const i = A();
|
|
16
16
|
if (!i)
|
|
17
17
|
throw new Error(
|
|
18
|
-
"
|
|
18
|
+
"Insight SDK not configured. Call configure() first to set global configuration."
|
|
19
19
|
);
|
|
20
20
|
return i;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
return "0.0.12";
|
|
24
|
-
}
|
|
25
|
-
class U {
|
|
22
|
+
class C {
|
|
26
23
|
constructor() {
|
|
27
24
|
this.events = {}, this.subscribe = (e, t) => (this.events[e] || (this.events[e] = []), this.events[e].push(t), () => {
|
|
28
25
|
this.events[e] = this.events[e].filter((s) => s !== t);
|
|
@@ -31,24 +28,27 @@ class U {
|
|
|
31
28
|
};
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
31
|
+
function O(i) {
|
|
32
|
+
return {
|
|
33
|
+
log: (e) => {
|
|
34
|
+
console.log(`[${i}]: ${e}`);
|
|
35
|
+
},
|
|
36
|
+
warn: (e) => {
|
|
37
|
+
console.warn(`[${i}]: ${e}`);
|
|
38
|
+
},
|
|
39
|
+
error: (e) => {
|
|
40
|
+
console.error(`[${i}]: ${e}`);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const d = O("Insight Health Aura Widget"), f = {
|
|
45
45
|
opacity: "0",
|
|
46
46
|
pointerEvents: "none",
|
|
47
47
|
width: "0",
|
|
48
48
|
height: "0",
|
|
49
49
|
maxWidth: "0",
|
|
50
50
|
maxHeight: "0"
|
|
51
|
-
},
|
|
51
|
+
}, U = {
|
|
52
52
|
border: "none",
|
|
53
53
|
borderRadius: "10px",
|
|
54
54
|
boxShadow: "0 0 10px 0 rgba(0, 0, 0, 0.1)",
|
|
@@ -60,15 +60,15 @@ const d = new U(), u = {
|
|
|
60
60
|
transition: "opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",
|
|
61
61
|
zIndex: "9999"
|
|
62
62
|
};
|
|
63
|
-
class
|
|
63
|
+
class B {
|
|
64
64
|
constructor() {
|
|
65
|
-
this.config = null, this.widgetFrame = null, this.
|
|
65
|
+
this.config = null, this.widgetFrame = null, this.unsubscriptions = [], this.messageQueue = [], this.isQueueingEnabled = !1, this.methodRegistry = {}, this.eventBus = new C(), this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.postMessage = (e) => {
|
|
66
66
|
var s;
|
|
67
67
|
if (!((s = this.widgetFrame) != null && s.contentWindow)) {
|
|
68
|
-
|
|
68
|
+
d.warn("No widget iframe to communicate with");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const t =
|
|
71
|
+
const t = m();
|
|
72
72
|
this.widgetFrame.contentWindow.postMessage(e, {
|
|
73
73
|
targetOrigin: t.insightBaseUrl
|
|
74
74
|
});
|
|
@@ -118,7 +118,7 @@ class T {
|
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
} catch (n) {
|
|
121
|
-
const
|
|
121
|
+
const h = n instanceof Error ? n : new Error(String(n));
|
|
122
122
|
this.postMessage({
|
|
123
123
|
type: "Method.Response",
|
|
124
124
|
payload: {
|
|
@@ -126,12 +126,12 @@ class T {
|
|
|
126
126
|
success: !1,
|
|
127
127
|
methodName: s,
|
|
128
128
|
error: {
|
|
129
|
-
message:
|
|
129
|
+
message: h.message,
|
|
130
130
|
code: "METHOD_EXECUTION_ERROR",
|
|
131
|
-
stack:
|
|
132
|
-
name:
|
|
133
|
-
cause:
|
|
134
|
-
apiResponse:
|
|
131
|
+
stack: h.stack,
|
|
132
|
+
name: h.name,
|
|
133
|
+
cause: h.cause,
|
|
134
|
+
apiResponse: h.response
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -139,43 +139,49 @@ class T {
|
|
|
139
139
|
}, this.init = (e) => new Promise((t) => {
|
|
140
140
|
if (!this.widgetFrame) {
|
|
141
141
|
this.reset(), this.enableQueue();
|
|
142
|
-
const s =
|
|
142
|
+
const s = m(), {
|
|
143
143
|
themeConfig: a,
|
|
144
144
|
entitlements: r = {},
|
|
145
145
|
tenantId: n,
|
|
146
|
-
tenantName:
|
|
147
|
-
user:
|
|
148
|
-
language:
|
|
149
|
-
container:
|
|
150
|
-
widgetId:
|
|
151
|
-
widgetStyles:
|
|
146
|
+
tenantName: h,
|
|
147
|
+
user: w,
|
|
148
|
+
language: y,
|
|
149
|
+
container: g,
|
|
150
|
+
widgetId: b,
|
|
151
|
+
widgetStyles: o
|
|
152
152
|
} = e;
|
|
153
153
|
this.config = e, this.isFrameReady = !1, this.widgetFrame = document.createElement("iframe");
|
|
154
|
-
const
|
|
155
|
-
...
|
|
156
|
-
...
|
|
157
|
-
...
|
|
154
|
+
const F = (o == null ? void 0 : o.width) || "350px", M = (o == null ? void 0 : o.height) || "600px", E = {
|
|
155
|
+
...U,
|
|
156
|
+
...o,
|
|
157
|
+
...f
|
|
158
158
|
};
|
|
159
|
-
Object.assign(this.widgetFrame.style,
|
|
159
|
+
Object.assign(this.widgetFrame.style, E), this.widgetFrame.id = b || "aura-widget", this.widgetFrame.setAttribute(
|
|
160
160
|
"allow",
|
|
161
161
|
`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`
|
|
162
|
-
), this.widgetFrame.src = `${s.insightBaseUrl}`, this.widgetFrame.__desiredWidth =
|
|
163
|
-
|
|
162
|
+
), this.widgetFrame.src = `${s.insightBaseUrl}`, this.widgetFrame.__desiredWidth = F, this.widgetFrame.__desiredHeight = M, this.widgetFrame.onerror = () => {
|
|
163
|
+
d.error(
|
|
164
164
|
`Failed to load iframe. Please ensure your Content Security Policy includes:
|
|
165
165
|
frame-src ${s.insightBaseUrl}
|
|
166
166
|
`
|
|
167
167
|
);
|
|
168
|
-
}, (
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
}, (g && document.querySelector(g) || document.body).appendChild(this.widgetFrame);
|
|
169
|
+
const Q = this.eventBus.subscribe(
|
|
170
|
+
"Auth.Ready",
|
|
171
|
+
() => {
|
|
172
|
+
this.isFrameReady = !0, a && this.setTheme(a), r && this.setEntitlements(r), this.setUser({ tenantId: n, tenantName: h, user: w, language: y });
|
|
173
|
+
}
|
|
174
|
+
), R = this.eventBus.subscribe(
|
|
172
175
|
"Auth.Complete",
|
|
173
176
|
(c) => {
|
|
174
|
-
var
|
|
175
|
-
this.isFrameAuthenticated = !0, this.disableQueue(!0), t(c), (
|
|
177
|
+
var l;
|
|
178
|
+
this.isFrameAuthenticated = !0, this.disableQueue(!0), t(c), (l = e.onAuthenticated) == null || l.call(e, c);
|
|
176
179
|
}
|
|
177
180
|
);
|
|
178
|
-
this.
|
|
181
|
+
this.unsubscriptions.push(
|
|
182
|
+
Q,
|
|
183
|
+
R
|
|
184
|
+
);
|
|
179
185
|
}
|
|
180
186
|
}), this.setUser = (e) => {
|
|
181
187
|
const t = this.config.partnerKey, { tenantId: s, tenantName: a, user: r, language: n } = e;
|
|
@@ -216,12 +222,12 @@ class T {
|
|
|
216
222
|
Object.assign(this.widgetFrame.style, { ...s });
|
|
217
223
|
}
|
|
218
224
|
}, this.hide = () => {
|
|
219
|
-
this.widgetFrame && Object.assign(this.widgetFrame.style, { ...
|
|
225
|
+
this.widgetFrame && Object.assign(this.widgetFrame.style, { ...f });
|
|
220
226
|
}, this.reset = () => {
|
|
221
|
-
this.widgetFrame && this.widgetFrame.remove(), this.widgetFrame = null, this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.
|
|
227
|
+
this.widgetFrame && this.widgetFrame.remove(), this.widgetFrame = null, this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.unsubscriptions.forEach((e) => e == null ? void 0 : e()), this.unsubscriptions = [], this.disableQueue(), this.clearQueue(), this.methodRegistry = {};
|
|
222
228
|
}, this.command = (e) => {
|
|
223
229
|
this.sendOrQueue(e), this.show();
|
|
224
|
-
}, this.emit = this.command, this.on = (e, t) =>
|
|
230
|
+
}, this.emit = this.command, this.on = (e, t) => this.eventBus.subscribe(e, t), this.registerTemplates = (e) => {
|
|
225
231
|
this.sendOrQueue({
|
|
226
232
|
type: "Template.Register",
|
|
227
233
|
payload: e
|
|
@@ -233,15 +239,15 @@ class T {
|
|
|
233
239
|
});
|
|
234
240
|
}, this.registerMethod = (e, t) => {
|
|
235
241
|
if (typeof e != "string") {
|
|
236
|
-
|
|
242
|
+
d.error("Method name must be a string");
|
|
237
243
|
return;
|
|
238
244
|
}
|
|
239
245
|
if (typeof t != "function") {
|
|
240
|
-
|
|
246
|
+
d.error("Method handler for name " + e + " must be a function");
|
|
241
247
|
return;
|
|
242
248
|
}
|
|
243
249
|
this.methodRegistry[e] = t;
|
|
244
|
-
}, this.unregisterMethod = (e) => delete this.methodRegistry[e], this.getConfig = () => this.config, this.getVersion = () =>
|
|
250
|
+
}, this.unregisterMethod = (e) => delete this.methodRegistry[e], this.getConfig = () => this.config, this.getVersion = () => "0.1.0-beta.0", window.addEventListener(
|
|
245
251
|
"message",
|
|
246
252
|
(e) => {
|
|
247
253
|
var t;
|
|
@@ -252,20 +258,19 @@ class T {
|
|
|
252
258
|
);
|
|
253
259
|
return;
|
|
254
260
|
}
|
|
255
|
-
|
|
261
|
+
this.eventBus.emit(e.data.type, e.data.payload);
|
|
256
262
|
}
|
|
257
263
|
}
|
|
258
264
|
);
|
|
259
265
|
}
|
|
260
266
|
}
|
|
261
|
-
let
|
|
262
|
-
function
|
|
263
|
-
return
|
|
267
|
+
let u = null;
|
|
268
|
+
function W() {
|
|
269
|
+
return u || (u = new B()), u;
|
|
264
270
|
}
|
|
265
|
-
const
|
|
271
|
+
const T = W();
|
|
266
272
|
export {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
O as getVersion
|
|
273
|
+
T as AuraWidget,
|
|
274
|
+
$ as configure,
|
|
275
|
+
m as getConfig
|
|
271
276
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(r,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(r=typeof globalThis<"u"?globalThis:r||self,u(r.InsightAura={}))})(this,function(r){"use strict";const u={insightBaseUrl:"https://anywhere.insighthealth.ai"};let m=null;function
|
|
1
|
+
(function(r,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(r=typeof globalThis<"u"?globalThis:r||self,u(r.InsightAura={}))})(this,function(r){"use strict";const u={insightBaseUrl:"https://anywhere.insighthealth.ai"};let m=null;function b(){return m}function F(i){m={...u,...i}}function M(i){F(i)}function c(){const i=b();if(!i)throw new Error("Insight SDK not configured. Call configure() first to set global configuration.");return i}class E{constructor(){this.events={},this.subscribe=(e,t)=>(this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}),this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach(s=>s(t))}}}function Q(i){return{log:e=>{console.log(`[${i}]: ${e}`)},warn:e=>{console.warn(`[${i}]: ${e}`)},error:e=>{console.error(`[${i}]: ${e}`)}}}const g=Q("Insight Health Aura Widget"),f={opacity:"0",pointerEvents:"none",width:"0",height:"0",maxWidth:"0",maxHeight:"0"},R={border:"none",borderRadius:"10px",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",overflow:"hidden",background:"#fff",position:"fixed",bottom:"20px",right:"20px",transition:"opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",zIndex:"9999"};class x{constructor(){this.config=null,this.widgetFrame=null,this.unsubscriptions=[],this.messageQueue=[],this.isQueueingEnabled=!1,this.methodRegistry={},this.eventBus=new E,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.postMessage=e=>{var s;if(!((s=this.widgetFrame)!=null&&s.contentWindow)){g.warn("No widget iframe to communicate with");return}const t=c();this.widgetFrame.contentWindow.postMessage(e,{targetOrigin:t.insightBaseUrl})},this.enableQueue=()=>{this.isQueueingEnabled=!0},this.disableQueue=(e=!1)=>{this.isQueueingEnabled=!1,e&&this.flushQueue()},this.flushQueue=()=>{const e=[...this.messageQueue];this.clearQueue(),e.forEach(t=>{this.postMessage(t)})},this.clearQueue=()=>{this.messageQueue=[]},this.sendOrQueue=e=>{if(this.isQueueingEnabled){this.messageQueue.push(e);return}this.postMessage(e)},this.handleMethodCall=async e=>{const{callId:t,methodName:s,args:h}=e,a=this.methodRegistry[s];if(!a){this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!1,error:{message:`Method "${s}" is not registered`,code:"METHOD_NOT_FOUND"}}});return}try{const n=await a(h||{});this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!0,result:n}})}catch(n){const o=n instanceof Error?n:new Error(String(n));this.postMessage({type:"Method.Response",payload:{callId:t,success:!1,methodName:s,error:{message:o.message,code:"METHOD_EXECUTION_ERROR",stack:o.stack,name:o.name,cause:o.cause,apiResponse:o.response}}})}},this.init=e=>new Promise(t=>{if(!this.widgetFrame){this.reset(),this.enableQueue();const s=c(),{themeConfig:h,entitlements:a={},tenantId:n,tenantName:o,user:O,language:T,container:p,widgetId:C,widgetStyles:d}=e;this.config=e,this.isFrameReady=!1,this.widgetFrame=document.createElement("iframe");const U=(d==null?void 0:d.width)||"350px",W=(d==null?void 0:d.height)||"600px",B={...R,...d,...f};Object.assign(this.widgetFrame.style,B),this.widgetFrame.id=C||"aura-widget",this.widgetFrame.setAttribute("allow",`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`),this.widgetFrame.src=`${s.insightBaseUrl}`,this.widgetFrame.__desiredWidth=U,this.widgetFrame.__desiredHeight=W,this.widgetFrame.onerror=()=>{g.error(`Failed to load iframe. Please ensure your Content Security Policy includes:
|
|
2
2
|
frame-src ${s.insightBaseUrl}
|
|
3
|
-
`)},(
|
|
3
|
+
`)},(p&&document.querySelector(p)||document.body).appendChild(this.widgetFrame);const $=this.eventBus.subscribe("Auth.Ready",()=>{this.isFrameReady=!0,h&&this.setTheme(h),a&&this.setEntitlements(a),this.setUser({tenantId:n,tenantName:o,user:O,language:T})}),I=this.eventBus.subscribe("Auth.Complete",w=>{var y;this.isFrameAuthenticated=!0,this.disableQueue(!0),t(w),(y=e.onAuthenticated)==null||y.call(e,w)});this.unsubscriptions.push($,I)}}),this.setUser=e=>{const t=this.config.partnerKey,{tenantId:s,tenantName:h,user:a,language:n}=e;this.config.tenantId=s,this.config.tenantName=h,this.config.user=a,this.config.language=n,this.isFrameAuthenticated=!1,this.postMessage({type:"Auth.Login",payload:{partnerKey:t,tenantId:s,tenantName:h,user:a,language:n}})},this.setTheme=e=>{this.postMessage({type:"Theme.Update",payload:{...e}})},this.setEntitlements=e=>{this.postMessage({type:"Entitlements.Update",payload:{entitlements:e}})},this.show=()=>{if(this.widgetFrame){const e=this.widgetFrame.__desiredWidth||"350px",t=this.widgetFrame.__desiredHeight||"600px",s={opacity:"1",pointerEvents:"auto",width:e,height:t,maxWidth:e,maxHeight:t};Object.assign(this.widgetFrame.style,{...s})}},this.hide=()=>{this.widgetFrame&&Object.assign(this.widgetFrame.style,{...f})},this.reset=()=>{this.widgetFrame&&this.widgetFrame.remove(),this.widgetFrame=null,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.unsubscriptions.forEach(e=>e==null?void 0:e()),this.unsubscriptions=[],this.disableQueue(),this.clearQueue(),this.methodRegistry={}},this.command=e=>{this.sendOrQueue(e),this.show()},this.emit=this.command,this.on=(e,t)=>this.eventBus.subscribe(e,t),this.registerTemplates=e=>{this.sendOrQueue({type:"Template.Register",payload:e})},this.autoRegisterTemplates=e=>{this.sendOrQueue({type:"Template.AutoRegister",payload:e})},this.registerMethod=(e,t)=>{if(typeof e!="string"){g.error("Method name must be a string");return}if(typeof t!="function"){g.error("Method handler for name "+e+" must be a function");return}this.methodRegistry[e]=t},this.unregisterMethod=e=>delete this.methodRegistry[e],this.getConfig=()=>this.config,this.getVersion=()=>"0.1.0-beta.0",window.addEventListener("message",e=>{var t;if(!(e.source!==((t=this.widgetFrame)==null?void 0:t.contentWindow)||!e.data)){if(e.data.type==="Method.Call"){this.handleMethodCall(e.data.payload);return}this.eventBus.emit(e.data.type,e.data.payload)}})}}let l=null;function A(){return l||(l=new x),l}const v=A();r.AuraWidget=v,r.configure=M,r.getConfig=c,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
/**
|
|
6
|
-
* Require at least one of the specified keys to be present.
|
|
7
|
-
*/
|
|
8
|
-
export type AtLeastOneOf<T extends AnyObject, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[P in K]: Required<Pick<T, P>> & Partial<Pick<T, Exclude<K, P>>>;
|
|
10
|
-
}[K];
|
|
11
|
-
export type AuraWidgetEmitEvent<T = any> = {
|
|
12
|
-
type: string;
|
|
13
|
-
payload: T;
|
|
14
|
-
};
|
|
15
|
-
export type OverrideThemeColors = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
16
|
-
export type ThemeConfig = {
|
|
17
|
-
/**
|
|
18
|
-
* Override theme colors (hex strings) for the in-frame widget.
|
|
19
|
-
*/
|
|
20
|
-
colors?: Partial<Record<OverrideThemeColors, string>>;
|
|
21
|
-
};
|
|
22
|
-
export type Entitlements = Record<string, boolean>;
|
|
1
|
+
import { AtLeastOneOf, WidgetEmitEvent, WidgetMessageEvent, ThemeConfig, Entitlements } from '@insight-health/core';
|
|
2
|
+
export type { AnyObject, AtLeastOneOf, WidgetEmitEvent, WidgetMessageEvent, OverrideThemeColors, ThemeConfig, Entitlements, } from '@insight-health/core';
|
|
3
|
+
export type AuraWidgetEmitEvent<T = any> = WidgetEmitEvent<T>;
|
|
4
|
+
export type AuraWidgetMessageEvent<T = any> = WidgetMessageEvent<T>;
|
|
23
5
|
export type AuraWidgetInitParams = {
|
|
24
6
|
partnerKey: string;
|
|
25
7
|
tenantId: string | number;
|
|
@@ -46,10 +28,6 @@ export type AuraWidgetInitParams = {
|
|
|
46
28
|
entitlements?: Entitlements;
|
|
47
29
|
};
|
|
48
30
|
export type AuthParams = Pick<AuraWidgetInitParams, 'tenantId' | 'tenantName' | 'user' | 'language'>;
|
|
49
|
-
export type AuraWidgetMessageEvent<T = any> = {
|
|
50
|
-
type: string;
|
|
51
|
-
payload: T;
|
|
52
|
-
};
|
|
53
31
|
export type TemplateSectionDefinition = {
|
|
54
32
|
name: string;
|
|
55
33
|
type: 'openText' | 'singleSelect' | 'multiSelect' | 'openSingleSelect' | 'openMultiSelect' | 'boolean' | 'number';
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,E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
|
{
|
|
2
2
|
"name": "@insight-health/aura",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
4
|
"description": "Aura SDK package for Insight Health AI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
"url": "https://github.com/insight-health-ai/insight-sdk-web.git",
|
|
32
32
|
"directory": "packages/aura"
|
|
33
33
|
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@insight-health/core": "0.0.1"
|
|
36
|
+
},
|
|
34
37
|
"publishConfig": {
|
|
35
38
|
"access": "public"
|
|
36
39
|
},
|
package/dist/globalConfig.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Global storage for Aura SDK configuration
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Root-level global configuration
|
|
6
|
-
* Shared across all services/interfaces
|
|
7
|
-
*/
|
|
8
|
-
export interface GlobalConfig {
|
|
9
|
-
insightBaseUrl?: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get the global configuration
|
|
13
|
-
*/
|
|
14
|
-
export declare function getGlobalConfig(): GlobalConfig | null;
|
|
15
|
-
/**
|
|
16
|
-
* Set the global configuration
|
|
17
|
-
*/
|
|
18
|
-
export declare function setGlobalConfig(config: GlobalConfig): void;
|
|
19
|
-
/**
|
|
20
|
-
* Clear the global configuration
|
|
21
|
-
*/
|
|
22
|
-
export declare function clearGlobalConfig(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Check if global configuration is set
|
|
25
|
-
*/
|
|
26
|
-
export declare function hasGlobalConfig(): boolean;
|
|
27
|
-
//# sourceMappingURL=globalConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"globalConfig.d.ts","sourceRoot":"","sources":["../src/globalConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CAEzB;AAQD;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,GAAG,IAAI,CAErD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC"}
|
package/dist/root.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { GlobalConfig } from './globalConfig';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Configure the Aura SDK globally (root-level)
|
|
5
|
-
* Sets base configuration like baseUrl, apiKey, etc.
|
|
6
|
-
* This configuration is shared across all services
|
|
7
|
-
*/
|
|
8
|
-
export declare function configure(config: GlobalConfig): void;
|
|
9
|
-
export declare function getConfig(): GlobalConfig;
|
|
10
|
-
export declare function getVersion(): string;
|
|
11
|
-
//# sourceMappingURL=root.d.ts.map
|
package/dist/root.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAmB,MAAM,gBAAgB,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAEpD;AAED,wBAAgB,SAAS,IAAI,YAAY,CAQxC;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
package/dist/utils/eventBus.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../../src/utils/eventBus.ts"],"names":[],"mappings":"AAAA,cAAM,QAAQ;IACZ,OAAO,CAAC,MAAM,CAA+C;IAE7D,SAAS,GAAI,OAAO,MAAM,EAAE,UAAU,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,gBASvD;IAEF,IAAI,GAAI,OAAO,MAAM,EAAE,SAAS,GAAG,UAKjC;CACH;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;mBACF,MAAM;oBAGL,MAAM;qBAGL,MAAM;CAGxB,CAAC"}
|