@enegelai/bot-widget 1.6.2 → 1.6.3

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.es.js CHANGED
@@ -4858,7 +4858,12 @@ let be = class extends Q {
4858
4858
  super(...arguments), this.placeholder = "Type a message...", this.sendButtonLabel = "Send", this.enableFileUpload = !1, this.value = "", this.loading = !1, this.disabled = !1, this.currentKey = "";
4859
4859
  }
4860
4860
  connectedCallback() {
4861
- super.connectedCallback(), addEventListener("form:submit", this._formSubmitHandler.bind(this));
4861
+ super.connectedCallback(), addEventListener("form:submit", this._formSubmitHandler.bind(this)), addEventListener("c7o:bot:input:setvalue", this._inputSetValueHandler.bind(this));
4862
+ }
4863
+ async _inputSetValueHandler(a) {
4864
+ var c;
4865
+ const t = a;
4866
+ this.value = ((c = t == null ? void 0 : t.detail) == null ? void 0 : c.inputValue) || "";
4862
4867
  }
4863
4868
  async _formSubmitHandler(a) {
4864
4869
  requestIdleCallback(() => {
@@ -6050,6 +6055,13 @@ let P = class extends Q {
6050
6055
  setOpen(a = !1) {
6051
6056
  x.open = a;
6052
6057
  }
6058
+ setInputValue(a = "") {
6059
+ a && a !== "" && this.emit("c7o:bot:input:setvalue", {
6060
+ detail: {
6061
+ inputValue: a
6062
+ }
6063
+ });
6064
+ }
6053
6065
  // check auth
6054
6066
  _checkAuth() {
6055
6067
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enegelai/bot-widget",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Enegel.ai Bot Widget",
5
5
  "scripts": {
6
6
  "dev": "vite",