@cloudflare/realtimekit-ui 2.0.3-staging.8 → 2.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.
Files changed (76) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/rtk-avatar_26.cjs.entry.js +19 -19
  3. package/dist/cjs/rtk-breakout-rooms-manager_8.cjs.entry.js +2 -2
  4. package/dist/cjs/rtk-grid.cjs.entry.js +3 -1
  5. package/dist/cjs/rtk-message-list-view.cjs.entry.js +3 -3
  6. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +2 -2
  7. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +2 -2
  8. package/dist/collection/components/rtk-ai/rtk-ai.js +2 -4
  9. package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +4 -6
  10. package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +8 -7
  11. package/dist/collection/components/rtk-chat-selector/rtk-chat-selector.js +9 -10
  12. package/dist/collection/components/rtk-grid/rtk-grid.js +3 -1
  13. package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.js +2 -4
  14. package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +4 -4
  15. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +4 -4
  16. package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.js +2 -4
  17. package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.js +2 -4
  18. package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +4 -6
  19. package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +3 -3
  20. package/dist/components/{p-EkUCxpDZ.js → p-BoqfUgTL.js} +1 -1
  21. package/dist/components/p-ByPpyWt6.js +1 -0
  22. package/dist/components/{p-BsgKgxKu.js → p-C0ESgBoj.js} +1 -1
  23. package/dist/components/{p-qDy7F0Tr.js → p-C9UuqXCX.js} +1 -1
  24. package/dist/components/{p-Bmk8auxt.js → p-CAsupO2z.js} +1 -1
  25. package/dist/components/{p-CXq0ujSg.js → p-CNaazJXM.js} +1 -1
  26. package/dist/components/{p-DbBGSlfQ.js → p-E1D1eNFh.js} +1 -1
  27. package/dist/components/{p-l-tiOHlG.js → p-Ryaxu6vl.js} +1 -1
  28. package/dist/components/{p-A83Jz8rO.js → p-VHRH6fkb.js} +1 -1
  29. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  30. package/dist/components/rtk-chat-composer-view.js +1 -1
  31. package/dist/components/rtk-chat-header.js +1 -1
  32. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  33. package/dist/components/rtk-chat-search-results.js +1 -1
  34. package/dist/components/rtk-chat-selector.js +1 -1
  35. package/dist/components/rtk-chat.js +1 -1
  36. package/dist/components/rtk-dialog-manager.js +1 -1
  37. package/dist/components/rtk-grid.js +1 -1
  38. package/dist/components/rtk-meeting.js +1 -1
  39. package/dist/components/rtk-message-list-view.js +1 -1
  40. package/dist/components/rtk-paginated-list.js +1 -1
  41. package/dist/components/rtk-participants.js +1 -1
  42. package/dist/components/rtk-pinned-message-selector.js +1 -1
  43. package/dist/components/rtk-sidebar-ui.js +1 -1
  44. package/dist/components/rtk-sidebar.js +1 -1
  45. package/dist/components/rtk-spotlight-grid.js +1 -1
  46. package/dist/docs/docs-components.json +11 -11
  47. package/dist/docs/docs-vscode.json +8 -8
  48. package/dist/esm/loader.js +31 -29
  49. package/dist/esm/rtk-avatar_26.entry.js +19 -19
  50. package/dist/esm/rtk-breakout-rooms-manager_8.entry.js +2 -2
  51. package/dist/esm/rtk-grid.entry.js +3 -1
  52. package/dist/esm/rtk-message-list-view.entry.js +3 -3
  53. package/dist/esm/rtk-sidebar-ui.entry.js +2 -2
  54. package/dist/esm/rtk-spotlight-grid.entry.js +2 -2
  55. package/dist/realtimekit-ui/{p-64bc4514.entry.js → p-20734a3a.entry.js} +1 -1
  56. package/dist/realtimekit-ui/{p-31c97dcd.entry.js → p-8cdd8307.entry.js} +1 -1
  57. package/dist/realtimekit-ui/{p-2da96ec3.entry.js → p-b27db286.entry.js} +1 -1
  58. package/dist/realtimekit-ui/{p-2308568a.entry.js → p-ce81ffaa.entry.js} +1 -1
  59. package/dist/realtimekit-ui/{p-f2de718a.entry.js → p-d30c178f.entry.js} +1 -1
  60. package/dist/realtimekit-ui/p-ff89f0f6.entry.js +1 -0
  61. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  62. package/dist/types/components/rtk-ai/rtk-ai.d.ts +2 -4
  63. package/dist/types/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.d.ts +2 -4
  64. package/dist/types/components/rtk-chat-composer-view/rtk-chat-composer-view.d.ts +1 -0
  65. package/dist/types/components/rtk-chat-selector/rtk-chat-selector.d.ts +1 -1
  66. package/dist/types/components/rtk-livestream-toggle/rtk-livestream-toggle.d.ts +2 -4
  67. package/dist/types/components/rtk-message-list-view/rtk-message-list-view.d.ts +1 -1
  68. package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +1 -1
  69. package/dist/types/components/rtk-participants-stage-queue/rtk-participants-stage-queue.d.ts +2 -4
  70. package/dist/types/components/rtk-pip-toggle/rtk-pip-toggle.d.ts +2 -4
  71. package/dist/types/components/rtk-sidebar-ui/rtk-sidebar-ui.d.ts +2 -4
  72. package/dist/types/components/rtk-spotlight-grid/rtk-spotlight-grid.d.ts +1 -1
  73. package/dist/types/components.d.ts +57 -79
  74. package/package.json +3 -2
  75. package/dist/components/p-DzDWIdoE.js +0 -1
  76. package/dist/realtimekit-ui/p-cf7f7d9c.entry.js +0 -1
@@ -13793,6 +13793,7 @@ const RtkChatComposerView = class {
13793
13793
  this.onQuotedMessageDismiss = createEvent(this, "quotedMessageDismiss", 7);
13794
13794
  /** Whether user can send text messages */
13795
13795
  this.canSendTextMessage = true;
13796
+ /** Whether a message is being sent */
13796
13797
  this.isSending = false;
13797
13798
  /** Whether user can send file messages */
13798
13799
  this.canSendFiles = true;
@@ -13938,17 +13939,17 @@ const RtkChatComposerView = class {
13938
13939
  render() {
13939
13940
  var _a;
13940
13941
  const uiProps = { iconPack: this.iconPack, t: this.t };
13941
- return (h(Host, { key: '2df23422579c855ced1cb6d24bb95786a1326baf' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'a7ed280a636d0207f58f0ad13f79c1eaed52ab9c', part: "emoji-picker", onPickerClose: () => {
13942
+ return (h(Host, { key: '9b1caad153f14eae50191e4b9c33b73d6f1051fa' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'c27927a302c1420bc115707491e0aa0a6b9e8286', part: "emoji-picker", onPickerClose: () => {
13942
13943
  this.isEmojiPickerOpen = false;
13943
13944
  }, onRtkEmojiClicked: (e) => {
13944
13945
  this.textMessage += e.detail;
13945
13946
  this.$textComposer.setText(this.textMessage, true);
13946
- } }, uiProps))), h("slot", { key: '759df2a2029fbba963cfc26cd871771881dd6c5e', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (h("div", { key: '413be05a7374fc76f790ad3f6f5bef5a56a6ef97', class: "quoted-message-container", part: "quoted-message-container" }, h("div", { key: '7fb6b571103c675dca202b74bd07fd55062dab70', class: "quoted-message scrollbar" }, h("rtk-text-message-view", { key: '3997aa719a746234c5641e976dd0c27e68b69dae', text: this.quotedMessage, isMarkdown: true })), h("div", { key: 'f76ec54e3d67d6957d5d152b144b22d8cc122660' }, h("rtk-icon", { key: '897b52fc41814d2cb8beeb461c36c9843cb2869e', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), h("div", { key: '35447eb1fffffd372c231bc76ce741e483e7f26a', class: "composer-container" }, h("div", { key: '0f8f198df49fcc27f6c85b8d6909eb2a7c00e142', class: "composers" }, this.fileToUpload && (h("rtk-draft-attachment-view", Object.assign({ key: '9d325d05fecb12ecb41f02e54561d2e1b59b2c2f' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (h("rtk-text-composer-view", { key: 'fbc870bb9d9c2418e528e64273edb67846e23e17', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), h("div", { key: '20191403531eb87bca86d13387c7937153a4c99e', class: "chat-buttons", part: "chat-buttons" }, h("div", { key: '4914a61fea3f502dc14778a237e9ce35a97e3afc', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (h("div", { key: '76c843588f2f7d90f5e60a1e44955309026eda27' }, this.canSendFiles && [
13947
- h("rtk-file-picker-button", Object.assign({ key: 'cbb6f17b22f10b48ada27a4b4da3c1d5b2c7e320' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
13948
- h("rtk-file-picker-button", Object.assign({ key: '0868162a2da021dd4175e977adf47d72ca54044a', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
13949
- ], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: 'a73378b5495dc3bfcde7dba335f674292ee6a96c', isActive: this.isEmojiPickerOpen, onClick: () => {
13947
+ } }, uiProps))), h("slot", { key: '7be131be821b0722a744d14f3a03eafdb1d57c2e', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (h("div", { key: '914177fb791b9517af8c093ff60425a462dfc484', class: "quoted-message-container", part: "quoted-message-container" }, h("div", { key: '63c67074d3b921db41b65d607f688cb316de0777', class: "quoted-message scrollbar" }, h("rtk-text-message-view", { key: '6e5cf92e146b60f5f140bce2689a90bdd91d0b50', text: this.quotedMessage, isMarkdown: true })), h("div", { key: '6d0dec2c5bbee4f1adfad36cbed56199a215df06' }, h("rtk-icon", { key: '049f2c4924cd1fd108d78bbbbc3e2da772bdfaba', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), h("div", { key: 'eecbc4402df5b06017730392199921b64a3d3c84', class: "composer-container" }, h("div", { key: '4e97070e4e5fe8631cba468e5c5469fd40c40620', class: "composers" }, this.fileToUpload && (h("rtk-draft-attachment-view", Object.assign({ key: '4a0a9b8d98ab71b32bfefc28aea26008c5962a7f' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (h("rtk-text-composer-view", { key: '1df62b1794e7f61cccfafb5696092097e4b917b0', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), h("div", { key: '411c5840e1c1ec314ed8189939857d0dd38cdd89', class: "chat-buttons", part: "chat-buttons" }, h("div", { key: '60b339e7336bd5f89f63d91a07b1318345764860', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (h("div", { key: '886fb5fbbdb3d4090d3719c403275f81579b2607' }, this.canSendFiles && [
13948
+ h("rtk-file-picker-button", Object.assign({ key: '1eb87fc454180637e2c2ac0931bc01e810f8a934' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
13949
+ h("rtk-file-picker-button", Object.assign({ key: '6b63180ed0e791fa6c7aa819cdafeb3967f1e8ca', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
13950
+ ], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: 'dc8e536275ced829c16152dd9f60dc72b260bd50', isActive: this.isEmojiPickerOpen, onClick: () => {
13950
13951
  this.isEmojiPickerOpen = !this.isEmojiPickerOpen;
13951
- } }, uiProps))), h("slot", { key: '31208ad279dec430da4527d22730de8e418bc722', name: "chat-buttons" })))), h("div", { key: '04fcdd3f690548cbf1e257ffb2982785e557726b', class: "right", part: "chat-buttons-right" }, !this.isEditing && (h("rtk-tooltip", { key: '367bf710673a0a2276f46d52289409abb77fe27b', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, h("rtk-button", { key: 'c677e3026636c375ed7eee411c596f6d2a802794', kind: "icon", disabled: this.disableSendButton || this.isSending, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.send }))))), this.isEditing && (h("div", { key: '1e09e8868e4ae048b36bc8198b8aa1de92209a00', class: "edit-buttons" }, h("rtk-tooltip", { key: '29ff7a39bd168169fa7d104357b529a2c9efe0fd', variant: "secondary", label: this.t('cancel'), delay: 2000 }, h("rtk-button", { key: '27cf5353d0e8c2620fd8d4213994a9dcc83f83f3', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, h("rtk-icon", { key: 'aeb4c9df3993c6cebf952f64f6676eb8a3866bb0', icon: this.iconPack.dismiss }))), h("rtk-tooltip", { key: '835195d0f51a1db81e66a1b2d9076a71f2aaee4e', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, h("rtk-button", { key: 'd524f01ba5d7ca52224d39e23e7f963972ad80c9', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.checkmark })))))))))));
13952
+ } }, uiProps))), h("slot", { key: '4837bd3dc865864800e3adbb500fcc8785bc355e', name: "chat-buttons" })))), h("div", { key: '0bb4a6b7f0cb2e98e830223da3c1c543cbf174ca', class: "right", part: "chat-buttons-right" }, !this.isEditing && (h("rtk-tooltip", { key: '5db285aec89f1f32d84291276d00e2d38beb6b58', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, h("rtk-button", { key: '34b46c654679429f7f67957f03700ec0b6a5a348', kind: "icon", disabled: this.disableSendButton || this.isSending, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.send }))))), this.isEditing && (h("div", { key: '8b42d23271e3f5bc04240e643c90036319e162e4', class: "edit-buttons" }, h("rtk-tooltip", { key: 'd01eb04abe77564898790f713d61763bb2b56bb6', variant: "secondary", label: this.t('cancel'), delay: 2000 }, h("rtk-button", { key: '634e183ecfc1b4e4b4911a61208db319123f80b2', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, h("rtk-icon", { key: '47feedb66b8060139ec466a48deb385ff6863f79', icon: this.iconPack.dismiss }))), h("rtk-tooltip", { key: '84eedebb9de4bcd4efe33bbb1187ca7896efd3e8', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, h("rtk-button", { key: '498d5192c26baa77d3b690b1e9390c76be50764d', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.checkmark })))))))))));
13952
13953
  }
13953
13954
  };
13954
13955
  __decorate$g$1([
@@ -14250,9 +14251,10 @@ const RtkChatSelector = class {
14250
14251
  this.dropdownToggle.emit({ open: this.isOpen });
14251
14252
  };
14252
14253
  this.selectUser = async (user) => {
14254
+ var _a;
14253
14255
  if (user === null || user === void 0 ? void 0 : user.userId) {
14254
14256
  this.unreadMap.set(user.userId, false);
14255
- this.$paginatedListRef.rerenderList();
14257
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.rerenderList();
14256
14258
  }
14257
14259
  this.selectedUser = user;
14258
14260
  this.chatSelectorChange.emit({ selectedUser: user });
@@ -14278,10 +14280,12 @@ const RtkChatSelector = class {
14278
14280
  }
14279
14281
  };
14280
14282
  this.participantJoinedListener = (data) => {
14281
- this.$paginatedListRef.onNewNode(data);
14283
+ var _a;
14284
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.onNewNode(data);
14282
14285
  };
14283
14286
  this.participantLeftListener = (data) => {
14284
- this.$paginatedListRef.onNodeDelete(data.id);
14287
+ var _a;
14288
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.onNodeDelete(data.id);
14285
14289
  this.onParticipantUpdate();
14286
14290
  };
14287
14291
  // @ts-ignore - unused params
@@ -14306,7 +14310,7 @@ const RtkChatSelector = class {
14306
14310
  });
14307
14311
  };
14308
14312
  this.chatUpdateListener = (data) => {
14309
- var _a;
14313
+ var _a, _b;
14310
14314
  if (data.action !== 'add')
14311
14315
  return;
14312
14316
  if (!((_a = data.message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length))
@@ -14316,7 +14320,7 @@ const RtkChatSelector = class {
14316
14320
  if (!otherUserId)
14317
14321
  return;
14318
14322
  this.unreadMap.set(otherUserId, true);
14319
- this.$paginatedListRef.rerenderList();
14323
+ (_b = this.$paginatedListRef) === null || _b === void 0 ? void 0 : _b.rerenderList();
14320
14324
  };
14321
14325
  }
14322
14326
  /** */
@@ -14331,13 +14335,9 @@ const RtkChatSelector = class {
14331
14335
  this.overridesChanged(this.overrides);
14332
14336
  }
14333
14337
  disconnectedCallback() {
14334
- var _a, _b, _c;
14335
14338
  if (!this.meeting)
14336
14339
  return;
14337
- const { self, participants } = this.meeting;
14338
- (_a = self === null || self === void 0 ? void 0 : self.permissions) === null || _a === void 0 ? void 0 : _a.off('*', this.chatPermissionUpdateListener);
14339
- (_b = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _b === void 0 ? void 0 : _b.off('participantJoined', this.participantJoinedListener);
14340
- (_c = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _c === void 0 ? void 0 : _c.off('participantLeft', this.participantLeftListener);
14340
+ this.disconnectMeeting(this.meeting);
14341
14341
  }
14342
14342
  overridesChanged(overrides) {
14343
14343
  var _a, _b;
@@ -15498,7 +15498,7 @@ const RtkPaginatedList = class {
15498
15498
  }
15499
15499
  }
15500
15500
  /**
15501
- * Updates a new node anywhere in the list
15501
+ * Updates an existing node in the paginated list.
15502
15502
  * @param {string} id - The id of the node to update
15503
15503
  * @param {DataNode} node - The updated data node
15504
15504
  * */
@@ -15711,9 +15711,9 @@ const RtkPaginatedList = class {
15711
15711
  /**
15712
15712
  * div.container is flex=column-reversewhich is why div#bottom-scroll comes before div#top-scroll
15713
15713
  */
15714
- return (h(Host, { key: 'bff4fc91b737334c5764e690fbf2adafa1444408' }, h("div", { key: 'f4efa98ef0bd178602ee03718d35fcb833487909', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: '37403f6462812a6662efa9577ae9ed43d27f63d6', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: 'ee7e04e6281370dddb1b1e10b753e96dc602d42a', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
15714
+ return (h(Host, { key: '836a2ef0f7929b35b7e3ce5a62291f58fc35a2bc' }, h("div", { key: '6bad7209030f715fc93942e1a29b174d1564ea5e', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: '069d4f398daca2bb2cea90c8b2c8d76848f52bd8', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: 'a2d7c5600a691c3440260150cefec78bdd145c92', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
15715
15715
  this.scrollToBottom();
15716
- } }, this.shouldScrollToBottom ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.chevron_down })))), h("div", { key: '91bcdadd2518313fa06306a172575f5acc786596', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: '932af19af69c3ecd5af22dd3051a5eea5cb25e7a', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: '9fa60fb784a09800a32a3accdc81d940476330d2', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && h("rtk-spinner", { key: '73103f58338bdb89be69f9f6dc742e3cdd2c95d8', size: "sm" }), h("div", { key: '9c4c43ffb6442d58040448fe1b2d7332505fc81e', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
15716
+ } }, this.shouldScrollToBottom ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.chevron_down })))), h("div", { key: '0b40605499a35ff03ac7c048aaaac32432a453ad', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: 'fdcc9685d9cbcc4f4642c6ea1b716d3e57744883', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: '9999a8e7008059a2742cbbc43f303e21825d44e5', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && h("rtk-spinner", { key: '923d826998193b190dc89a8bafe16fb38495f3ba', size: "sm" }), h("div", { key: '92b528919596a4fbe32c3a7f023de8d6494d57c7', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
15717
15717
  }
15718
15718
  };
15719
15719
  __decorate$3$5([
@@ -19562,7 +19562,9 @@ const RtkGrid = class {
19562
19562
  self.permissions.hiddenParticipant;
19563
19563
  this.participants = this.filterParticipants([
19564
19564
  ...participants.active.toArray().filter((p) => p.id !== self.id),
19565
- ...(participants.viewMode === 'ACTIVE_GRID' && !self.isPinned && !this.hideSelf
19565
+ ...(['ACTIVE_GRID', 'MANUAL'].includes(participants.viewMode) &&
19566
+ !self.isPinned &&
19567
+ !this.hideSelf
19566
19568
  ? [self]
19567
19569
  : []),
19568
19570
  ]);
@@ -20561,11 +20563,11 @@ const RtkMessageListView = class {
20561
20563
  this.updateTotalHeight();
20562
20564
  }
20563
20565
  render() {
20564
- return (h("div", { key: '6564a301cf646ed53993d924111206cf4a382833', class: "scrollbar content-wrapper", ref: (el) => (this.$listRef = el), onScroll: this.handleScroll }, h("div", { key: '81469bde1e421f0a881c3ad33b30a601fc54901c', class: "scroller" }, h("div", { key: '5e0c8dd617aa7ed5517cde108539dc23265a29e2', style: {
20566
+ return (h("div", { key: '8da5ac7ee83f43da54ce1af023e178d206436b80', class: "scrollbar content-wrapper", ref: (el) => (this.$listRef = el), onScroll: this.handleScroll }, h("div", { key: '3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef', class: "scroller" }, h("div", { key: 'b65b2fb4471307f38c08480d268adfaafdb696fb', style: {
20565
20567
  height: `${this.totalHeight}px`,
20566
- } }), h("div", { key: 'f994d2627b4787f803b9c7ac00f574dbd034f924', class: "smallest-dom-element", id: "list-end", ref: (el) => (this.$listEndRef = el) })), h("div", { key: '4de62649e894f024ecb7d5767f6eefc702544964', class: "content", style: {
20568
+ } }), h("div", { key: '08aa1dcf4740ce438b152527e8d60aff28704e8a', class: "smallest-dom-element", id: "list-end", ref: (el) => (this.$listEndRef = el) })), h("div", { key: '48ba3788f83f2329174fb3ddd107eaf4da91699a', class: "content", style: {
20567
20569
  transform: `translateY(${this.getRangeSize(0, this.range.start)}px)`,
20568
- } }, this.isFetching && (h("div", { key: 'dfa9a9abbc190896f80aa90191ab654fee7b7d8f', class: "loader" }, h("rtk-spinner", { key: '416b800f9d481689860340aff00fe30f30255603', size: "md" }))), this.getVisibleItems().map((msg, index) => (h("div", { key: msg.id, ref: (el) => this.rendererInternal(el, msg, index) }))))));
20570
+ } }, this.isFetching && (h("div", { key: '1a53b6b02899df6ce80c781b44fcd71802105fdf', class: "loader" }, h("rtk-spinner", { key: '222bdf5ad19f45914f48c91afb65075e3fef277f', size: "md" }))), this.getVisibleItems().map((msg, index) => (h("div", { key: msg.id, ref: (el) => this.rendererInternal(el, msg, index) }))))));
20569
20571
  }
20570
20572
  static get watchers() { return {
20571
20573
  "messages": [{
@@ -24243,13 +24245,13 @@ const RtkSpotlightGrid = class {
24243
24245
  t: this.t,
24244
24246
  };
24245
24247
  const nonPinnedParticipants = this.participants.filter((p) => this.pinnedParticipants.some((pt) => pt.id != p.id));
24246
- return (h(Host, { key: '1cb846cc92b660a8244d16a74f48dfadcef903b6' }, h("main", { key: '8564f8b0bf6e7bd668132e2833fe73c73855d090', part: "main" }, h(Render, { key: '61b96f305727dc74de15f4c3c645069d6300afd9', element: "rtk-simple-grid", defaults: defaults, props: {
24248
+ return (h(Host, { key: '61c335032f64054d173a44639ab41ead131d0cdf' }, h("main", { key: '6dd23dc9d8b600d1747213396968b9601e04f83e', part: "main" }, h(Render, { key: 'efa5e5be367c3423e7fdd280fd9ec66ce5d50134', element: "rtk-simple-grid", defaults: defaults, props: {
24247
24249
  part: 'main-grid',
24248
24250
  participants: this.pinnedParticipants,
24249
24251
  aspectRatio: this.aspectRatio,
24250
24252
  gap: this.gap,
24251
24253
  size: this.getAdaptiveSize(this.pinnedParticipants.length),
24252
- } })), nonPinnedParticipants.length > 0 && (h("aside", { key: '2e297a8d83c1f7241d8688b643c055331d69299b', part: "aside", class: this.gridSize.spotlight ? `grid-width-${this.gridSize.spotlight}` : 'grid-width-md' }, h(Render, { key: '2c1969c610018dfb0a23308316f072e3b8d87a6e', element: "rtk-simple-grid", defaults: defaults, props: {
24254
+ } })), nonPinnedParticipants.length > 0 && (h("aside", { key: '183ea410b2afb776dec7fc9fd2dbcd33d1ae285a', part: "aside", class: this.gridSize.spotlight ? `grid-width-${this.gridSize.spotlight}` : 'grid-width-md' }, h(Render, { key: 'cb763ff9d4c6358f63e974d1984de3c67ffee3b5', element: "rtk-simple-grid", defaults: defaults, props: {
24253
24255
  part: 'aside-grid',
24254
24256
  participants: nonPinnedParticipants,
24255
24257
  aspectRatio: this.aspectRatio,
@@ -25546,9 +25548,9 @@ const RtkBroadcastMessageModal = class {
25546
25548
  }, 2000);
25547
25549
  }
25548
25550
  render() {
25549
- return (h(Host, { key: '0ddf3933cc56bd2d95a2d112965c22070a52c1ca' }, h("div", { key: '4a1428283dee02f1d09b0650b0facceebd612772', class: "content-col" }, h("h2", { key: '610e4ada5ae3543b629526324e4608e9950a20b0' }, "Broadcast message to"), h("select", { key: '46b4a3573a196f00ad1d9d20d92f3e03b250162c', onChange: (e) => {
25551
+ return (h(Host, { key: 'd7559b6aadff8f45387ac2f0b67ba20a18d9fed4' }, h("div", { key: '8b14c6d8b673244408b681f50bed87c3ab9af8bf', class: "content-col" }, h("h2", { key: '560e1e2cd73f07776fe670f4412dace898683f7e' }, "Broadcast message to"), h("select", { key: 'f0a8ddbcea08243f0c496cdc14916eea928ad520', onChange: (e) => {
25550
25552
  this.messagePayload = Object.assign(Object.assign({}, this.messagePayload), { to: e.target.value });
25551
- } }, h("option", { key: 'aaa981db25435bb257d02086463703d3d2a14ec2' }, "Everyone"), h("option", { key: '4bae49f7600fe5b5156f030e2f2433b334856e00' }, "List of rooms")), h("textarea", { key: '0d6da453ebb0b9711c79ba3c2c2c71a662955a9d', placeholder: "Type message here...", onInput: (e) => {
25553
+ } }, h("option", { key: 'daa2217e90ccd31d3a7fff136069bebe28b34da3' }, "Everyone"), h("option", { key: '72133e1507e26a555875bba037d2b0cb824a16f9' }, "List of rooms")), h("textarea", { key: 'eb523131f3bbe458cf802db5860029b2ce69c74f', placeholder: "Type message here...", onInput: (e) => {
25552
25554
  this.messagePayload = Object.assign(Object.assign({}, this.messagePayload), { message: e.target.value });
25553
25555
  } }), this.successMessage ? (h("p", null, "Message sent to ", this.messagePayload.to, h("rtk-icon", { icon: this.iconPack.checkmark }))) : (h("div", { class: "content-row" }, h("rtk-button", { onClick: () => this.close(), variant: "secondary" }, "Cancel"), "\u2002", h("rtk-button", { variant: "primary", onClick: () => this.sendMessage() }, "Send"))))));
25554
25556
  }
@@ -67347,11 +67349,11 @@ const RtkSidebarUi = class {
67347
67349
  render() {
67348
67350
  const isFullScreen = this.view === 'full-screen';
67349
67351
  const activeTab = this.tabs.find((tab) => tab.id === this.currentTab);
67350
- return (h(Host, { key: '239f279ceccceeaa57181d4a71f3e04ede4132ce', ref: (el) => (this.hostEl = el), class: this.view }, !this.hideCloseAction && (h("rtk-button", { key: '921847fd946de305dce6f1fc7fe8a9ff175e38ee', ref: (el) => (this.closeButton = el), variant: "ghost", kind: "icon", class: "close", onClick: this.onClose, "aria-label": this.t('close') }, h("rtk-icon", { key: '1de9f1edf8ecce2d0390b7b8a1253de02affd9d1', icon: this.iconPack.dismiss }))), activeTab && !this.hideHeader && (h("header", { key: '4cd288feeb658e62d3ad1efd47aea237119918e1', class: "main-header" }, h("h3", { key: 'd6c4129537b4e090f3c429c66057be9a1072a864' }, activeTab.name), h("slot", { key: 'dfb1ea30cfa476b515a3a4b628c036083f1fe0a5', name: "pinned-state" }))), isFullScreen && (h("header", { key: '7dafb426628960ba26718530417854a533de3664', class: "mobile-tabs" }, this.tabs.map((tab) => (h("button", { onClick: () => {
67352
+ return (h(Host, { key: '850aa92eeb61bf2729b12e30be8a43a9ff3a1acf', ref: (el) => (this.hostEl = el), class: this.view }, !this.hideCloseAction && (h("rtk-button", { key: 'f52d00bc36c398403eb7ac8ab5625f3cecd5da4f', ref: (el) => (this.closeButton = el), variant: "ghost", kind: "icon", class: "close", onClick: this.onClose, "aria-label": this.t('close') }, h("rtk-icon", { key: '4d970f5a9f02839dc297ccb2b7c85806025f7ef1', icon: this.iconPack.dismiss }))), activeTab && !this.hideHeader && (h("header", { key: '8c1ae2f6e4a87e2fc66381e70c7053b1b4a4d2b2', class: "main-header" }, h("h3", { key: '6f9faffac3acd82cd4645189459212026b10bf1d' }, activeTab.name), h("slot", { key: '20b3cff89b8805600eafbce17aabc4880e473a56', name: "pinned-state" }))), isFullScreen && (h("header", { key: '86bf499aadbe7b57868a135a35100cc1e430520e', class: "mobile-tabs" }, this.tabs.map((tab) => (h("button", { onClick: () => {
67351
67353
  this.tabChange.emit(tab.id);
67352
67354
  }, class: {
67353
67355
  active: this.currentTab === tab.id,
67354
- } }, tab.name))))), h("slot", { key: '2696ccd9fcad418ad7738164cd5a9e6305320899', name: this.currentTab })));
67356
+ } }, tab.name))))), h("slot", { key: 'd19ec28aa918a2bfd9556c64ef758b2faf6a195d', name: this.currentTab })));
67355
67357
  }
67356
67358
  static get watchers() { return {
67357
67359
  "currentTab": [{
@@ -384,6 +384,7 @@ const RtkChatComposerView = class {
384
384
  this.onQuotedMessageDismiss = createEvent(this, "quotedMessageDismiss", 7);
385
385
  /** Whether user can send text messages */
386
386
  this.canSendTextMessage = true;
387
+ /** Whether a message is being sent */
387
388
  this.isSending = false;
388
389
  /** Whether user can send file messages */
389
390
  this.canSendFiles = true;
@@ -529,17 +530,17 @@ const RtkChatComposerView = class {
529
530
  render() {
530
531
  var _a;
531
532
  const uiProps = { iconPack: this.iconPack, t: this.t };
532
- return (h(Host, { key: '2df23422579c855ced1cb6d24bb95786a1326baf' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'a7ed280a636d0207f58f0ad13f79c1eaed52ab9c', part: "emoji-picker", onPickerClose: () => {
533
+ return (h(Host, { key: '9b1caad153f14eae50191e4b9c33b73d6f1051fa' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'c27927a302c1420bc115707491e0aa0a6b9e8286', part: "emoji-picker", onPickerClose: () => {
533
534
  this.isEmojiPickerOpen = false;
534
535
  }, onRtkEmojiClicked: (e) => {
535
536
  this.textMessage += e.detail;
536
537
  this.$textComposer.setText(this.textMessage, true);
537
- } }, uiProps))), h("slot", { key: '759df2a2029fbba963cfc26cd871771881dd6c5e', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (h("div", { key: '413be05a7374fc76f790ad3f6f5bef5a56a6ef97', class: "quoted-message-container", part: "quoted-message-container" }, h("div", { key: '7fb6b571103c675dca202b74bd07fd55062dab70', class: "quoted-message scrollbar" }, h("rtk-text-message-view", { key: '3997aa719a746234c5641e976dd0c27e68b69dae', text: this.quotedMessage, isMarkdown: true })), h("div", { key: 'f76ec54e3d67d6957d5d152b144b22d8cc122660' }, h("rtk-icon", { key: '897b52fc41814d2cb8beeb461c36c9843cb2869e', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), h("div", { key: '35447eb1fffffd372c231bc76ce741e483e7f26a', class: "composer-container" }, h("div", { key: '0f8f198df49fcc27f6c85b8d6909eb2a7c00e142', class: "composers" }, this.fileToUpload && (h("rtk-draft-attachment-view", Object.assign({ key: '9d325d05fecb12ecb41f02e54561d2e1b59b2c2f' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (h("rtk-text-composer-view", { key: 'fbc870bb9d9c2418e528e64273edb67846e23e17', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), h("div", { key: '20191403531eb87bca86d13387c7937153a4c99e', class: "chat-buttons", part: "chat-buttons" }, h("div", { key: '4914a61fea3f502dc14778a237e9ce35a97e3afc', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (h("div", { key: '76c843588f2f7d90f5e60a1e44955309026eda27' }, this.canSendFiles && [
538
- h("rtk-file-picker-button", Object.assign({ key: 'cbb6f17b22f10b48ada27a4b4da3c1d5b2c7e320' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
539
- h("rtk-file-picker-button", Object.assign({ key: '0868162a2da021dd4175e977adf47d72ca54044a', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
540
- ], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: 'a73378b5495dc3bfcde7dba335f674292ee6a96c', isActive: this.isEmojiPickerOpen, onClick: () => {
538
+ } }, uiProps))), h("slot", { key: '7be131be821b0722a744d14f3a03eafdb1d57c2e', name: "chat-addon" }), this.quotedMessage && this.quotedMessage.length !== 0 && (h("div", { key: '914177fb791b9517af8c093ff60425a462dfc484', class: "quoted-message-container", part: "quoted-message-container" }, h("div", { key: '63c67074d3b921db41b65d607f688cb316de0777', class: "quoted-message scrollbar" }, h("rtk-text-message-view", { key: '6e5cf92e146b60f5f140bce2689a90bdd91d0b50', text: this.quotedMessage, isMarkdown: true })), h("div", { key: '6d0dec2c5bbee4f1adfad36cbed56199a215df06' }, h("rtk-icon", { key: '049f2c4924cd1fd108d78bbbbc3e2da772bdfaba', "aria-label": this.t('dismiss'), class: "dismiss", icon: this.iconPack.dismiss, onClick: this.onQuotedMessageDismissHandler })))), h("div", { key: 'eecbc4402df5b06017730392199921b64a3d3c84', class: "composer-container" }, h("div", { key: '4e97070e4e5fe8631cba468e5c5469fd40c40620', class: "composers" }, this.fileToUpload && (h("rtk-draft-attachment-view", Object.assign({ key: '4a0a9b8d98ab71b32bfefc28aea26008c5962a7f' }, uiProps, { attachment: this.fileToUpload, onDeleteAttachment: () => (this.fileToUpload = null) }))), !this.fileToUpload && (h("rtk-text-composer-view", { key: '1df62b1794e7f61cccfafb5696092097e4b917b0', value: this.textMessage, placeholder: this.inputTextPlaceholder, onTextChange: this.onTextChangeHandler, keyDownHandler: this.onKeyDownHandler, maxLength: (_a = this.maxLength) !== null && _a !== void 0 ? _a : MAX_TEXT_LENGTH, rateLimitBreached: this.rateLimitsBreached, t: this.t, iconPack: this.iconPack, ref: (el) => (this.$textComposer = el) }))), h("div", { key: '411c5840e1c1ec314ed8189939857d0dd38cdd89', class: "chat-buttons", part: "chat-buttons" }, h("div", { key: '60b339e7336bd5f89f63d91a07b1318345764860', class: "left", part: "chat-buttons-left" }, !this.fileToUpload && !this.isEditing && (h("div", { key: '886fb5fbbdb3d4090d3719c403275f81579b2607' }, this.canSendFiles && [
539
+ h("rtk-file-picker-button", Object.assign({ key: '1eb87fc454180637e2c2ac0931bc01e810f8a934' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
540
+ h("rtk-file-picker-button", Object.assign({ key: '6b63180ed0e791fa6c7aa819cdafeb3967f1e8ca', filter: "image/*", label: this.t('chat.send_img'), icon: "image", onFileChange: (event) => this.onFileUploadHandler('image', event.detail) }, uiProps)),
541
+ ], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: 'dc8e536275ced829c16152dd9f60dc72b260bd50', isActive: this.isEmojiPickerOpen, onClick: () => {
541
542
  this.isEmojiPickerOpen = !this.isEmojiPickerOpen;
542
- } }, uiProps))), h("slot", { key: '31208ad279dec430da4527d22730de8e418bc722', name: "chat-buttons" })))), h("div", { key: '04fcdd3f690548cbf1e257ffb2982785e557726b', class: "right", part: "chat-buttons-right" }, !this.isEditing && (h("rtk-tooltip", { key: '367bf710673a0a2276f46d52289409abb77fe27b', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, h("rtk-button", { key: 'c677e3026636c375ed7eee411c596f6d2a802794', kind: "icon", disabled: this.disableSendButton || this.isSending, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.send }))))), this.isEditing && (h("div", { key: '1e09e8868e4ae048b36bc8198b8aa1de92209a00', class: "edit-buttons" }, h("rtk-tooltip", { key: '29ff7a39bd168169fa7d104357b529a2c9efe0fd', variant: "secondary", label: this.t('cancel'), delay: 2000 }, h("rtk-button", { key: '27cf5353d0e8c2620fd8d4213994a9dcc83f83f3', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, h("rtk-icon", { key: 'aeb4c9df3993c6cebf952f64f6676eb8a3866bb0', icon: this.iconPack.dismiss }))), h("rtk-tooltip", { key: '835195d0f51a1db81e66a1b2d9076a71f2aaee4e', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, h("rtk-button", { key: 'd524f01ba5d7ca52224d39e23e7f963972ad80c9', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.checkmark })))))))))));
543
+ } }, uiProps))), h("slot", { key: '4837bd3dc865864800e3adbb500fcc8785bc355e', name: "chat-buttons" })))), h("div", { key: '0bb4a6b7f0cb2e98e830223da3c1c543cbf174ca', class: "right", part: "chat-buttons-right" }, !this.isEditing && (h("rtk-tooltip", { key: '5db285aec89f1f32d84291276d00e2d38beb6b58', variant: "primary", label: this.t('chat.send_msg'), delay: 2000 }, h("rtk-button", { key: '34b46c654679429f7f67957f03700ec0b6a5a348', kind: "icon", disabled: this.disableSendButton || this.isSending, onClick: () => this.handleSendMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.send }))))), this.isEditing && (h("div", { key: '8b42d23271e3f5bc04240e643c90036319e162e4', class: "edit-buttons" }, h("rtk-tooltip", { key: 'd01eb04abe77564898790f713d61763bb2b56bb6', variant: "secondary", label: this.t('cancel'), delay: 2000 }, h("rtk-button", { key: '634e183ecfc1b4e4b4911a61208db319123f80b2', kind: "icon", variant: "secondary", onClick: () => this.handleEditCancel(), title: this.t('cancel') }, h("rtk-icon", { key: '47feedb66b8060139ec466a48deb385ff6863f79', icon: this.iconPack.dismiss }))), h("rtk-tooltip", { key: '84eedebb9de4bcd4efe33bbb1187ca7896efd3e8', variant: "primary", label: this.t('chat.update_msg'), delay: 2000 }, h("rtk-button", { key: '498d5192c26baa77d3b690b1e9390c76be50764d', kind: "icon", onClick: () => this.handleEditMessage(), title: this.t('chat.send_msg') }, this.isSending ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.checkmark })))))))))));
543
544
  }
544
545
  };
545
546
  __decorate$g([
@@ -841,9 +842,10 @@ const RtkChatSelector = class {
841
842
  this.dropdownToggle.emit({ open: this.isOpen });
842
843
  };
843
844
  this.selectUser = async (user) => {
845
+ var _a;
844
846
  if (user === null || user === void 0 ? void 0 : user.userId) {
845
847
  this.unreadMap.set(user.userId, false);
846
- this.$paginatedListRef.rerenderList();
848
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.rerenderList();
847
849
  }
848
850
  this.selectedUser = user;
849
851
  this.chatSelectorChange.emit({ selectedUser: user });
@@ -869,10 +871,12 @@ const RtkChatSelector = class {
869
871
  }
870
872
  };
871
873
  this.participantJoinedListener = (data) => {
872
- this.$paginatedListRef.onNewNode(data);
874
+ var _a;
875
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.onNewNode(data);
873
876
  };
874
877
  this.participantLeftListener = (data) => {
875
- this.$paginatedListRef.onNodeDelete(data.id);
878
+ var _a;
879
+ (_a = this.$paginatedListRef) === null || _a === void 0 ? void 0 : _a.onNodeDelete(data.id);
876
880
  this.onParticipantUpdate();
877
881
  };
878
882
  // @ts-ignore - unused params
@@ -897,7 +901,7 @@ const RtkChatSelector = class {
897
901
  });
898
902
  };
899
903
  this.chatUpdateListener = (data) => {
900
- var _a;
904
+ var _a, _b;
901
905
  if (data.action !== 'add')
902
906
  return;
903
907
  if (!((_a = data.message.targetUserIds) === null || _a === void 0 ? void 0 : _a.length))
@@ -907,7 +911,7 @@ const RtkChatSelector = class {
907
911
  if (!otherUserId)
908
912
  return;
909
913
  this.unreadMap.set(otherUserId, true);
910
- this.$paginatedListRef.rerenderList();
914
+ (_b = this.$paginatedListRef) === null || _b === void 0 ? void 0 : _b.rerenderList();
911
915
  };
912
916
  }
913
917
  /** */
@@ -922,13 +926,9 @@ const RtkChatSelector = class {
922
926
  this.overridesChanged(this.overrides);
923
927
  }
924
928
  disconnectedCallback() {
925
- var _a, _b, _c;
926
929
  if (!this.meeting)
927
930
  return;
928
- const { self, participants } = this.meeting;
929
- (_a = self === null || self === void 0 ? void 0 : self.permissions) === null || _a === void 0 ? void 0 : _a.off('*', this.chatPermissionUpdateListener);
930
- (_b = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _b === void 0 ? void 0 : _b.off('participantJoined', this.participantJoinedListener);
931
- (_c = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _c === void 0 ? void 0 : _c.off('participantLeft', this.participantLeftListener);
931
+ this.disconnectMeeting(this.meeting);
932
932
  }
933
933
  overridesChanged(overrides) {
934
934
  var _a, _b;
@@ -2089,7 +2089,7 @@ const RtkPaginatedList = class {
2089
2089
  }
2090
2090
  }
2091
2091
  /**
2092
- * Updates a new node anywhere in the list
2092
+ * Updates an existing node in the paginated list.
2093
2093
  * @param {string} id - The id of the node to update
2094
2094
  * @param {DataNode} node - The updated data node
2095
2095
  * */
@@ -2302,9 +2302,9 @@ const RtkPaginatedList = class {
2302
2302
  /**
2303
2303
  * div.container is flex=column-reversewhich is why div#bottom-scroll comes before div#top-scroll
2304
2304
  */
2305
- return (h(Host, { key: 'bff4fc91b737334c5764e690fbf2adafa1444408' }, h("div", { key: 'f4efa98ef0bd178602ee03718d35fcb833487909', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: '37403f6462812a6662efa9577ae9ed43d27f63d6', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: 'ee7e04e6281370dddb1b1e10b753e96dc602d42a', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
2305
+ return (h(Host, { key: '836a2ef0f7929b35b7e3ce5a62291f58fc35a2bc' }, h("div", { key: '6bad7209030f715fc93942e1a29b174d1564ea5e', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: '069d4f398daca2bb2cea90c8b2c8d76848f52bd8', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: 'a2d7c5600a691c3440260150cefec78bdd145c92', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
2306
2306
  this.scrollToBottom();
2307
- } }, this.shouldScrollToBottom ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.chevron_down })))), h("div", { key: '91bcdadd2518313fa06306a172575f5acc786596', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: '932af19af69c3ecd5af22dd3051a5eea5cb25e7a', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: '9fa60fb784a09800a32a3accdc81d940476330d2', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && h("rtk-spinner", { key: '73103f58338bdb89be69f9f6dc742e3cdd2c95d8', size: "sm" }), h("div", { key: '9c4c43ffb6442d58040448fe1b2d7332505fc81e', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2307
+ } }, this.shouldScrollToBottom ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.chevron_down })))), h("div", { key: '0b40605499a35ff03ac7c048aaaac32432a453ad', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: 'fdcc9685d9cbcc4f4642c6ea1b716d3e57744883', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: '9999a8e7008059a2742cbbc43f303e21825d44e5', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (h("div", { class: "empty-list" }, (_a = this.emptyListLabel) !== null && _a !== void 0 ? _a : this.t('list.empty'))) : (h("div", { class: "page-wrapper" }, this.pages.map((page, pageIndex) => (h("div", { class: "page", "data-page-index": pageIndex }, this.createNodes([...page].reverse())))))), this.isLoadingTop && this.pages.length > 0 && h("rtk-spinner", { key: '923d826998193b190dc89a8bafe16fb38495f3ba', size: "sm" }), h("div", { key: '92b528919596a4fbe32c3a7f023de8d6494d57c7', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
2308
2308
  }
2309
2309
  };
2310
2310
  __decorate$3([
@@ -352,9 +352,9 @@ const RtkBroadcastMessageModal = class {
352
352
  }, 2000);
353
353
  }
354
354
  render() {
355
- return (h(Host, { key: '0ddf3933cc56bd2d95a2d112965c22070a52c1ca' }, h("div", { key: '4a1428283dee02f1d09b0650b0facceebd612772', class: "content-col" }, h("h2", { key: '610e4ada5ae3543b629526324e4608e9950a20b0' }, "Broadcast message to"), h("select", { key: '46b4a3573a196f00ad1d9d20d92f3e03b250162c', onChange: (e) => {
355
+ return (h(Host, { key: 'd7559b6aadff8f45387ac2f0b67ba20a18d9fed4' }, h("div", { key: '8b14c6d8b673244408b681f50bed87c3ab9af8bf', class: "content-col" }, h("h2", { key: '560e1e2cd73f07776fe670f4412dace898683f7e' }, "Broadcast message to"), h("select", { key: 'f0a8ddbcea08243f0c496cdc14916eea928ad520', onChange: (e) => {
356
356
  this.messagePayload = Object.assign(Object.assign({}, this.messagePayload), { to: e.target.value });
357
- } }, h("option", { key: 'aaa981db25435bb257d02086463703d3d2a14ec2' }, "Everyone"), h("option", { key: '4bae49f7600fe5b5156f030e2f2433b334856e00' }, "List of rooms")), h("textarea", { key: '0d6da453ebb0b9711c79ba3c2c2c71a662955a9d', placeholder: "Type message here...", onInput: (e) => {
357
+ } }, h("option", { key: 'daa2217e90ccd31d3a7fff136069bebe28b34da3' }, "Everyone"), h("option", { key: '72133e1507e26a555875bba037d2b0cb824a16f9' }, "List of rooms")), h("textarea", { key: 'eb523131f3bbe458cf802db5860029b2ce69c74f', placeholder: "Type message here...", onInput: (e) => {
358
358
  this.messagePayload = Object.assign(Object.assign({}, this.messagePayload), { message: e.target.value });
359
359
  } }), this.successMessage ? (h("p", null, "Message sent to ", this.messagePayload.to, h("rtk-icon", { icon: this.iconPack.checkmark }))) : (h("div", { class: "content-row" }, h("rtk-button", { onClick: () => this.close(), variant: "secondary" }, "Cancel"), "\u2002", h("rtk-button", { variant: "primary", onClick: () => this.sendMessage() }, "Send"))))));
360
360
  }
@@ -261,7 +261,9 @@ const RtkGrid = class {
261
261
  self.permissions.hiddenParticipant;
262
262
  this.participants = this.filterParticipants([
263
263
  ...participants.active.toArray().filter((p) => p.id !== self.id),
264
- ...(participants.viewMode === 'ACTIVE_GRID' && !self.isPinned && !this.hideSelf
264
+ ...(['ACTIVE_GRID', 'MANUAL'].includes(participants.viewMode) &&
265
+ !self.isPinned &&
266
+ !this.hideSelf
265
267
  ? [self]
266
268
  : []),
267
269
  ]);
@@ -264,11 +264,11 @@ const RtkMessageListView = class {
264
264
  this.updateTotalHeight();
265
265
  }
266
266
  render() {
267
- return (h("div", { key: '6564a301cf646ed53993d924111206cf4a382833', class: "scrollbar content-wrapper", ref: (el) => (this.$listRef = el), onScroll: this.handleScroll }, h("div", { key: '81469bde1e421f0a881c3ad33b30a601fc54901c', class: "scroller" }, h("div", { key: '5e0c8dd617aa7ed5517cde108539dc23265a29e2', style: {
267
+ return (h("div", { key: '8da5ac7ee83f43da54ce1af023e178d206436b80', class: "scrollbar content-wrapper", ref: (el) => (this.$listRef = el), onScroll: this.handleScroll }, h("div", { key: '3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef', class: "scroller" }, h("div", { key: 'b65b2fb4471307f38c08480d268adfaafdb696fb', style: {
268
268
  height: `${this.totalHeight}px`,
269
- } }), h("div", { key: 'f994d2627b4787f803b9c7ac00f574dbd034f924', class: "smallest-dom-element", id: "list-end", ref: (el) => (this.$listEndRef = el) })), h("div", { key: '4de62649e894f024ecb7d5767f6eefc702544964', class: "content", style: {
269
+ } }), h("div", { key: '08aa1dcf4740ce438b152527e8d60aff28704e8a', class: "smallest-dom-element", id: "list-end", ref: (el) => (this.$listEndRef = el) })), h("div", { key: '48ba3788f83f2329174fb3ddd107eaf4da91699a', class: "content", style: {
270
270
  transform: `translateY(${this.getRangeSize(0, this.range.start)}px)`,
271
- } }, this.isFetching && (h("div", { key: 'dfa9a9abbc190896f80aa90191ab654fee7b7d8f', class: "loader" }, h("rtk-spinner", { key: '416b800f9d481689860340aff00fe30f30255603', size: "md" }))), this.getVisibleItems().map((msg, index) => (h("div", { key: msg.id, ref: (el) => this.rendererInternal(el, msg, index) }))))));
271
+ } }, this.isFetching && (h("div", { key: '1a53b6b02899df6ce80c781b44fcd71802105fdf', class: "loader" }, h("rtk-spinner", { key: '222bdf5ad19f45914f48c91afb65075e3fef277f', size: "md" }))), this.getVisibleItems().map((msg, index) => (h("div", { key: msg.id, ref: (el) => this.rendererInternal(el, msg, index) }))))));
272
272
  }
273
273
  static get watchers() { return {
274
274
  "messages": [{
@@ -71,11 +71,11 @@ const RtkSidebarUi = class {
71
71
  render() {
72
72
  const isFullScreen = this.view === 'full-screen';
73
73
  const activeTab = this.tabs.find((tab) => tab.id === this.currentTab);
74
- return (h(Host, { key: '239f279ceccceeaa57181d4a71f3e04ede4132ce', ref: (el) => (this.hostEl = el), class: this.view }, !this.hideCloseAction && (h("rtk-button", { key: '921847fd946de305dce6f1fc7fe8a9ff175e38ee', ref: (el) => (this.closeButton = el), variant: "ghost", kind: "icon", class: "close", onClick: this.onClose, "aria-label": this.t('close') }, h("rtk-icon", { key: '1de9f1edf8ecce2d0390b7b8a1253de02affd9d1', icon: this.iconPack.dismiss }))), activeTab && !this.hideHeader && (h("header", { key: '4cd288feeb658e62d3ad1efd47aea237119918e1', class: "main-header" }, h("h3", { key: 'd6c4129537b4e090f3c429c66057be9a1072a864' }, activeTab.name), h("slot", { key: 'dfb1ea30cfa476b515a3a4b628c036083f1fe0a5', name: "pinned-state" }))), isFullScreen && (h("header", { key: '7dafb426628960ba26718530417854a533de3664', class: "mobile-tabs" }, this.tabs.map((tab) => (h("button", { onClick: () => {
74
+ return (h(Host, { key: '850aa92eeb61bf2729b12e30be8a43a9ff3a1acf', ref: (el) => (this.hostEl = el), class: this.view }, !this.hideCloseAction && (h("rtk-button", { key: 'f52d00bc36c398403eb7ac8ab5625f3cecd5da4f', ref: (el) => (this.closeButton = el), variant: "ghost", kind: "icon", class: "close", onClick: this.onClose, "aria-label": this.t('close') }, h("rtk-icon", { key: '4d970f5a9f02839dc297ccb2b7c85806025f7ef1', icon: this.iconPack.dismiss }))), activeTab && !this.hideHeader && (h("header", { key: '8c1ae2f6e4a87e2fc66381e70c7053b1b4a4d2b2', class: "main-header" }, h("h3", { key: '6f9faffac3acd82cd4645189459212026b10bf1d' }, activeTab.name), h("slot", { key: '20b3cff89b8805600eafbce17aabc4880e473a56', name: "pinned-state" }))), isFullScreen && (h("header", { key: '86bf499aadbe7b57868a135a35100cc1e430520e', class: "mobile-tabs" }, this.tabs.map((tab) => (h("button", { onClick: () => {
75
75
  this.tabChange.emit(tab.id);
76
76
  }, class: {
77
77
  active: this.currentTab === tab.id,
78
- } }, tab.name))))), h("slot", { key: '2696ccd9fcad418ad7738164cd5a9e6305320899', name: this.currentTab })));
78
+ } }, tab.name))))), h("slot", { key: 'd19ec28aa918a2bfd9556c64ef758b2faf6a195d', name: this.currentTab })));
79
79
  }
80
80
  static get watchers() { return {
81
81
  "currentTab": [{
@@ -66,13 +66,13 @@ const RtkSpotlightGrid = class {
66
66
  t: this.t,
67
67
  };
68
68
  const nonPinnedParticipants = this.participants.filter((p) => this.pinnedParticipants.some((pt) => pt.id != p.id));
69
- return (h(Host, { key: '1cb846cc92b660a8244d16a74f48dfadcef903b6' }, h("main", { key: '8564f8b0bf6e7bd668132e2833fe73c73855d090', part: "main" }, h(Render, { key: '61b96f305727dc74de15f4c3c645069d6300afd9', element: "rtk-simple-grid", defaults: defaults, props: {
69
+ return (h(Host, { key: '61c335032f64054d173a44639ab41ead131d0cdf' }, h("main", { key: '6dd23dc9d8b600d1747213396968b9601e04f83e', part: "main" }, h(Render, { key: 'efa5e5be367c3423e7fdd280fd9ec66ce5d50134', element: "rtk-simple-grid", defaults: defaults, props: {
70
70
  part: 'main-grid',
71
71
  participants: this.pinnedParticipants,
72
72
  aspectRatio: this.aspectRatio,
73
73
  gap: this.gap,
74
74
  size: this.getAdaptiveSize(this.pinnedParticipants.length),
75
- } })), nonPinnedParticipants.length > 0 && (h("aside", { key: '2e297a8d83c1f7241d8688b643c055331d69299b', part: "aside", class: this.gridSize.spotlight ? `grid-width-${this.gridSize.spotlight}` : 'grid-width-md' }, h(Render, { key: '2c1969c610018dfb0a23308316f072e3b8d87a6e', element: "rtk-simple-grid", defaults: defaults, props: {
75
+ } })), nonPinnedParticipants.length > 0 && (h("aside", { key: '183ea410b2afb776dec7fc9fd2dbcd33d1ae285a', part: "aside", class: this.gridSize.spotlight ? `grid-width-${this.gridSize.spotlight}` : 'grid-width-md' }, h(Render, { key: 'cb763ff9d4c6358f63e974d1984de3c67ffee3b5', element: "rtk-simple-grid", defaults: defaults, props: {
76
76
  part: 'aside-grid',
77
77
  participants: nonPinnedParticipants,
78
78
  aspectRatio: this.aspectRatio,
@@ -1 +1 @@
1
- import{r as t,e as s,h as i}from"./p-gJCRRBX0.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as r}from"./p-DI7wP4CL.js";import{S as e}from"./p-BmRffDYW.js";import{d as h}from"./p-MlOz-emx.js";import"./p-Daj_55_i.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=r,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const r=s.borderBoxSize[0];if(r&&r.blockSize>0)return this.saveItemSize(i,r.blockSize),void this.elementObserver.unobserve(t)}const r=t.getBoundingClientRect();r.height>0&&this.saveItemSize(i,r.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let r=t,e=s;i<=this.visibleItemsCount?(r=0,e=i-1):s-t<this.visibleItemsCount-1&&(r=this.range.end-this.visibleItemsCount+1),this.range.start!==r&&(this.range={start:r,end:e},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,r=0;for(let e=t;e<s;e++)r=this.sizes.get(this.messages[e].id),i+=r||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,r=0,e=this.messages.length;for(;s<=e;){if(i=s+e>>>1,r=this.getRangeSize(0,i),r===t)return i;r<t?s=i+1:r>t&&(e=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const r=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(r)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"6564a301cf646ed53993d924111206cf4a382833",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},i("div",{key:"81469bde1e421f0a881c3ad33b30a601fc54901c",class:"scroller"},i("div",{key:"5e0c8dd617aa7ed5517cde108539dc23265a29e2",style:{height:`${this.totalHeight}px`}}),i("div",{key:"f994d2627b4787f803b9c7ac00f574dbd034f924",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),i("div",{key:"4de62649e894f024ecb7d5767f6eefc702544964",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&i("div",{key:"dfa9a9abbc190896f80aa90191ab654fee7b7d8f",class:"loader"},i("rtk-spinner",{key:"416b800f9d481689860340aff00fe30f30255603",size:"md"})),this.getVisibleItems().map(((t,s)=>i("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:[{messagesUpdated:0}]}}};(function(t,s,i,r){var e,h=arguments.length,a=h<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,r);else for(var o=t.length-1;o>=0;o--)(e=t[o])&&(a=(h<3?e(a):h>3?e(s,i,a):e(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([e()],a.prototype,"iconPack",void 0),a.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60))) var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}.loading{cursor:wait}.content-wrapper{height:100%;overflow-y:auto;position:relative;contain:strict}.scroller{width:1px;opacity:0}.content{position:absolute;top:0;width:100%}.smallest-dom-element{width:100%;height:2px;background:red}.loader{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;justify-content:center}";export{a as rtk_message_list_view}
1
+ import{r as t,e as s,h as i}from"./p-gJCRRBX0.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as r}from"./p-DI7wP4CL.js";import{S as e}from"./p-BmRffDYW.js";import{d as h}from"./p-MlOz-emx.js";import"./p-Daj_55_i.js";const a=class{constructor(i){t(this,i),this.visibleItemsCount=20,this.estimateItemSize=100,this.iconPack=r,this.isFetching=!1,this.autoScroll=!0,this.totalHeight=0,this.sizes=new Map,this.lastScrollTop=0,this.scrollToBottomRetries=0,this.elementObserver=(()=>{let t=null;const s=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this.measureElement(t.target,t)}))})):null);return{disconnect:()=>{var t;return null===(t=s())||void 0===t?void 0:t.disconnect()},observe:t=>{var i;return null===(i=s())||void 0===i?void 0:i.observe(t,{box:"border-box"})},unobserve:t=>{var i;return null===(i=s())||void 0===i?void 0:i.unobserve(t)}}})(),this.measureElement=(t,s)=>{if(!t)return;const i=t.dataset.id;if(this.sizes.has(i))return void this.elementObserver.unobserve(t);if(s){const r=s.borderBoxSize[0];if(r&&r.blockSize>0)return this.saveItemSize(i,r.blockSize),void this.elementObserver.unobserve(t)}const r=t.getBoundingClientRect();r.height>0&&this.saveItemSize(i,r.height)},this.getVisibleItems=()=>this.messages.slice(this.range.start,this.range.end+1),this.updateVisibleItems=(t,s)=>{const i=this.messages.length;let r=t,e=s;i<=this.visibleItemsCount?(r=0,e=i-1):s-t<this.visibleItemsCount-1&&(r=this.range.end-this.visibleItemsCount+1),this.range.start!==r&&(this.range={start:r,end:e},this.totalHeight=this.getRangeSize(0,i))},this.getEstimatedItemSize=()=>this.estimateItemSize,this.getRangeSize=(t,s)=>{let i=0,r=0;for(let e=t;e<s;e++)r=this.sizes.get(this.messages[e].id),i+=r||this.getEstimatedItemSize();return i},this.getScrollTop=()=>this.$listRef?Math.ceil(this.$listRef.scrollTop):0,this.getClientHeight=()=>this.$listRef?Math.ceil(this.$listRef.clientHeight):0,this.getScrollHeight=()=>this.$listRef?Math.ceil(this.$listRef.scrollHeight):0,this.getItemsScrolled=()=>{const t=this.lastScrollTop;if(t<=0)return 0;let s=0,i=0,r=0,e=this.messages.length;for(;s<=e;){if(i=s+e>>>1,r=this.getRangeSize(0,i),r===t)return i;r<t?s=i+1:r>t&&(e=i-1)}return s>0?--s:0},this.getEndByStart=t=>Math.min(t+this.visibleItemsCount,this.messages.length-1),this.scrollToOffset=t=>{this.$listRef&&(this.$listRef.scrollTop=t)},this.scrollToIndex=t=>{if(t>=this.messages.length-1)this.scrollToBottom();else{const s=t<1?0:this.getRangeSize(0,t);this.scrollToOffset(s)}},this.scrollToBottom=()=>{this.$listEndRef&&s((()=>{this.$listEndRef.scrollIntoView(),this.getScrollHeight()-(this.getScrollTop()+this.getClientHeight())>0&&this.scrollToBottomRetries<10?setTimeout((()=>{this.scrollToBottom()}),1e3/60):(this.scrollToBottomRetries=0,this.autoScroll=!0)}))},this.handleScroll=async()=>{if(this.isFetching)return;const t=this.getScrollTop(),s=t<this.lastScrollTop||0===t?"UP":"DOWN";if(this.lastScrollTop=t,this.loadMore&&0===t&&"UP"===s&&!1===this.isFetching){this.isFetching=!0;const t=await this.loadMore(this.messages[0]);t&&t.length&&(this.messages=[...t,...this.messages]),this.isFetching=!1}"UP"===s?this.handleTop():"DOWN"===s&&this.handleBottom()},this.handleTop=()=>{const t=this.getItemsScrolled();if(t<=this.range.end-5&&(this.autoScroll=!1),t>this.range.start+5)return;const s=Math.max(this.range.start-5,0);this.updateVisibleItems(s,this.getEndByStart(s))},this.handleBottom=()=>{if(this.getItemsScrolled()<this.range.start+5)return;const t=this.range.start+5,s=this.getEndByStart(t);this.updateVisibleItems(s===this.messages.length-1?s-this.visibleItemsCount:t,s)},this.updateTotalHeight=h((()=>{this.totalHeight=this.getRangeSize(0,this.messages.length)}),1e3/30,{leading:!0}),this.rendererInternal=(t,s,i)=>{if(!t)return;if(t.dataset.id===s.id)return;const r=this.renderer(s,i);t.hasChildNodes&&(t.innerHTML=""),this.elementObserver.observe(t),t.dataset.id=s.id,t.appendChild(r)}}connectedCallback(){const t=this.messages.length-1;this.range={start:t-this.visibleItemsCount,end:t},this.updateVisibleItems(this.range.start,this.range.end),this.totalHeight=this.getRangeSize(0,t)}componentDidLoad(){this.autoScroll&&this.scrollToBottom()}messagesUpdated(t,s){if(t.length>s.length){const i=t.length-s.length;this.updateVisibleItems(i,this.getEndByStart(i)),this.scrollToIndex(this.range.start)}}saveItemSize(t,s){this.sizes.set(t,Math.round(s)),this.updateTotalHeight()}render(){return i("div",{key:"8da5ac7ee83f43da54ce1af023e178d206436b80",class:"scrollbar content-wrapper",ref:t=>this.$listRef=t,onScroll:this.handleScroll},i("div",{key:"3aeec25e25aeb2864b7ce0d68a08d58bb2b63cef",class:"scroller"},i("div",{key:"b65b2fb4471307f38c08480d268adfaafdb696fb",style:{height:`${this.totalHeight}px`}}),i("div",{key:"08aa1dcf4740ce438b152527e8d60aff28704e8a",class:"smallest-dom-element",id:"list-end",ref:t=>this.$listEndRef=t})),i("div",{key:"48ba3788f83f2329174fb3ddd107eaf4da91699a",class:"content",style:{transform:`translateY(${this.getRangeSize(0,this.range.start)}px)`}},this.isFetching&&i("div",{key:"1a53b6b02899df6ce80c781b44fcd71802105fdf",class:"loader"},i("rtk-spinner",{key:"222bdf5ad19f45914f48c91afb65075e3fef277f",size:"md"})),this.getVisibleItems().map(((t,s)=>i("div",{key:t.id,ref:i=>this.rendererInternal(i,t,s)})))))}static get watchers(){return{messages:[{messagesUpdated:0}]}}};(function(t,s,i,r){var e,h=arguments.length,a=h<3?s:null===r?r=Object.getOwnPropertyDescriptor(s,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,i,r);else for(var o=t.length-1;o>=0;o--)(e=t[o])&&(a=(h<3?e(a):h>3?e(s,i,a):e(s,i))||a);h>3&&a&&Object.defineProperty(s,i,a)})([e()],a.prototype,"iconPack",void 0),a.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60))) var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}.loading{cursor:wait}.content-wrapper{height:100%;overflow-y:auto;position:relative;contain:strict}.scroller{width:1px;opacity:0}.content{position:absolute;top:0;width:100%}.smallest-dom-element{width:100%;height:2px;background:red}.loader{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;justify-content:center}";export{a as rtk_message_list_view}
@@ -1 +1 @@
1
- import{r as i,h as t,a as s,g as e}from"./p-gJCRRBX0.js";import{c as h,e as d,i as a}from"./p-DI7wP4CL.js";import{d as r}from"./p-CmmyVCoN.js";import{R as o}from"./p-CTFO-5XH.js";import{S as m}from"./p-BmRffDYW.js";var c=function(i,t,s,e){var h,d=arguments.length,a=d<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(i,t,s,e);else for(var r=i.length-1;r>=0;r--)(h=i[r])&&(a=(d<3?h(a):d>3?h(t,s,a):h(t,s))||a);return d>3&&a&&Object.defineProperty(t,s,a),a};const n=class{constructor(t){i(this,t),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.aspectRatio="16:9",this.gap=8,this.config=h(),this.iconPack=d,this.t=a(),this.gridSize=r,this.getAdaptiveSize=i=>"sm"===this.size||i>3||"md"===this.size?"sm":"md"}render(){const i={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},e=this.participants.filter((i=>this.pinnedParticipants.some((t=>t.id!=i.id))));return t(s,{key:"1cb846cc92b660a8244d16a74f48dfadcef903b6"},t("main",{key:"8564f8b0bf6e7bd668132e2833fe73c73855d090",part:"main"},t(o,{key:"61b96f305727dc74de15f4c3c645069d6300afd9",element:"rtk-simple-grid",defaults:i,props:{part:"main-grid",participants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(this.pinnedParticipants.length)}})),e.length>0&&t("aside",{key:"2e297a8d83c1f7241d8688b643c055331d69299b",part:"aside",class:this.gridSize.spotlight?`grid-width-${this.gridSize.spotlight}`:"grid-width-md"},t(o,{key:"2c1969c610018dfb0a23308316f072e3b8d87a6e",element:"rtk-simple-grid",defaults:i,props:{part:"aside-grid",participants:e,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(e.length)}})))}get host(){return e(this)}};c([m()],n.prototype,"meeting",void 0),c([m()],n.prototype,"states",void 0),c([m()],n.prototype,"config",void 0),c([m()],n.prototype,"iconPack",void 0),c([m()],n.prototype,"t",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%}main{flex:1 1 0%}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}:host([size='sm']),:host([size='md']){flex-direction:column}:host([size='md']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='md']) .grid-width-sm{height:25%}:host([size='md']) .grid-width-md{height:50%}:host([size='md']) .grid-width-lg{height:66.666667%}:host([size='sm']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='sm']) .grid-width-sm,:host([size='sm']) .grid-width-md,:host([size='sm']) .grid-width-lg{height:50%}:host([size='xl']) .grid-width-sm,:host([size='xl']) .grid-width-md,:host([size='xl']) .grid-width-lg{width:400px}:host([layout='column']){flex-direction:column}:host([layout='column']) main{flex:4}:host([layout='column']) aside{flex:2;max-width:100%;width:100%}";export{n as rtk_spotlight_grid}
1
+ import{r as i,h as t,a as s,g as e}from"./p-gJCRRBX0.js";import{c as d,e as h,i as a}from"./p-DI7wP4CL.js";import{d as r}from"./p-CmmyVCoN.js";import{R as o}from"./p-CTFO-5XH.js";import{S as m}from"./p-BmRffDYW.js";var c=function(i,t,s,e){var d,h=arguments.length,a=h<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(i,t,s,e);else for(var r=i.length-1;r>=0;r--)(d=i[r])&&(a=(h<3?d(a):h>3?d(t,s,a):d(t,s))||a);return h>3&&a&&Object.defineProperty(t,s,a),a};const f=class{constructor(t){i(this,t),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.aspectRatio="16:9",this.gap=8,this.config=d(),this.iconPack=h,this.t=a(),this.gridSize=r,this.getAdaptiveSize=i=>"sm"===this.size||i>3||"md"===this.size?"sm":"md"}render(){const i={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},e=this.participants.filter((i=>this.pinnedParticipants.some((t=>t.id!=i.id))));return t(s,{key:"61c335032f64054d173a44639ab41ead131d0cdf"},t("main",{key:"6dd23dc9d8b600d1747213396968b9601e04f83e",part:"main"},t(o,{key:"efa5e5be367c3423e7fdd280fd9ec66ce5d50134",element:"rtk-simple-grid",defaults:i,props:{part:"main-grid",participants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(this.pinnedParticipants.length)}})),e.length>0&&t("aside",{key:"183ea410b2afb776dec7fc9fd2dbcd33d1ae285a",part:"aside",class:this.gridSize.spotlight?`grid-width-${this.gridSize.spotlight}`:"grid-width-md"},t(o,{key:"cb763ff9d4c6358f63e974d1984de3c67ffee3b5",element:"rtk-simple-grid",defaults:i,props:{part:"aside-grid",participants:e,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(e.length)}})))}get host(){return e(this)}};c([m()],f.prototype,"meeting",void 0),c([m()],f.prototype,"states",void 0),c([m()],f.prototype,"config",void 0),c([m()],f.prototype,"iconPack",void 0),c([m()],f.prototype,"t",void 0),f.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%}main{flex:1 1 0%}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}:host([size='sm']),:host([size='md']){flex-direction:column}:host([size='md']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='md']) .grid-width-sm{height:25%}:host([size='md']) .grid-width-md{height:50%}:host([size='md']) .grid-width-lg{height:66.666667%}:host([size='sm']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='sm']) .grid-width-sm,:host([size='sm']) .grid-width-md,:host([size='sm']) .grid-width-lg{height:50%}:host([size='xl']) .grid-width-sm,:host([size='xl']) .grid-width-md,:host([size='xl']) .grid-width-lg{width:400px}:host([layout='column']){flex-direction:column}:host([layout='column']) main{flex:4}:host([layout='column']) aside{flex:2;max-width:100%;width:100%}";export{f as rtk_spotlight_grid}
@@ -1 +1 @@
1
- import{r as t,d as e,h as a,a as r}from"./p-gJCRRBX0.js";import{S as o}from"./p-BmRffDYW.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as i,i as s}from"./p-DI7wP4CL.js";import"./p-Daj_55_i.js";const n=class{constructor(a){t(this,a),this.tabChange=e(this,"tabChange",7),this.sidebarClose=e(this,"sidebarClose",7),this.view="sidebar",this.tabs=[],this.hideHeader=!1,this.hideCloseAction=!1,this.iconPack=i,this.focusCloseButton=!0,this.t=s(),this.onClose=()=>{var t;this.sidebarClose.emit(),document.activeElement instanceof HTMLElement&&(null===(t=document.activeElement.tagName)||void 0===t?void 0:t.includes("RTK-"))&&document.activeElement.blur instanceof Function&&document.activeElement.blur()}}componentDidLoad(){this.keydownListener=t=>{"Escape"===t.key&&this.onClose()},this.hostEl.addEventListener("keydown",this.keydownListener),this.handleFocusCloseButton()}handleFocusCloseButton(){"chat"===this.currentTab||this.hideCloseAction||this.closeButton.focus()}disconnectedCallback(){this.hostEl.removeEventListener("keydown",this.keydownListener)}render(){const t="full-screen"===this.view,e=this.tabs.find((t=>t.id===this.currentTab));return a(r,{key:"239f279ceccceeaa57181d4a71f3e04ede4132ce",ref:t=>this.hostEl=t,class:this.view},!this.hideCloseAction&&a("rtk-button",{key:"921847fd946de305dce6f1fc7fe8a9ff175e38ee",ref:t=>this.closeButton=t,variant:"ghost",kind:"icon",class:"close",onClick:this.onClose,"aria-label":this.t("close")},a("rtk-icon",{key:"1de9f1edf8ecce2d0390b7b8a1253de02affd9d1",icon:this.iconPack.dismiss})),e&&!this.hideHeader&&a("header",{key:"4cd288feeb658e62d3ad1efd47aea237119918e1",class:"main-header"},a("h3",{key:"d6c4129537b4e090f3c429c66057be9a1072a864"},e.name),a("slot",{key:"dfb1ea30cfa476b515a3a4b628c036083f1fe0a5",name:"pinned-state"})),t&&a("header",{key:"7dafb426628960ba26718530417854a533de3664",class:"mobile-tabs"},this.tabs.map((t=>a("button",{onClick:()=>{this.tabChange.emit(t.id)},class:{active:this.currentTab===t.id}},t.name)))),a("slot",{key:"2696ccd9fcad418ad7738164cd5a9e6305320899",name:this.currentTab}))}static get watchers(){return{currentTab:[{handleFocusCloseButton:0}]}}};(function(t,e,a,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,a,r);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(s=(i<3?o(s):i>3?o(e,a,s):o(e,a))||s);i>3&&s&&Object.defineProperty(e,a,s)})([o()],n.prototype,"t",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;height:100%;width:100%;font-family:var(--rtk-font-family, sans-serif);z-index:50;display:flex;flex-direction:column;container-type:size;container-name:sidebarui}@container sidebarui (height < 370px){.main-header{height:var(--rtk-space-8, 32px) !important}.close{top:var(--rtk-space-0\\.5, 2px) !important;left:var(--rtk-space-0, 0px) !important;color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.6)}}:host([view='sidebar']){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}:host([view='full-screen']){position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);max-width:100%;border:none}::slotted(*){flex-grow:1}.close{position:absolute;top:var(--rtk-space-2, 8px);left:var(--rtk-space-2, 8px);z-index:10}.main-header{position:relative;display:flex;height:var(--rtk-space-12, 48px);place-items:center;justify-content:center}.main-header,.mobile-tabs{flex-shrink:0}.mobile-tabs{display:flex;place-items:center;justify-content:space-evenly;border-bottom:1px solid rgb(var(--rtk-colors-background-700, 44 44 44))}.mobile-tabs button{margin:var(--rtk-space-0, 0px);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;padding:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));height:var(--rtk-space-10, 40px);cursor:pointer;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);font-weight:500;border-bottom:1px solid transparent}.mobile-tabs button.active{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity))}header h3{font-size:14px;font-weight:500}@media only screen and (max-device-height: 480px) and (orientation: landscape){.main-header{display:none !important}}.tab-participant-count-badge{display:inline-block;padding:2px 5px;border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.tab-participant-count-badge:not(.selected-tab){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.tab-participant-count-badge.requests-pending{background-color:rgba(var(--rtk-colors-danger))}";export{n as rtk_sidebar_ui}
1
+ import{r as t,d as a,h as e,a as r}from"./p-gJCRRBX0.js";import{S as o}from"./p-BmRffDYW.js";import"./p-DxDYE5-a.js";import"./p-C0vp-Q7v.js";import{e as i,i as s}from"./p-DI7wP4CL.js";import"./p-Daj_55_i.js";const n=class{constructor(e){t(this,e),this.tabChange=a(this,"tabChange",7),this.sidebarClose=a(this,"sidebarClose",7),this.view="sidebar",this.tabs=[],this.hideHeader=!1,this.hideCloseAction=!1,this.iconPack=i,this.focusCloseButton=!0,this.t=s(),this.onClose=()=>{var t;this.sidebarClose.emit(),document.activeElement instanceof HTMLElement&&(null===(t=document.activeElement.tagName)||void 0===t?void 0:t.includes("RTK-"))&&document.activeElement.blur instanceof Function&&document.activeElement.blur()}}componentDidLoad(){this.keydownListener=t=>{"Escape"===t.key&&this.onClose()},this.hostEl.addEventListener("keydown",this.keydownListener),this.handleFocusCloseButton()}handleFocusCloseButton(){"chat"===this.currentTab||this.hideCloseAction||this.closeButton.focus()}disconnectedCallback(){this.hostEl.removeEventListener("keydown",this.keydownListener)}render(){const t="full-screen"===this.view,a=this.tabs.find((t=>t.id===this.currentTab));return e(r,{key:"850aa92eeb61bf2729b12e30be8a43a9ff3a1acf",ref:t=>this.hostEl=t,class:this.view},!this.hideCloseAction&&e("rtk-button",{key:"f52d00bc36c398403eb7ac8ab5625f3cecd5da4f",ref:t=>this.closeButton=t,variant:"ghost",kind:"icon",class:"close",onClick:this.onClose,"aria-label":this.t("close")},e("rtk-icon",{key:"4d970f5a9f02839dc297ccb2b7c85806025f7ef1",icon:this.iconPack.dismiss})),a&&!this.hideHeader&&e("header",{key:"8c1ae2f6e4a87e2fc66381e70c7053b1b4a4d2b2",class:"main-header"},e("h3",{key:"6f9faffac3acd82cd4645189459212026b10bf1d"},a.name),e("slot",{key:"20b3cff89b8805600eafbce17aabc4880e473a56",name:"pinned-state"})),t&&e("header",{key:"86bf499aadbe7b57868a135a35100cc1e430520e",class:"mobile-tabs"},this.tabs.map((t=>e("button",{onClick:()=>{this.tabChange.emit(t.id)},class:{active:this.currentTab===t.id}},t.name)))),e("slot",{key:"d19ec28aa918a2bfd9556c64ef758b2faf6a195d",name:this.currentTab}))}static get watchers(){return{currentTab:[{handleFocusCloseButton:0}]}}};(function(t,a,e,r){var o,i=arguments.length,s=i<3?a:null===r?r=Object.getOwnPropertyDescriptor(a,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,a,e,r);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(s=(i<3?o(s):i>3?o(a,e,s):o(a,e))||s);i>3&&s&&Object.defineProperty(a,e,s)})([o()],n.prototype,"t",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;height:100%;width:100%;font-family:var(--rtk-font-family, sans-serif);z-index:50;display:flex;flex-direction:column;container-type:size;container-name:sidebarui}@container sidebarui (height < 370px){.main-header{height:var(--rtk-space-8, 32px) !important}.close{top:var(--rtk-space-0\\.5, 2px) !important;left:var(--rtk-space-0, 0px) !important;color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.6)}}:host([view='sidebar']){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}:host([view='full-screen']){position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);max-width:100%;border:none}::slotted(*){flex-grow:1}.close{position:absolute;top:var(--rtk-space-2, 8px);left:var(--rtk-space-2, 8px);z-index:10}.main-header{position:relative;display:flex;height:var(--rtk-space-12, 48px);place-items:center;justify-content:center}.main-header,.mobile-tabs{flex-shrink:0}.mobile-tabs{display:flex;place-items:center;justify-content:space-evenly;border-bottom:1px solid rgb(var(--rtk-colors-background-700, 44 44 44))}.mobile-tabs button{margin:var(--rtk-space-0, 0px);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;padding:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));height:var(--rtk-space-10, 40px);cursor:pointer;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);font-weight:500;border-bottom:1px solid transparent}.mobile-tabs button.active{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity))}header h3{font-size:14px;font-weight:500}@media only screen and (max-device-height: 480px) and (orientation: landscape){.main-header{display:none !important}}.tab-participant-count-badge{display:inline-block;padding:2px 5px;border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.tab-participant-count-badge:not(.selected-tab){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.tab-participant-count-badge.requests-pending{background-color:rgba(var(--rtk-colors-danger))}";export{n as rtk_sidebar_ui}