@eka-care/medassist-widget-embed 0.0.0 → 0.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,gBAAgB,QAAO,iBAAiB,GAAG,IAchD,CAAC;AAEF,QAAA,MAAM,yBAAyB,yEACyC,CAAC;AAEzE,QAAA,MAAM,QAAQ,0BAAqB,CAAC;AACpC,QAAA,MAAM,aAAa,QASf,CAAC;AAEL,QAAA,MAAM,kBAAkB,QAmBpB,CAAC;AAEL,QAAA,MAAM,aAAa,QAA6C,CAAC;AACjE,QAAA,MAAM,cAAc,QAA8C,CAAC;AAGnE,QAAA,IAAI,mBAAmB,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAW,CAAC;AACrD,QAAA,IAAI,oBAAoB,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAW,CAAC;AAExD,cAAM,qBAAsB,SAAQ,WAAW;IAC7C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAU;;IAU9B,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,iBAAiB,IAAI,IAAI;IAIzB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5C,YAAY,IAAI,IAAI;IA+Dd,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IA6C9B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BpC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CA0ClC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,gBAAgB,QAAO,iBAAiB,GAAG,IAchD,CAAC;AAEF,QAAA,MAAM,yBAAyB,yEACyC,CAAC;AAEzE,QAAA,MAAM,QAAQ,0BAAqB,CAAC;AACpC,QAAA,MAAM,aAAa,QASf,CAAC;AAEL,QAAA,MAAM,kBAAkB,QAmBpB,CAAC;AAEL,QAAA,MAAM,aAAa,QAA6C,CAAC;AACjE,QAAA,MAAM,cAAc,QAA8C,CAAC;AAGnE,QAAA,IAAI,mBAAmB,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAW,CAAC;AACrD,QAAA,IAAI,oBAAoB,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAW,CAAC;AAExD,cAAM,qBAAsB,SAAQ,WAAW;IAC7C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAU;;IAU9B,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,iBAAiB,IAAI,IAAI;IAIzB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5C,YAAY,IAAI,IAAI;IA+Dd,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IA8C9B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BpC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CA0ClC"}
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ class MedAssistWidgetLoader extends HTMLElement {
91
91
  border-radius: 50%;
92
92
  border: none;
93
93
  cursor: pointer;
94
- background-color: #007bff;
94
+ background-color:rgb(255, 255, 255);
95
95
  padding: 0;
96
96
  display: flex;
97
97
  align-items: center;
@@ -109,7 +109,7 @@ class MedAssistWidgetLoader extends HTMLElement {
109
109
  z-index: 200000;
110
110
  }
111
111
  #medassist-open-btn:hover {
112
- background-color: #0056b3;
112
+ background-color:rgb(239, 237, 245);
113
113
  }
114
114
  .hidden {
115
115
  display: none;
@@ -142,6 +142,8 @@ class MedAssistWidgetLoader extends HTMLElement {
142
142
  const button = shadowRoot.getElementById("medassist-open-btn");
143
143
  const rootElement = shadowRoot.getElementById("medassist-widget-root");
144
144
  const agentId = this.getAttribute("agent-id");
145
+ const iconUrl = this.getAttribute("icon-url") || this.defaultIconUrl;
146
+ console.log("iconUrl", iconUrl, this.defaultIconUrl);
145
147
  if (!agentId) {
146
148
  console.error("Agent ID is required");
147
149
  return;
@@ -153,7 +155,7 @@ class MedAssistWidgetLoader extends HTMLElement {
153
155
  button.classList.add("hidden");
154
156
  rootElement.classList.remove("hidden");
155
157
  if (this.widgetLoaded) {
156
- (_a = window.renderMedAssist) === null || _a === void 0 ? void 0 : _a.call(window, rootElement, agentId);
158
+ (_a = window.renderMedAssist) === null || _a === void 0 ? void 0 : _a.call(window, rootElement, agentId, iconUrl);
157
159
  return;
158
160
  }
159
161
  try {
@@ -161,7 +163,7 @@ class MedAssistWidgetLoader extends HTMLElement {
161
163
  if (typeof window.renderMedAssist !== "function") {
162
164
  throw new Error("renderMedAssist is not available on window");
163
165
  }
164
- window.renderMedAssist(rootElement, agentId);
166
+ window.renderMedAssist(rootElement, agentId, iconUrl);
165
167
  this.widgetLoaded = true;
166
168
  }
167
169
  catch (error) {