@eka-care/medassist-widget-embed 0.2.0-dev.0 → 0.2.0-dev.1
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/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,QAAO,iBAAiB,GAAG,IAahD,CAAC;AAEF,KAAK,iBAAiB,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;AAElE,QAAA,MAAM,cAAc,GAClB,OAAO,MAAM,GAAG,IAAI,KACnB,iBAAiB,GAAG,SAStB,CAAC;AAEF,QAAA,MAAM,QAAQ,0BAAqB,CAAC;AAGpC,QAAA,MAAM,yBAAyB,QAK3B,CAAC;AAEL,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,UAAU,kBAAmB,SAAQ,MAAM;IACzC,YAAY,CAAC,EAAE;QACb,IAAI,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;QAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,sBAAsB,CAAC,EAAE,mBAAmB,CAAC;CAC9C;AAED,QAAA,MAAM,qBAAqB,EAAE,mBAAwB,CAAC;AAEtD,QAAA,MAAM,gBAAgB,QAAO,WAAW,GAAG,IAK1C,CAAC;AA6BF,QAAA,MAAM,aAAa,QASf,CAAC;AAEL,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if (this.displayMode === "widget") {
|
|
123
|
-
console.log("calling renderButton in attributeChangedCallback");
|
|
124
123
|
this.renderButton();
|
|
125
124
|
}
|
|
126
125
|
}
|
|
@@ -132,7 +131,6 @@ class MedAssistWidgetLoader extends HTMLElement {
|
|
|
132
131
|
this.initializeFullMode();
|
|
133
132
|
}
|
|
134
133
|
else {
|
|
135
|
-
console.log("calling renderButton in attributeChangedCallback for widget mode");
|
|
136
134
|
this.renderButton();
|
|
137
135
|
}
|
|
138
136
|
}
|
|
@@ -140,12 +138,10 @@ class MedAssistWidgetLoader extends HTMLElement {
|
|
|
140
138
|
}
|
|
141
139
|
openFromBridge() {
|
|
142
140
|
this.displayMode = this.getAttribute("display-mode") === "full" ? "full" : "widget";
|
|
143
|
-
console.log("displayMode", this.displayMode);
|
|
144
141
|
if (this.displayMode === "full") {
|
|
145
142
|
this.initializeFullMode();
|
|
146
143
|
}
|
|
147
144
|
else {
|
|
148
|
-
console.log("calling renderButton");
|
|
149
145
|
this.renderButton();
|
|
150
146
|
}
|
|
151
147
|
this.loadWidgetCss()
|
|
@@ -30346,10 +30346,16 @@ var MedAssistWidget = (function(exports) {
|
|
|
30346
30346
|
description: error?.displayMessage || "Please try again later"
|
|
30347
30347
|
});
|
|
30348
30348
|
break;
|
|
30349
|
+
case distExports.SynapseErrorCode.CONNECTION:
|
|
30350
|
+
setError({
|
|
30351
|
+
title: "Connecting...",
|
|
30352
|
+
description: "Please wait while we connect to the server"
|
|
30353
|
+
});
|
|
30354
|
+
break;
|
|
30349
30355
|
default:
|
|
30350
|
-
console.error("useChat: Error from SDK", error.code);
|
|
30356
|
+
console.error("useChat: Error from SDK from onError callback", error.code, error);
|
|
30351
30357
|
setError({
|
|
30352
|
-
title: "Something went wrong",
|
|
30358
|
+
title: error?.displayMessage || "Something went wrong",
|
|
30353
30359
|
description: "Please try again later"
|
|
30354
30360
|
});
|
|
30355
30361
|
setShowRetryButton(true);
|
|
@@ -30600,7 +30606,7 @@ var MedAssistWidget = (function(exports) {
|
|
|
30600
30606
|
}
|
|
30601
30607
|
});
|
|
30602
30608
|
synapseRef.current?.on(distExports.SYNAPSE_REALTIME_EVENTS.ERROR, (error) => {
|
|
30603
|
-
console.log("error from sdk", error);
|
|
30609
|
+
console.log("error from sdk on ERROR event", error);
|
|
30604
30610
|
const errorMessage = error.message || error.displayMessage || "Something went wrong";
|
|
30605
30611
|
setError({
|
|
30606
30612
|
title: errorMessage,
|