@weavy/uikit-react 26.0.2 → 26.0.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/weavy.mjs CHANGED
@@ -28617,7 +28617,7 @@ const Ry = (Mt = class {
28617
28617
  q(this, My, !0), console.info(this.weavyId, "was destroyed");
28618
28618
  }
28619
28619
  }, u(Mt, "Gt"), Mt);
28620
- og = /* @__PURE__ */ new WeakMap(), lg = /* @__PURE__ */ new WeakMap(), Us = /* @__PURE__ */ new WeakMap(), My = /* @__PURE__ */ new WeakMap(), p(Ry, "WeavyClient"), Ry.version = "26.0.2", Ry.sourceName = "@weavy/uikit-web", Ry.defaults = {
28620
+ og = /* @__PURE__ */ new WeakMap(), lg = /* @__PURE__ */ new WeakMap(), Us = /* @__PURE__ */ new WeakMap(), My = /* @__PURE__ */ new WeakMap(), p(Ry, "WeavyClient"), Ry.version = "26.0.3", Ry.sourceName = "@weavy/uikit-web", Ry.defaults = {
28621
28621
  cloudFilePickerUrl: "https://filebrowser.weavy.io/v14/",
28622
28622
  disableEnvironmentImports: !1,
28623
28623
  gcTime: 1e3 * 60 * 60 * 24,
@@ -42191,25 +42191,32 @@ let Br = (o0 = (Up = class extends Ce {
42191
42191
  /**
42192
42192
  * Checks if a conversation belongs to Messenger.
42193
42193
  *
42194
+ * @deprecated
42194
42195
  * @param conversation {AppRef | AppType | number} - The conversation or id to check if it belongs to Messenger.
42195
42196
  * @returns Promise<Boolean>
42196
42197
  */
42197
42198
  async conversationBelongsToMessenger(t) {
42198
- return this.weavy ? !!await nE(this.weavy, t, this.appTypes, this.bot) : !1;
42199
+ return console.warn("conversationBelongsToMessenger() is deprecated. Compare app to to .appTypes instead."), this.weavy ? !!await nE(this.weavy, t, this.appTypes, this.bot) : !1;
42200
+ }
42201
+ /**
42202
+ * Set the active conversation.
42203
+ *
42204
+ * @deprecated
42205
+ * @param id {number} - The id of the conversation to select.
42206
+ */
42207
+ async selectConversation(t) {
42208
+ return console.warn("selectConversation() is deprecated. Set .conversationId instead."), this.conversationId = t, !0;
42199
42209
  }
42200
42210
  /**
42201
42211
  * Deselects any active conversation.
42212
+ * @deprecated
42202
42213
  */
42203
42214
  clearConversation() {
42204
- this.conversationId = null;
42215
+ console.warn("clearConversation() is deprecated. Set .conversationId to null instead."), this.conversationId = null;
42205
42216
  }
42206
42217
  async willUpdate(t) {
42207
42218
  var i, n;
42208
- if (super.willUpdate(t), (t.has("weavy") || t.has("bot") || t.has("user")) && this.weavy && this.user && this.persistState.observe(["conversationId"], this.bot || "messenger", `u${(i = this.user) == null ? void 0 : i.id}`), t.has("link") && (n = this.link) != null && n.app)
42209
- if (await this.conversationBelongsToMessenger(this.link.app))
42210
- this.conversationId = this.link.app.id;
42211
- else
42212
- throw new Error("Not a conversation");
42219
+ super.willUpdate(t), (t.has("weavy") || t.has("bot") || t.has("user")) && this.weavy && this.user && this.persistState.observe(["conversationId"], this.bot || "messenger", `u${(i = this.user) == null ? void 0 : i.id}`), t.has("link") && (n = this.link) != null && n.app && (this.conversationId = this.link.app.id);
42213
42220
  }
42214
42221
  update(t) {
42215
42222
  super.update(t), (t.has("conversationId") || t.has("weavy")) && this.weavy && (this.conversationId ? this.conversationQuery.trackQuery(iE(this.weavy, this.conversationId, this.appTypes)) : this.conversationQuery.untrackQuery());
@@ -42268,7 +42275,7 @@ Rv([
42268
42275
  x({ type: String })
42269
42276
  ], Br.prototype, "bot", 1);
42270
42277
  Rv([
42271
- B()
42278
+ x({ type: Number })
42272
42279
  ], Br.prototype, "conversationId", 2);
42273
42280
  Br = Rv([
42274
42281
  F(Z_),
@@ -43934,7 +43941,7 @@ const ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43934
43941
  return gn;
43935
43942
  }
43936
43943
  }, Symbol.toStringTag, { value: "Module" }));
43937
- rn.version = "26.0.2";
43944
+ rn.version = "26.0.3";
43938
43945
  rn.sourceName = "@weavy/uikit-react";
43939
43946
  const $F = $L(null);
43940
43947
  function UH(s, t = []) {