@cloudflare/realtimekit-ui 1.1.0-staging.1 → 1.1.0-staging.10
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/browser.js +1 -1
- package/dist/cjs/{TextMessage-7bb3e1fd.js → TextMessage-1dc6f8b9.js} +1 -1
- package/dist/cjs/{chat-717e517d.js → chat-2ae6f058.js} +1 -1
- package/dist/cjs/{config-8c9ac89a.js → config-0a88d50b.js} +2 -2
- package/dist/cjs/{debounce-a3e0d9e7.js → debounce-b06b27ca.js} +1 -1
- package/dist/cjs/{index-8d07e125.js → index-e4244d7d.js} +1 -1
- package/dist/cjs/index.cjs.js +6 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{merge-73e2770b.js → merge-c46cfa17.js} +1 -1
- package/dist/cjs/{notification-567fe887.js → notification-f3750b61.js} +1 -1
- package/dist/cjs/realtimekit-ui.cjs.js +1 -1
- package/dist/cjs/rtk-ai-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +3 -3
- package/dist/cjs/rtk-ai.cjs.entry.js +2 -2
- package/dist/cjs/rtk-audio-grid.cjs.entry.js +3 -3
- package/dist/cjs/rtk-audio-tile.cjs.entry.js +2 -2
- package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +3 -3
- package/dist/cjs/rtk-avatar_24.cjs.entry.js +430 -301
- package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +6 -6
- package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +11 -11
- package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-camera-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-caption-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-channel-creator.cjs.entry.js +4 -4
- package/dist/cjs/rtk-channel-details.cjs.entry.js +3 -3
- package/dist/cjs/rtk-channel-header.cjs.entry.js +2 -2
- package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +6 -6
- package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +3 -3
- package/dist/cjs/rtk-chat-message.cjs.entry.js +4 -4
- package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +5 -5
- package/dist/cjs/rtk-chat-search-results.cjs.entry.js +3 -3
- package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +3 -3
- package/dist/cjs/rtk-chat-toggle.cjs.entry.js +30 -25
- package/dist/cjs/rtk-clock.cjs.entry.js +5 -5
- package/dist/cjs/rtk-controlbar-button.cjs.entry.js +3 -3
- package/dist/cjs/rtk-controlbar.cjs.entry.js +3 -3
- package/dist/cjs/rtk-debugger-audio_4.cjs.entry.js +2 -2
- package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-dialog-manager.cjs.entry.js +2 -2
- package/dist/cjs/rtk-dialog.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ended-screen.cjs.entry.js +2 -2
- package/dist/cjs/rtk-file-dropzone.cjs.entry.js +3 -3
- package/dist/cjs/rtk-file-message_3.cjs.entry.js +12 -12
- package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-grid-pagination.cjs.entry.js +2 -2
- package/dist/cjs/rtk-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-header.cjs.entry.js +3 -3
- package/dist/cjs/rtk-idle-screen.cjs.entry.js +3 -3
- package/dist/cjs/rtk-image-viewer.cjs.entry.js +3 -3
- package/dist/cjs/rtk-information-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/rtk-leave-button.cjs.entry.js +3 -3
- package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +2 -2
- package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-logo.cjs.entry.js +2 -2
- package/dist/cjs/rtk-meeting-title.cjs.entry.js +2 -2
- package/dist/cjs/rtk-message-list-view.cjs.entry.js +6 -6
- package/dist/cjs/rtk-mic-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-mixed-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-more-toggle.cjs.entry.js +4 -4
- package/dist/cjs/rtk-mute-all-button.cjs.entry.js +2 -2
- package/dist/cjs/rtk-name-tag.cjs.entry.js +3 -3
- package/dist/cjs/rtk-network-indicator.cjs.entry.js +2 -2
- package/dist/cjs/rtk-notification.cjs.entry.js +6 -6
- package/dist/cjs/rtk-notifications.cjs.entry.js +8 -5
- package/dist/cjs/rtk-participant-count.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participant-setup.cjs.entry.js +4 -4
- package/dist/cjs/rtk-participant_2.cjs.entry.js +17 -17
- package/dist/cjs/rtk-participants-audio.cjs.entry.js +3 -3
- package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +3 -3
- package/dist/cjs/rtk-participants-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-participants.cjs.entry.js +3 -3
- package/dist/cjs/rtk-pip-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +3 -3
- package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-plugins_2.cjs.entry.js +6 -6
- package/dist/cjs/rtk-poll_2.cjs.entry.js +5 -5
- package/dist/cjs/rtk-polls-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-recording-indicator.cjs.entry.js +3 -3
- package/dist/cjs/rtk-recording-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-screenshare-view.cjs.entry.js +7 -7
- package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-settings-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-settings.cjs.entry.js +2 -2
- package/dist/cjs/rtk-setup-screen.cjs.entry.js +2 -2
- package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +4 -4
- package/dist/cjs/rtk-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/rtk-simple-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +4 -4
- package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +2 -2
- package/dist/cjs/rtk-stage-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-stage.cjs.entry.js +3 -3
- package/dist/cjs/rtk-transcript.cjs.entry.js +3 -3
- package/dist/cjs/rtk-transcripts.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ui-provider.cjs.entry.js +13 -3
- package/dist/cjs/rtk-waiting-screen.cjs.entry.js +3 -3
- package/dist/cjs/{sidebar-2ad915b1.js → sidebar-0eb1e4ef.js} +1 -1
- package/dist/cjs/{ui-store-1cb28da8.js → ui-store-6c2d680f.js} +11 -2
- package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +1 -1
- package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +1 -1
- package/dist/collection/components/rtk-avatar/rtk-avatar.js +1 -1
- package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +2 -2
- package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +2 -2
- package/dist/collection/components/rtk-channel-creator/rtk-channel-creator.js +2 -2
- package/dist/collection/components/rtk-channel-details/rtk-channel-details.js +1 -1
- package/dist/collection/components/rtk-channel-selector-ui/rtk-channel-selector-ui.js +2 -2
- package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.css +29 -29
- package/dist/collection/components/rtk-channel-selector-view/rtk-channel-selector-view.js +4 -4
- package/dist/collection/components/rtk-chat/rtk-chat.css +47 -8
- package/dist/collection/components/rtk-chat/rtk-chat.js +98 -13
- package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +28 -15
- package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +2 -2
- package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +3 -3
- package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +37 -17
- package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +1 -1
- package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.css +1 -1
- package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +27 -26
- package/dist/collection/components/rtk-clock/rtk-clock.js +3 -3
- package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +1 -1
- package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +1 -1
- package/dist/collection/components/rtk-controlbar-button/rtk-controlbar-button.js +1 -1
- package/dist/collection/components/rtk-counter/rtk-counter.js +2 -2
- package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +1 -1
- package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +1 -1
- package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +1 -1
- package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +1 -1
- package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +1 -1
- package/dist/collection/components/rtk-file-message/rtk-file-message.js +2 -2
- package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +1 -1
- package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +1 -1
- package/dist/collection/components/rtk-header/rtk-header.js +1 -1
- package/dist/collection/components/rtk-icon/rtk-icon.js +1 -1
- package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +1 -1
- package/dist/collection/components/rtk-image-message/rtk-image-message.js +4 -4
- package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +3 -3
- package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +1 -1
- package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +1 -1
- package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +1 -1
- package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +1 -1
- package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +2 -2
- package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +1 -1
- package/dist/collection/components/rtk-meeting/rtk-meeting.js +37 -0
- package/dist/collection/components/rtk-menu/rtk-menu.js +2 -2
- package/dist/collection/components/rtk-menu-item/rtk-menu-item.css +6 -1
- package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +23 -1
- package/dist/collection/components/rtk-menu-list/rtk-menu-list.css +15 -4
- package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +23 -1
- package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +3 -3
- package/dist/collection/components/rtk-message-view/rtk-message-view.css +30 -22
- package/dist/collection/components/rtk-message-view/rtk-message-view.js +72 -2
- package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +2 -2
- package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +1 -1
- package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +1 -1
- package/dist/collection/components/rtk-notification/rtk-notification.js +2 -2
- package/dist/collection/components/rtk-notifications/rtk-notifications.js +4 -1
- package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +1 -1
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +5 -5
- package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +327 -264
- package/dist/collection/components/rtk-participant/rtk-participant.js +12 -12
- package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +2 -2
- package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +1 -1
- package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +1 -1
- package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +1 -1
- package/dist/collection/components/rtk-plugins/rtk-plugins.js +1 -1
- package/dist/collection/components/rtk-poll/rtk-poll.js +1 -1
- package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +2 -2
- package/dist/collection/components/rtk-polls/rtk-polls.js +3 -3
- package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +1 -1
- package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +5 -5
- package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +1 -1
- package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +2 -2
- package/dist/collection/components/rtk-spinner/rtk-spinner.js +1 -1
- package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +2 -2
- package/dist/collection/components/rtk-stage/rtk-stage.js +1 -1
- package/dist/collection/components/rtk-switch/rtk-switch.js +1 -1
- package/dist/collection/components/rtk-tab-bar/rtk-tab-bar.js +1 -1
- package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +1 -1
- package/dist/collection/components/rtk-text-message/rtk-text-message.js +2 -2
- package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
- package/dist/collection/components/rtk-tooltip/rtk-tooltip.js +1 -1
- package/dist/collection/components/rtk-transcript/rtk-transcript.js +1 -1
- package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +37 -1
- package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
- package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +1 -1
- package/dist/collection/exports.js +2 -1
- package/dist/collection/lib/overrides.js +6 -0
- package/dist/collection/utils/flags.js +0 -1
- package/dist/collection/utils/sync-with-store/ui-store.js +4 -1
- package/dist/components/index.js +6 -6
- package/dist/components/{p-6f340109.js → p-05df465d.js} +1 -1
- package/dist/components/{p-9e87b2c9.js → p-0a31ef52.js} +2 -2
- package/dist/components/{p-618864a0.js → p-107e55c1.js} +3 -3
- package/dist/components/{p-5f26bba3.js → p-193d8051.js} +2 -2
- package/dist/components/{p-d3de8b85.js → p-19b037c5.js} +4 -4
- package/dist/components/{p-8d25843a.js → p-1a9e3806.js} +3 -3
- package/dist/components/{p-82f8c924.js → p-1afc54bb.js} +3 -3
- package/dist/components/{p-afe77b50.js → p-1da807a2.js} +3 -3
- package/dist/components/{p-2f08d7eb.js → p-210862ae.js} +98 -37
- package/dist/components/{p-abe1dbe6.js → p-2309fb19.js} +4 -4
- package/dist/components/{p-f8f5cb31.js → p-2447a26f.js} +4 -4
- package/dist/components/{p-63ef7ea4.js → p-282e8e83.js} +7 -7
- package/dist/components/{p-ee98bbaf.js → p-33be3c19.js} +13 -13
- package/dist/components/{p-adf73364.js → p-33e73313.js} +6 -6
- package/dist/components/{p-121e073d.js → p-35e93724.js} +2 -2
- package/dist/components/{p-bb8f2597.js → p-395ef9c8.js} +7 -7
- package/dist/components/{p-f47894a6.js → p-3972098e.js} +21 -27
- package/dist/components/{p-10ef077c.js → p-39e8b34a.js} +3 -3
- package/dist/components/{p-e81fc1e8.js → p-3e58e0f3.js} +3 -3
- package/dist/components/{p-0b4e526c.js → p-43bf8953.js} +4 -4
- package/dist/components/p-44a203bd.js +409 -0
- package/dist/components/{p-190db142.js → p-44c32349.js} +8 -8
- package/dist/components/{p-2d08ab28.js → p-45b4f6a1.js} +4 -4
- package/dist/components/{p-9889bee5.js → p-46d99dd9.js} +4 -4
- package/dist/components/{p-65cd2fe3.js → p-524d7900.js} +5 -5
- package/dist/components/{p-0d7bf41b.js → p-5476e3f3.js} +4 -4
- package/dist/components/{p-914563e7.js → p-586482a8.js} +6 -6
- package/dist/components/{p-fd68a52b.js → p-5f1b84f7.js} +9 -9
- package/dist/components/{p-d06d1eac.js → p-600579a6.js} +3 -3
- package/dist/components/{p-6f272732.js → p-6392204c.js} +9 -9
- package/dist/components/{p-a94b2e67.js → p-6739a399.js} +2 -2
- package/dist/components/{p-f7eb9c47.js → p-6c02b0d0.js} +6 -6
- package/dist/components/{p-c515acba.js → p-6f361314.js} +3 -3
- package/dist/components/{p-47c25f64.js → p-6f7c46d2.js} +1 -1
- package/dist/components/{p-84e5b453.js → p-6f8d2043.js} +2 -2
- package/dist/components/{p-080acf18.js → p-7148ec6a.js} +7 -4
- package/dist/components/{p-33a87325.js → p-72fffe3e.js} +3 -3
- package/dist/components/{p-3b29dda1.js → p-73baf5ba.js} +1 -1
- package/dist/components/{p-2f82e0b0.js → p-74356882.js} +8 -8
- package/dist/components/{p-fe911889.js → p-7a27fdb5.js} +20 -11
- package/dist/components/{p-b011763d.js → p-7b6356e2.js} +4 -4
- package/dist/components/{p-5c92df32.js → p-7bde2b2d.js} +6 -6
- package/dist/components/{p-6c2cfa0d.js → p-7c8096c2.js} +5 -5
- package/dist/components/{p-a6296b02.js → p-819cb785.js} +7 -4
- package/dist/components/{p-6756b222.js → p-851b90a6.js} +3 -3
- package/dist/components/{p-e4a080a5.js → p-89151c7a.js} +4 -4
- package/dist/components/{p-244cbe7b.js → p-89eb65a9.js} +2 -2
- package/dist/components/{p-c3621e10.js → p-92729e09.js} +7 -7
- package/dist/components/{p-cf503999.js → p-977f9875.js} +5 -5
- package/dist/components/{p-f4e75ea9.js → p-9bdc24b8.js} +5 -5
- package/dist/components/{p-188bfe87.js → p-abdff498.js} +9 -9
- package/dist/components/{p-78b61cce.js → p-ad873f2d.js} +1 -1
- package/dist/components/{p-d107e9f4.js → p-b6869c32.js} +4 -4
- package/dist/components/{p-395d7140.js → p-b76e3950.js} +5 -5
- package/dist/components/{p-102b6df8.js → p-c05530c8.js} +2 -2
- package/dist/components/p-c78c26b1.js +203 -0
- package/dist/components/{p-88bef213.js → p-cf8f725b.js} +1 -1
- package/dist/components/{p-c078ae06.js → p-d188f58b.js} +3 -3
- package/dist/components/{p-2e282643.js → p-d9f6db4f.js} +5 -5
- package/dist/components/{p-51de7af3.js → p-da87cc71.js} +1 -1
- package/dist/components/{p-0d582365.js → p-dc3143c0.js} +2 -2
- package/dist/components/{p-4d582a90.js → p-dd89aff2.js} +6 -6
- package/dist/components/{p-7481511c.js → p-dfb42075.js} +3 -3
- package/dist/components/{p-e675729a.js → p-e375b50d.js} +5 -5
- package/dist/components/{p-0a35a909.js → p-e443d803.js} +4 -4
- package/dist/components/{p-a6f2b402.js → p-e4888ccc.js} +31 -31
- package/dist/components/{p-a10b9faa.js → p-e552dc59.js} +3 -3
- package/dist/components/{p-55501201.js → p-e57e8041.js} +5 -5
- package/dist/components/{p-b34865c7.js → p-e64e3cec.js} +5 -5
- package/dist/components/{p-3da4880c.js → p-e72a0f16.js} +5 -5
- package/dist/components/{p-7fc0dc2f.js → p-e847fee9.js} +11 -3
- package/dist/components/{p-b882f4a1.js → p-ecb016da.js} +5 -5
- package/dist/components/{p-a4a5ff5a.js → p-edd12f2f.js} +6 -6
- package/dist/components/{p-563c785d.js → p-eeb37b16.js} +3 -3
- package/dist/components/{p-dbfc9151.js → p-f0e4633e.js} +4 -4
- package/dist/components/{p-a29c01fc.js → p-f6c2e822.js} +3 -3
- package/dist/components/{p-20290b0b.js → p-f7bd10f1.js} +5 -5
- package/dist/components/{p-e8df7ac5.js → p-fa5aba68.js} +19 -19
- package/dist/components/{p-488d88a8.js → p-fb7666ce.js} +5 -5
- package/dist/components/{p-fa8f6b4a.js → p-fb836f65.js} +1 -1
- package/dist/components/{p-e6710b76.js → p-fb900e8f.js} +4 -4
- package/dist/components/{p-f7430e46.js → p-fefc57f9.js} +6 -6
- package/dist/components/rtk-ai-toggle.js +5 -5
- package/dist/components/rtk-ai-transcriptions.js +1 -1
- package/dist/components/rtk-ai.js +4 -4
- package/dist/components/rtk-audio-grid.js +3 -3
- package/dist/components/rtk-audio-tile.js +6 -6
- package/dist/components/rtk-audio-visualizer.js +1 -1
- package/dist/components/rtk-avatar.js +1 -1
- package/dist/components/rtk-breakout-room-manager.js +1 -1
- package/dist/components/rtk-breakout-room-participants.js +1 -1
- package/dist/components/rtk-breakout-rooms-manager.js +1 -1
- package/dist/components/rtk-breakout-rooms-toggle.js +5 -5
- package/dist/components/rtk-broadcast-message-modal.js +1 -1
- package/dist/components/rtk-camera-selector.js +1 -1
- package/dist/components/rtk-camera-toggle.js +6 -6
- package/dist/components/rtk-caption-toggle.js +5 -5
- package/dist/components/rtk-channel-creator.js +7 -7
- package/dist/components/rtk-channel-details.js +1 -1
- package/dist/components/rtk-channel-header.js +8 -8
- package/dist/components/rtk-channel-selector-ui.js +7 -7
- package/dist/components/rtk-channel-selector-view.js +1 -1
- package/dist/components/rtk-chat-composer-ui.js +7 -7
- package/dist/components/rtk-chat-composer-view.js +1 -1
- package/dist/components/rtk-chat-message.js +1 -1
- package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
- package/dist/components/rtk-chat-messages-ui.js +17 -17
- package/dist/components/rtk-chat-search-results.js +14 -14
- package/dist/components/rtk-chat-selector-ui.js +3 -3
- package/dist/components/rtk-chat-toggle.js +34 -30
- package/dist/components/rtk-chat.js +1 -1
- package/dist/components/rtk-clock.js +6 -6
- package/dist/components/rtk-confirmation-modal.js +1 -1
- package/dist/components/rtk-controlbar-button.js +1 -1
- package/dist/components/rtk-controlbar.js +3 -3
- package/dist/components/rtk-counter.js +1 -1
- package/dist/components/rtk-debugger-audio.js +1 -1
- package/dist/components/rtk-debugger-screenshare.js +1 -1
- package/dist/components/rtk-debugger-system.js +1 -1
- package/dist/components/rtk-debugger-toggle.js +6 -6
- package/dist/components/rtk-debugger-video.js +1 -1
- package/dist/components/rtk-debugger.js +1 -1
- package/dist/components/rtk-dialog-manager.js +23 -23
- package/dist/components/rtk-dialog.js +1 -1
- package/dist/components/rtk-draft-attachment-view.js +1 -1
- package/dist/components/rtk-emoji-picker-button.js +1 -1
- package/dist/components/rtk-emoji-picker.js +1 -1
- package/dist/components/rtk-ended-screen.js +4 -4
- package/dist/components/rtk-file-dropzone.js +4 -4
- package/dist/components/rtk-file-message-view.js +1 -1
- package/dist/components/rtk-file-message.js +1 -1
- package/dist/components/rtk-file-picker-button.js +1 -1
- package/dist/components/rtk-fullscreen-toggle.js +1 -1
- package/dist/components/rtk-grid-pagination.js +4 -4
- package/dist/components/rtk-grid.js +9 -9
- package/dist/components/rtk-header.js +3 -3
- package/dist/components/rtk-icon.js +1 -1
- package/dist/components/rtk-idle-screen.js +6 -6
- package/dist/components/rtk-image-message-view.js +1 -1
- package/dist/components/rtk-image-message.js +1 -1
- package/dist/components/rtk-image-viewer.js +4 -4
- package/dist/components/rtk-information-tooltip.js +4 -4
- package/dist/components/rtk-join-stage.js +1 -1
- package/dist/components/rtk-leave-button.js +6 -6
- package/dist/components/rtk-leave-meeting.js +1 -1
- package/dist/components/rtk-livestream-indicator.js +1 -1
- package/dist/components/rtk-livestream-player.js +1 -1
- package/dist/components/rtk-livestream-toggle.js +5 -5
- package/dist/components/rtk-logo.js +1 -1
- package/dist/components/rtk-markdown-view.js +1 -1
- package/dist/components/rtk-meeting-title.js +3 -3
- package/dist/components/rtk-meeting.js +40 -28
- package/dist/components/rtk-menu-item.js +1 -1
- package/dist/components/rtk-menu-list.js +1 -1
- package/dist/components/rtk-menu.js +1 -1
- package/dist/components/rtk-message-list-view.js +7 -7
- package/dist/components/rtk-message-view.js +1 -1
- package/dist/components/rtk-mic-toggle.js +6 -6
- package/dist/components/rtk-microphone-selector.js +1 -1
- package/dist/components/rtk-mixed-grid.js +7 -7
- package/dist/components/rtk-more-toggle.js +7 -7
- package/dist/components/rtk-mute-all-button.js +6 -6
- package/dist/components/rtk-mute-all-confirmation.js +1 -1
- package/dist/components/rtk-name-tag.js +1 -1
- package/dist/components/rtk-network-indicator.js +3 -3
- package/dist/components/rtk-notification.js +1 -1
- package/dist/components/rtk-notifications.js +9 -6
- package/dist/components/rtk-overlay-modal.js +1 -1
- package/dist/components/rtk-paginated-list.js +1 -1
- package/dist/components/rtk-participant-count.js +3 -3
- package/dist/components/rtk-participant-setup.js +4 -4
- package/dist/components/rtk-participant-tile.js +1 -1
- package/dist/components/rtk-participant.js +1 -1
- package/dist/components/rtk-participants-audio.js +5 -5
- package/dist/components/rtk-participants-stage-list.js +1 -1
- package/dist/components/rtk-participants-stage-queue.js +1 -1
- package/dist/components/rtk-participants-toggle.js +6 -6
- package/dist/components/rtk-participants-viewer-list.js +1 -1
- package/dist/components/rtk-participants-waiting-list.js +1 -1
- package/dist/components/rtk-participants.js +15 -15
- package/dist/components/rtk-permissions-message.js +1 -1
- package/dist/components/rtk-pip-toggle.js +5 -5
- package/dist/components/rtk-plugin-main.js +1 -1
- package/dist/components/rtk-plugins-toggle.js +6 -6
- package/dist/components/rtk-plugins.js +1 -1
- package/dist/components/rtk-poll-form.js +1 -1
- package/dist/components/rtk-poll.js +1 -1
- package/dist/components/rtk-polls-toggle.js +6 -6
- package/dist/components/rtk-polls.js +1 -1
- package/dist/components/rtk-recording-indicator.js +4 -4
- package/dist/components/rtk-recording-toggle.js +5 -5
- package/dist/components/rtk-screen-share-toggle.js +6 -6
- package/dist/components/rtk-screenshare-view.js +9 -9
- package/dist/components/rtk-settings-audio.js +1 -1
- package/dist/components/rtk-settings-toggle.js +6 -6
- package/dist/components/rtk-settings-video.js +1 -1
- package/dist/components/rtk-settings.js +11 -11
- package/dist/components/rtk-setup-screen.js +7 -7
- package/dist/components/rtk-sidebar-ui.js +1 -1
- package/dist/components/rtk-sidebar.js +10 -10
- package/dist/components/rtk-simple-grid.js +2 -2
- package/dist/components/rtk-speaker-selector.js +1 -1
- package/dist/components/rtk-spinner.js +1 -1
- package/dist/components/rtk-spotlight-grid.js +4 -4
- package/dist/components/rtk-spotlight-indicator.js +1 -1
- package/dist/components/rtk-stage-toggle.js +6 -6
- package/dist/components/rtk-stage.js +3 -3
- package/dist/components/rtk-switch.js +1 -1
- package/dist/components/rtk-tab-bar.js +1 -1
- package/dist/components/rtk-text-composer-view.js +1 -1
- package/dist/components/rtk-text-message-view.js +1 -1
- package/dist/components/rtk-text-message.js +1 -1
- package/dist/components/rtk-tooltip.js +1 -1
- package/dist/components/rtk-transcript.js +1 -1
- package/dist/components/rtk-transcripts.js +3 -3
- package/dist/components/rtk-ui-provider.js +17 -5
- package/dist/components/rtk-viewer-count.js +1 -1
- package/dist/components/rtk-virtualized-participant-list.js +1 -1
- package/dist/components/rtk-waiting-screen.js +4 -4
- package/dist/docs/docs-components.json +372 -82
- package/dist/docs/docs-vscode.json +42 -1
- package/dist/esm/{TextMessage-ca92045e.js → TextMessage-0d8be8c5.js} +1 -1
- package/dist/esm/{chat-ff185374.js → chat-b2bea75f.js} +1 -1
- package/dist/esm/{config-e684aa4d.js → config-325caca3.js} +2 -2
- package/dist/esm/{debounce-3ea4df36.js → debounce-3139f9e3.js} +1 -1
- package/dist/esm/{index-e65afca5.js → index-6eb882e7.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/loader.js +584 -428
- package/dist/esm/{merge-7ffc04b3.js → merge-bc2a0775.js} +1 -1
- package/dist/esm/{notification-78afaabf.js → notification-4beb1e0d.js} +1 -1
- package/dist/esm/realtimekit-ui.js +1 -1
- package/dist/esm/rtk-ai-toggle.entry.js +2 -2
- package/dist/esm/rtk-ai-transcriptions.entry.js +3 -3
- package/dist/esm/rtk-ai.entry.js +2 -2
- package/dist/esm/rtk-audio-grid.entry.js +3 -3
- package/dist/esm/rtk-audio-tile.entry.js +2 -2
- package/dist/esm/rtk-audio-visualizer_4.entry.js +3 -3
- package/dist/esm/rtk-avatar_24.entry.js +430 -301
- package/dist/esm/rtk-breakout-room-manager_3.entry.js +6 -6
- package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +11 -11
- package/dist/esm/rtk-breakout-rooms-toggle.entry.js +2 -2
- package/dist/esm/rtk-camera-selector_2.entry.js +2 -2
- package/dist/esm/rtk-camera-toggle.entry.js +2 -2
- package/dist/esm/rtk-caption-toggle.entry.js +2 -2
- package/dist/esm/rtk-channel-creator.entry.js +4 -4
- package/dist/esm/rtk-channel-details.entry.js +3 -3
- package/dist/esm/rtk-channel-header.entry.js +2 -2
- package/dist/esm/rtk-channel-selector-ui.entry.js +6 -6
- package/dist/esm/rtk-chat-composer-ui.entry.js +3 -3
- package/dist/esm/rtk-chat-message.entry.js +4 -4
- package/dist/esm/rtk-chat-messages-ui.entry.js +5 -5
- package/dist/esm/rtk-chat-search-results.entry.js +3 -3
- package/dist/esm/rtk-chat-selector-ui.entry.js +3 -3
- package/dist/esm/rtk-chat-toggle.entry.js +30 -25
- package/dist/esm/rtk-clock.entry.js +5 -5
- package/dist/esm/rtk-controlbar-button.entry.js +3 -3
- package/dist/esm/rtk-controlbar.entry.js +3 -3
- package/dist/esm/rtk-debugger-audio_4.entry.js +2 -2
- package/dist/esm/rtk-debugger-toggle.entry.js +3 -3
- package/dist/esm/rtk-dialog-manager.entry.js +2 -2
- package/dist/esm/rtk-dialog.entry.js +2 -2
- package/dist/esm/rtk-ended-screen.entry.js +2 -2
- package/dist/esm/rtk-file-dropzone.entry.js +3 -3
- package/dist/esm/rtk-file-message_3.entry.js +12 -12
- package/dist/esm/rtk-fullscreen-toggle.entry.js +2 -2
- package/dist/esm/rtk-grid-pagination.entry.js +2 -2
- package/dist/esm/rtk-grid.entry.js +2 -2
- package/dist/esm/rtk-header.entry.js +3 -3
- package/dist/esm/rtk-idle-screen.entry.js +3 -3
- package/dist/esm/rtk-image-viewer.entry.js +3 -3
- package/dist/esm/rtk-information-tooltip.entry.js +3 -3
- package/dist/esm/rtk-leave-button.entry.js +3 -3
- package/dist/esm/rtk-livestream-indicator_3.entry.js +2 -2
- package/dist/esm/rtk-livestream-toggle.entry.js +2 -2
- package/dist/esm/rtk-logo.entry.js +2 -2
- package/dist/esm/rtk-meeting-title.entry.js +2 -2
- package/dist/esm/rtk-message-list-view.entry.js +6 -6
- package/dist/esm/rtk-mic-toggle.entry.js +2 -2
- package/dist/esm/rtk-mixed-grid.entry.js +2 -2
- package/dist/esm/rtk-more-toggle.entry.js +4 -4
- package/dist/esm/rtk-mute-all-button.entry.js +2 -2
- package/dist/esm/rtk-name-tag.entry.js +3 -3
- package/dist/esm/rtk-network-indicator.entry.js +2 -2
- package/dist/esm/rtk-notification.entry.js +6 -6
- package/dist/esm/rtk-notifications.entry.js +8 -5
- package/dist/esm/rtk-participant-count.entry.js +2 -2
- package/dist/esm/rtk-participant-setup.entry.js +4 -4
- package/dist/esm/rtk-participant_2.entry.js +17 -17
- package/dist/esm/rtk-participants-audio.entry.js +3 -3
- package/dist/esm/rtk-participants-stage-list_4.entry.js +3 -3
- package/dist/esm/rtk-participants-toggle.entry.js +3 -3
- package/dist/esm/rtk-participants.entry.js +3 -3
- package/dist/esm/rtk-pip-toggle.entry.js +2 -2
- package/dist/esm/rtk-plugin-main_2.entry.js +3 -3
- package/dist/esm/rtk-plugins-toggle.entry.js +3 -3
- package/dist/esm/rtk-plugins_2.entry.js +6 -6
- package/dist/esm/rtk-poll_2.entry.js +5 -5
- package/dist/esm/rtk-polls-toggle.entry.js +3 -3
- package/dist/esm/rtk-recording-indicator.entry.js +3 -3
- package/dist/esm/rtk-recording-toggle.entry.js +2 -2
- package/dist/esm/rtk-screen-share-toggle.entry.js +2 -2
- package/dist/esm/rtk-screenshare-view.entry.js +7 -7
- package/dist/esm/rtk-settings-audio_2.entry.js +2 -2
- package/dist/esm/rtk-settings-toggle.entry.js +3 -3
- package/dist/esm/rtk-settings.entry.js +2 -2
- package/dist/esm/rtk-setup-screen.entry.js +2 -2
- package/dist/esm/rtk-sidebar-ui.entry.js +4 -4
- package/dist/esm/rtk-sidebar.entry.js +3 -3
- package/dist/esm/rtk-simple-grid.entry.js +2 -2
- package/dist/esm/rtk-spotlight-grid.entry.js +4 -4
- package/dist/esm/rtk-spotlight-indicator.entry.js +2 -2
- package/dist/esm/rtk-stage-toggle.entry.js +2 -2
- package/dist/esm/rtk-stage.entry.js +3 -3
- package/dist/esm/rtk-transcript.entry.js +3 -3
- package/dist/esm/rtk-transcripts.entry.js +2 -2
- package/dist/esm/rtk-ui-provider.entry.js +13 -3
- package/dist/esm/rtk-waiting-screen.entry.js +3 -3
- package/dist/esm/{sidebar-030fff49.js → sidebar-376c9917.js} +1 -1
- package/dist/esm/{ui-store-9e486e1b.js → ui-store-12132d9c.js} +11 -3
- package/dist/realtimekit-ui/index.esm.js +1 -1
- package/dist/realtimekit-ui/{p-385fddbd.entry.js → p-00445029.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-74e1b5a6.entry.js → p-05d1b9d5.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-95f05e26.entry.js → p-0baa78d7.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-12e4cb4a.js → p-11a469d9.js} +1 -1
- package/dist/realtimekit-ui/{p-8f512d69.entry.js → p-14569a57.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2b373e53.entry.js → p-1462cbd9.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2fc5ef84.entry.js → p-1669c53d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-b387e9a1.entry.js → p-1834416c.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-0b8c47d9.entry.js → p-1fe6003b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-21d4bb9c.entry.js +1 -0
- package/dist/realtimekit-ui/{p-61a53713.entry.js → p-2441260e.entry.js} +1 -1
- package/dist/realtimekit-ui/p-25c4d10f.js +1 -0
- package/dist/realtimekit-ui/{p-53ac3d30.entry.js → p-2b054928.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-62e0a141.entry.js → p-30dcb4cc.entry.js} +1 -1
- package/dist/realtimekit-ui/p-322957ed.entry.js +1 -0
- package/dist/realtimekit-ui/{p-36c8dfa0.entry.js → p-323d1aa4.entry.js} +1 -1
- package/dist/realtimekit-ui/p-342b4926.entry.js +1 -0
- package/dist/realtimekit-ui/p-369648b9.entry.js +1 -0
- package/dist/realtimekit-ui/{p-4eba1baa.entry.js → p-3dd04263.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-60a29b69.entry.js → p-3f4120cc.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3a325310.entry.js → p-426bf45e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a9126c12.entry.js → p-43530cd3.entry.js} +1 -1
- package/dist/realtimekit-ui/p-44531a97.entry.js +1 -0
- package/dist/realtimekit-ui/p-4485414e.entry.js +1 -0
- package/dist/realtimekit-ui/p-44d69c6b.entry.js +1 -0
- package/dist/realtimekit-ui/p-45f90b95.js +1 -0
- package/dist/realtimekit-ui/{p-951a7b06.entry.js → p-48c87789.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-949b2b6a.entry.js → p-4b33b435.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-8b189438.entry.js → p-4b638184.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-9ad2c746.entry.js → p-515a17ce.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-7b999408.entry.js → p-532e1a53.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-38f4773b.entry.js → p-53680d55.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-5383fe87.entry.js → p-54a88fdf.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-c7711712.entry.js → p-573187b4.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f5aa8af7.entry.js → p-5892c1e0.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-54a31e02.entry.js → p-5b00a8fa.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-aa70de39.entry.js → p-612a8d25.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6adb2de4.entry.js → p-616dc312.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a9dd63ef.entry.js → p-639601b7.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-c638f666.entry.js → p-64206b62.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-1666857d.entry.js → p-67ead213.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-882d07c9.entry.js → p-685adc5f.entry.js} +1 -1
- package/dist/realtimekit-ui/p-6896e819.entry.js +1 -0
- package/dist/realtimekit-ui/{p-09869644.entry.js → p-6914a616.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-9cbf286a.entry.js → p-701cdf1b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-7108d1cd.entry.js +1 -0
- package/dist/realtimekit-ui/{p-a319e81f.entry.js → p-75f53ae6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-c1b81873.entry.js → p-7a9a226e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3d0c4257.entry.js → p-7d01d588.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-8b341608.entry.js → p-80e51a73.entry.js} +1 -1
- package/dist/realtimekit-ui/p-820dad23.entry.js +1 -0
- package/dist/realtimekit-ui/p-85b3c0c4.entry.js +1 -0
- package/dist/realtimekit-ui/{p-f0f6c282.entry.js → p-85b45c3b.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2a0ec1c6.entry.js → p-8778b3e6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-c5c965b8.entry.js → p-94a37c73.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3369f405.entry.js → p-95fb25d6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-80c856cd.js → p-9b550ec4.js} +1 -1
- package/dist/realtimekit-ui/{p-643194e4.entry.js → p-a0d39ea3.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-639ab9ad.entry.js → p-a1408db4.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-d0384d90.entry.js → p-a40cc665.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-084b6f30.js → p-a5900df2.js} +1 -1
- package/dist/realtimekit-ui/{p-a1203856.entry.js → p-a67e2a25.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-31f58b98.entry.js → p-a680da64.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-61a16ccf.entry.js → p-a7172c2d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-91ea043c.js → p-a7e0277f.js} +1 -1
- package/dist/realtimekit-ui/p-a852e0cf.entry.js +1 -0
- package/dist/realtimekit-ui/{p-ae7319ac.entry.js → p-a9190330.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-7613857e.entry.js → p-ac6c8ebe.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e7b83772.entry.js → p-ad5e9fdb.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-98ee3341.entry.js → p-af58f450.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6a45f305.js → p-afa7211c.js} +1 -1
- package/dist/realtimekit-ui/{p-4eee77b0.entry.js → p-b25f7d7b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-b51e813e.entry.js +1 -0
- package/dist/realtimekit-ui/{p-38aec474.entry.js → p-be03944b.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3eefefa3.entry.js → p-be5bdd0a.entry.js} +1 -1
- package/dist/realtimekit-ui/p-bf717b8c.entry.js +1 -0
- package/dist/realtimekit-ui/p-c5f704a3.entry.js +1 -0
- package/dist/realtimekit-ui/{p-de75d48d.entry.js → p-c8773db0.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-5a2d8313.entry.js → p-cb54bd67.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-ba51770e.entry.js → p-cc226b51.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-91fd286c.js → p-cd0c5440.js} +1 -1
- package/dist/realtimekit-ui/{p-e925ca8a.entry.js → p-cd56beb7.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-d7f16f24.entry.js → p-cda276d6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-93b84c22.js → p-d3e520e5.js} +1 -1
- package/dist/realtimekit-ui/p-d880fb69.entry.js +1 -0
- package/dist/realtimekit-ui/{p-11c964cf.entry.js → p-e0c73820.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e62593a2.entry.js → p-e5b426fa.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-61d3f74f.entry.js → p-e78ba202.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-7786e9a7.entry.js → p-ebfde234.entry.js} +1 -1
- package/dist/realtimekit-ui/p-ec5ed8a4.entry.js +1 -0
- package/dist/realtimekit-ui/{p-9c1f42dd.entry.js → p-f266302c.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-d9cad67f.entry.js → p-f32aecbc.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-7f76de48.entry.js → p-f6c82f1b.entry.js} +1 -1
- package/dist/realtimekit-ui/p-fa86682c.entry.js +1 -0
- package/dist/realtimekit-ui/{p-788f26c4.entry.js → p-fcb7a6e2.entry.js} +1 -1
- package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
- package/dist/types/components/rtk-chat/rtk-chat.d.ts +6 -1
- package/dist/types/components/rtk-chat-composer-view/rtk-chat-composer-view.d.ts +1 -0
- package/dist/types/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.d.ts +2 -0
- package/dist/types/components/rtk-chat-toggle/rtk-chat-toggle.d.ts +4 -6
- package/dist/types/components/rtk-meeting/rtk-meeting.d.ts +4 -0
- package/dist/types/components/rtk-menu-item/rtk-menu-item.d.ts +2 -0
- package/dist/types/components/rtk-menu-list/rtk-menu-list.d.ts +2 -0
- package/dist/types/components/rtk-message-view/rtk-message-view.d.ts +7 -0
- package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +55 -54
- package/dist/types/components/rtk-ui-provider/rtk-ui-provider.d.ts +4 -1
- package/dist/types/components.d.ts +84 -7
- package/dist/types/exports.d.ts +2 -1
- package/dist/types/lib/overrides.d.ts +16 -0
- package/dist/types/utils/flags.d.ts +0 -1
- package/dist/types/utils/sync-with-store/ui-store.d.ts +4 -1
- package/package.json +1 -1
- package/dist/components/p-a9540d93.js +0 -357
- package/dist/components/p-d4e2ac64.js +0 -203
- package/dist/realtimekit-ui/p-0689d68b.entry.js +0 -1
- package/dist/realtimekit-ui/p-1bf58a84.entry.js +0 -1
- package/dist/realtimekit-ui/p-2f641bfa.entry.js +0 -1
- package/dist/realtimekit-ui/p-33228f0a.entry.js +0 -1
- package/dist/realtimekit-ui/p-3e02ec0b.entry.js +0 -1
- package/dist/realtimekit-ui/p-481549ac.entry.js +0 -1
- package/dist/realtimekit-ui/p-50157a65.entry.js +0 -1
- package/dist/realtimekit-ui/p-50e861f9.entry.js +0 -1
- package/dist/realtimekit-ui/p-57277553.entry.js +0 -1
- package/dist/realtimekit-ui/p-5dc40f1a.entry.js +0 -1
- package/dist/realtimekit-ui/p-77e04fb7.entry.js +0 -1
- package/dist/realtimekit-ui/p-7a8ca3f2.entry.js +0 -1
- package/dist/realtimekit-ui/p-930f0255.entry.js +0 -1
- package/dist/realtimekit-ui/p-941f159e.entry.js +0 -1
- package/dist/realtimekit-ui/p-a4e223e8.entry.js +0 -1
- package/dist/realtimekit-ui/p-b564d931.entry.js +0 -1
- package/dist/realtimekit-ui/p-e720b51e.js +0 -1
- package/dist/realtimekit-ui/p-e87928f7.js +0 -1
- package/dist/realtimekit-ui/p-f40a55e3.entry.js +0 -1
- package/dist/realtimekit-ui/p-f645b8bb.entry.js +0 -1
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, c as createEvent, a as getElement, w as writeTask } from './index-c1fb98bb.js';
|
|
2
|
-
import { e as defaultIconPack,
|
|
2
|
+
import { e as defaultIconPack, i as useLanguage, c as createDefaultConfig, f as defaultOverrides, I as FlagsmithFeatureFlags, H as chatUnreadTimestamps, J as gracefulStorage, u as uiStore, b as createPeerStore } from './ui-store-12132d9c.js';
|
|
3
3
|
import { f as formatName, g as getInitials, s as sanitizeLink, h as hasOnlyEmojis } from './string-068ce30a.js';
|
|
4
|
-
import { S as SyncWithStore } from './index-
|
|
5
|
-
import { d as debounce } from './debounce-
|
|
6
|
-
import { h as handleFilesDataTransfer, g as generateChatGroupKey, T as TEMPORARY_CHANNEL_PREFIX, i as isDirectMessageChannel, d as alphabeticalSorter, e as getDMComparator, p as parseMessageForTarget, M as MAX_TEXT_LENGTH, f as parseRichText, j as extractReplyBlock, s as stripOutReplyBlock } from './chat-
|
|
4
|
+
import { S as SyncWithStore } from './index-6eb882e7.js';
|
|
5
|
+
import { d as debounce } from './debounce-3139f9e3.js';
|
|
6
|
+
import { h as handleFilesDataTransfer, g as generateChatGroupKey, T as TEMPORARY_CHANNEL_PREFIX, i as isDirectMessageChannel, d as alphabeticalSorter, e as getDMComparator, p as parseMessageForTarget, M as MAX_TEXT_LENGTH, f as parseRichText, j as extractReplyBlock, s as stripOutReplyBlock } from './chat-b2bea75f.js';
|
|
7
7
|
import { g as getExtension, a as getFileSize, d as downloadFile } from './file-6114f1a9.js';
|
|
8
|
-
import { p as provideRtkDesignSystem, d as deepMerge } from './merge-
|
|
8
|
+
import { p as provideRtkDesignSystem, d as deepMerge } from './merge-bc2a0775.js';
|
|
9
9
|
import { R as Render } from './index-d31a2e33.js';
|
|
10
|
-
import { g as generateConfig } from './config-
|
|
10
|
+
import { g as generateConfig } from './config-325caca3.js';
|
|
11
11
|
import { i as index } from './ResizeObserver.es-02979d4e.js';
|
|
12
12
|
import { c as computePosition, o as offset, f as flip, s as shift, a as arrow } from './floating-ui.dom.esm-21c3d54e.js';
|
|
13
13
|
import { f as formatDateTime, e as elapsedDuration } from './date-b1f78dea.js';
|
|
14
|
-
import { s as smoothScrollToBottom } from './scroll-2d8e810c.js';
|
|
15
14
|
|
|
16
15
|
const rtkAvatarCss = ":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:var(--rtk-space-32, 128px);width:var(--rtk-space-32, 128px);align-items:center;justify-content:center;font-size:28px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));overflow:clip;border-radius:9999px;-webkit-user-select:none;-moz-user-select:none;user-select:none}rtk-icon{height:50%;width:50%}.image-ctr{display:flex;height:100%;width:100%;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}img{height:var(--rtk-space-0, 0px);width:var(--rtk-space-0, 0px);-o-object-fit:cover;object-fit:cover}img.loaded{height:100%;width:100%}.initials{display:flex;height:100%;width:100%;align-items:center;justify-content:center;text-transform:uppercase}.image{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.image img{display:none;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.image img.loaded{display:block}:host([variant='hexagon']){border-radius:var(--rtk-border-radius-none, 0);clip-path:polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%)}:host([variant='square']){border-radius:var(--rtk-border-radius-none, 0);clip-path:polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)}:host([size='sm']){height:var(--rtk-space-14, 56px);width:var(--rtk-space-14, 56px);font-size:12px}:host([size='md']){height:var(--rtk-space-28, 112px);width:var(--rtk-space-28, 112px)}:host([size='lg']){height:var(--rtk-space-32, 128px);width:var(--rtk-space-32, 128px)}";
|
|
17
16
|
const RtkAvatarStyle0 = rtkAvatarCss;
|
|
@@ -51,7 +50,7 @@ const RtkAvatar = class {
|
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
52
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: 'd7d3a7b03a3807984dc6798b5e35cec4418e06e7' }, this.getAvatar(), h("slot", { key: '25aa9fe632a132c1e2f8ef88ac98043bb8ef085a' })));
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
__decorate$h([
|
|
@@ -86,7 +85,7 @@ const RtkButton = class {
|
|
|
86
85
|
};
|
|
87
86
|
RtkButton.style = RtkButtonStyle0;
|
|
88
87
|
|
|
89
|
-
const rtkChannelSelectorViewCss = ".scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n flex-direction: column;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-
|
|
88
|
+
const rtkChannelSelectorViewCss = ".scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n flex-direction: column;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n position: relative;\n z-index: 10;\n height: var(--rtk-space-12, 48px);\n min-height: 48px;\n}\n\n.dropdown-trigger {\n height: 100%;\n width: 100%;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n padding: var(--rtk-space-4, 16px);\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n font-size: 14px;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n cursor: pointer;\n position: absolute;\n z-index: 20;\n}\n\n.dropdown-trigger span {\n display: flex;\n flex: 1 1 0%;\n align-items: center;\n justify-content: flex-start;\n gap: var(--rtk-space-2, 8px);\n}\n\n.dropdown-trigger rtk-icon {\n margin-left: var(--rtk-space-1, 4px);\n height: var(--rtk-space-4, 16px);\n width: var(--rtk-space-4, 16px);\n flex-shrink: 0;\n}\n\n@container chatcontainer (height < 360px) {\n .dropdown-trigger {\n padding: var(--rtk-space-2, 8px);\n }\n .dropdown {\n top: var(--rtk-space-8, 32px) !important;\n }\n .search-container {\n padding-left: var(--rtk-space-0, 0px) !important;\n padding-right: var(--rtk-space-0, 0px) !important;\n padding-top: var(--rtk-space-0, 0px) !important;\n padding-bottom: var(--rtk-space-0, 0px) !important;\n }\n input {\n height: var(--rtk-space-8, 32px) !important;\n border-radius: var(--rtk-border-radius-none, 0) !important;\n }\n .avatar-icon {\n height: var(--rtk-space-3, 12px) !important;\n width: var(--rtk-space-3, 12px) !important;\n padding: var(--rtk-space-1, 4px) !important;\n }\n}\n\n.dropdown {\n position: absolute;\n width: 100%;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n border-bottom-width: var(--rtk-border-width-sm, 1px);\n border-right-width: var(--rtk-border-width-none, 0);\n border-left-width: var(--rtk-border-width-none, 0);\n border-top-width: var(--rtk-border-width-none, 0);\n border-style: solid;\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n top: var(--rtk-space-12, 48px);\n z-index: 10;\n animation: 0.3s slide-down ease;\n}\n\n.dropdown .channels-container {\n max-height: var(--rtk-space-80, 320px);\n}\n\n.list {\n display: flex;\n flex-direction: column;\n}\n\n.list .channel .channel-data {\n align-items: flex-start;\n}\n\n.unread-count {\n display: flex;\n justify-content: center;\n height: var(--rtk-space-5, 20px);\n min-width: var(--rtk-space-3, 12px);\n border-radius: 9999px;\n padding-left: var(--rtk-space-1, 4px);\n padding-right: var(--rtk-space-1, 4px);\n font-size: 12px;\n line-height: 1.25rem;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\ninput {\n height: var(--rtk-space-9, 36px);\n width: 100%;\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n box-sizing: border-box;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n outline: 2px solid transparent;\n outline-offset: 2px;\n border-radius: var(--rtk-border-radius-sm, 4px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.search-container {\n display: flex;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n align-items: center;\n padding-top: var(--rtk-space-3, 12px);\n padding-bottom: var(--rtk-space-3, 12px);\n padding-left: var(--rtk-space-2, 8px);\n padding-right: var(--rtk-space-2, 8px);\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.search-container rtk-icon {\n margin-left: calc(var(--rtk-space-8, 32px) * -1);\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n color: rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76));\n}\n\n.channels-container {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n overflow-y: auto;\n}\n\nrtk-avatar {\n height: var(--rtk-space-4, 16px) !important;\n width: var(--rtk-space-4, 16px) !important;\n overflow: clip;\n border-radius: 9999px;\n padding: var(--rtk-space-2, 8px);\n font-size: 12px;\n}\n\n.channel {\n flex-shrink: 0;\n padding-top: var(--rtk-space-2, 8px);\n padding-bottom: var(--rtk-space-2, 8px);\n box-sizing: border-box;\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n background-color: transparent;\n outline: 2px solid transparent;\n outline-offset: 2px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\n width: 100%;\n padding-left: var(--rtk-space-2, 8px);\n padding-right: var(--rtk-space-3, 12px);\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.channel:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n}\n\n.channel .channel-data {\n flex: 1 1 0%;\n align-items: center;\n justify-content: space-between;\n display: flex;\n gap: var(--rtk-space-2, 8px);\n}\n\n.channel .name {\n font-size: 16px;\n}\n\n.channel .name, \n .channel .last-message {\n max-width: var(--rtk-space-40, 160px);\n text-align: left;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n}\n\n.channel .no-message {\n font-style: italic;\n}\n\n.channel .avatar-icon {\n height: var(--rtk-space-4, 16px);\n width: var(--rtk-space-4, 16px);\n padding: var(--rtk-space-2, 8px);\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n overflow: clip;\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n}\n\n.channel time, \n .channel .last-message {\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76));\n}\n\n.channel.active {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\n.channel.active .unread-count {\n background-color: rgb(var(--rtk-colors-text-on-brand-800, var(--rtk-colors-text-800, 255 255 255 / 0.76)));\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity));\n}\n\n.channel.active time {\n color: rgb(var(--rtk-colors-text-on-brand-800, var(--rtk-colors-text-800, 255 255 255 / 0.76)));\n}\n\n.channel.active .last-message {\n color: rgb(var(--rtk-colors-text-on-brand-700, var(--rtk-colors-text-700, 255 255 255 / 0.64)));\n}\n\n.channel.active rtk-avatar {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));\n}\n\n.col {\n gap: var(--rtk-space-1, 4px);\n display: flex;\n flex-direction: column;\n}\n\n.channel-meta {\n flex-shrink: 0;\n align-items: flex-end;\n}\n\n@keyframes slide-down {\n from {\n transform: translateY(-50px);\n }\n to {\n transform: translateY(0%);\n }\n}\n";
|
|
90
89
|
const RtkChannelSelectorViewStyle0 = rtkChannelSelectorViewCss;
|
|
91
90
|
|
|
92
91
|
var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -201,11 +200,11 @@ const RtkChannelSelectorView = class {
|
|
|
201
200
|
render() {
|
|
202
201
|
const filteredChannels = this.getFilteredChannels();
|
|
203
202
|
const shouldShowDropdown = this.viewAs === 'list' || (this.viewAs === 'dropdown' && this.showDropdown);
|
|
204
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(Host, { key: '2c491dbe0ac19cb386f0880fff81f4501648a6ae' }, this.viewAs === 'list' && h("slot", { key: '0e87d59c7522543b19711813474738f75a0e02fe', name: "header" }), shouldShowDropdown && (h("div", { key: 'c60692c7f75aa9febd73c134cd79aab020f7c2a5', class: {
|
|
205
204
|
dropdown: this.viewAs === 'dropdown',
|
|
206
205
|
scrollbar: this.viewAs === 'dropdown',
|
|
207
206
|
list: this.viewAs === 'list',
|
|
208
|
-
} }, !this.disableSearch && (h("div", { key: '
|
|
207
|
+
} }, !this.disableSearch && (h("div", { key: '74c50b2fad4cba26a20278f87c77a1672a1d748d', class: "search-container", ref: (el) => (this.$searchEl = el) }, h("input", { key: 'ff22698874ed7df9d91e72cb485ec2901ddf2b3b', type: "text", placeholder: this.t('chat.search_conversations'), value: this.searchQuery, onInput: (e) => (this.searchQuery = e.target.value) }), h("rtk-icon", { key: '9c8a9dffc0cea5e56aeb828ee198d0582024f1fa', icon: this.iconPack.search }))), h("div", { key: '04607e8d3cd62f4e6ca10c2748d6e100a4df4039', class: "channels-container scrollbar", ref: (el) => (this.$listEl = el) }, filteredChannels.map((channel) => {
|
|
209
208
|
return (h("button", { class: { channel: true, active: this.selectedChannelId === channel.id }, onClick: () => this.onChannelClickHandler(channel) }, !this.hideAvatar && (h("div", null, channel.icon ? (h("rtk-icon", { class: "avatar-icon", icon: this.iconPack[channel.icon] })) : (h("rtk-avatar", { participant: {
|
|
210
209
|
name: channel.name,
|
|
211
210
|
picture: channel.avatarUrl,
|
|
@@ -213,8 +212,8 @@ const RtkChannelSelectorView = class {
|
|
|
213
212
|
'last-message': true,
|
|
214
213
|
'no-message': !channel.latestMessage,
|
|
215
214
|
} }, h("rtk-text-message-view", { isMarkdown: true, text: channel.latestMessage })))), h("div", { class: "col channel-meta" }, channel.latestMessageTime && (h("time", { class: "time" }, this.getTimeLabel(channel.latestMessageTime))), channel.unreadCount > 0 && (h("div", { class: "unread-count" }, channel.unreadCount))))));
|
|
216
|
-
})))), this.viewAs === 'dropdown' && (h("button", { key: '
|
|
217
|
-
`${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (h("div", { key: '
|
|
215
|
+
})))), this.viewAs === 'dropdown' && (h("button", { key: 'f710577dda08fe51f169c85318b9c51b89e765bb', class: "dropdown-trigger", onClick: this.toggleDropdown }, h("span", { key: '9bebec13a0bacb5651ef598ff47b96a2903ccf0f' }, h("rtk-icon", { key: '0ec4a41bcb7fa3086cdeacc0d6671c23c43a857f', icon: this.iconPack.participants }), this.selectedChannelId &&
|
|
216
|
+
`${this.t('to')} ${this.getChannelById(this.selectedChannelId).name}`, this.getTotalUnreads() > 0 && (h("div", { key: '043033c796d39c07a290350c5b7f92eafe03bbd2', class: "unread-count" }, this.getTotalUnreads()))), h("rtk-icon", { key: '12a2a92172d5741ac6ee99a39ee83158b98a8745', icon: this.showDropdown ? this.iconPack.chevron_up : this.iconPack.chevron_down })))));
|
|
218
217
|
}
|
|
219
218
|
get $el() { return getElement(this); }
|
|
220
219
|
};
|
|
@@ -226,7 +225,7 @@ __decorate$g([
|
|
|
226
225
|
], RtkChannelSelectorView.prototype, "t", void 0);
|
|
227
226
|
RtkChannelSelectorView.style = RtkChannelSelectorViewStyle0;
|
|
228
227
|
|
|
229
|
-
const rtkChatCss = ":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n.scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: column;\n font-size: 14px;\n position: relative;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\nh3 {\n margin: var(--rtk-space-0, 0px);\n display: flex;\n height: var(--rtk-space-12, 48px);\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 400;\n color: rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));\n text-align: center;\n}\n\n#dropzone {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n z-index: 10;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n#dropzone.active {\n display: flex;\n animation: 0.2s slide-up ease-in;\n}\n\nrtk-chat-messages-ui,\nrtk-chat-messages-ui-paginated {\n flex: 1 0 0;\n}\n\nrtk-chat-composer-view {\n margin: var(--rtk-space-2, 8px);\n}\n\n.chat-container {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: row;\n container-type: size;\n container-name: chatcontainer;\n}\n\n@container chatcontainer (height < 360px) {\n rtk-channel-selector-view {\n height: var(--rtk-space-8, 32px);\n min-height: 24px;\n }\n}\n\n.chat {\n display: flex;\n flex: 1 1 0%;\n flex-direction: column;\n}\n\n.banner {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.banner .welcome-new-channel {\n width: var(--rtk-space-48, 192px);\n}\n\n.banner .create-channel-illustration {\n height: var(--rtk-space-40, 160px);\n width: var(--rtk-space-40, 160px);\n}\n\n.channel-selector-header {\n box-sizing: border-box;\n height: var(--rtk-space-16, 64px);\n padding: var(--rtk-space-4, 16px);\n display: flex;\n justify-content: space-between;\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.channel-selector-header .channel-create-btn {\n width: var(--rtk-space-8, 32px);\n justify-content: center;\n}\n\n.channel-selector-header .channel-create-btn:hover {\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\n.view-chats-btn {\n margin-top: var(--rtk-space-4, 16px);\n}\n\n.selector-container {\n z-index: 50;\n width: 100%;\n max-width: var(--rtk-space-80, 320px);\n border-right: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.selector-container.hide {\n display: none;\n}\n\n.mobile-close-btn {\n display: none;\n}\n\n.selector-container.mobile {\n height: 100%;\n width: 100%;\n max-width: 100%;\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / 0.6);\n display: flex;\n}\n\n.selector-container.mobile rtk-channel-selector-view {\n max-width: var(--rtk-space-96, 384px);\n animation: 0.3s swipe-in;\n}\n\n.selector-container.mobile .mobile-close-btn {\n margin-top: var(--rtk-space-4, 16px);\n margin-bottom: var(--rtk-space-4, 16px);\n margin-left: var(--rtk-space-6, 24px);\n margin-right: var(--rtk-space-6, 24px);\n display: block;\n}\n\n.pinned-messages-header {\n display: flex;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n padding: var(--rtk-space-
|
|
228
|
+
const rtkChatCss = ":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n.scrollbar {\n /* For Firefox */\n scrollbar-width: thin;\n scrollbar-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent);\n}\n\n/* For WebKit */\n.scrollbar::-webkit-scrollbar {\n height: var(--rtk-space-1\\.5, 6px);\n width: var(--rtk-space-1\\.5, 6px);\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-background, transparent);\n}\n\n.scrollbar::-webkit-scrollbar-thumb {\n border-radius: 9999px;\n background-color: var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)));\n}\n\n\n:host {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: column;\n font-size: 14px;\n position: relative;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\nh3 {\n margin: var(--rtk-space-0, 0px);\n display: flex;\n height: var(--rtk-space-12, 48px);\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 400;\n color: rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));\n text-align: center;\n}\n\n#dropzone {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n z-index: 10;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n#dropzone.active {\n display: flex;\n animation: 0.2s slide-up ease-in;\n}\n\nrtk-chat-messages-ui,\nrtk-chat-messages-ui-paginated {\n flex: 1 0 0;\n}\n\nrtk-chat-composer-view {\n margin: var(--rtk-space-2, 8px);\n}\n\n.chat-container {\n display: flex;\n height: 100%;\n width: 100%;\n flex-direction: row;\n container-type: size;\n container-name: chatcontainer;\n}\n\n@container chatcontainer (height < 360px) {\n rtk-channel-selector-view {\n height: var(--rtk-space-8, 32px);\n min-height: 24px;\n }\n}\n\n.chat {\n display: flex;\n flex: 1 1 0%;\n flex-direction: column;\n}\n\n.banner {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.banner .welcome-new-channel {\n width: var(--rtk-space-48, 192px);\n}\n\n.banner .create-channel-illustration {\n height: var(--rtk-space-40, 160px);\n width: var(--rtk-space-40, 160px);\n}\n\n.channel-selector-header {\n box-sizing: border-box;\n height: var(--rtk-space-16, 64px);\n padding: var(--rtk-space-4, 16px);\n display: flex;\n justify-content: space-between;\n border-bottom: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.channel-selector-header .channel-create-btn {\n width: var(--rtk-space-8, 32px);\n justify-content: center;\n}\n\n.channel-selector-header .channel-create-btn:hover {\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\n.view-chats-btn {\n margin-top: var(--rtk-space-4, 16px);\n}\n\n.selector-container {\n z-index: 50;\n width: 100%;\n max-width: var(--rtk-space-80, 320px);\n border-right: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.selector-container.hide {\n display: none;\n}\n\n.mobile-close-btn {\n display: none;\n}\n\n.selector-container.mobile {\n height: 100%;\n width: 100%;\n max-width: 100%;\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / 0.6);\n display: flex;\n}\n\n.selector-container.mobile rtk-channel-selector-view {\n max-width: var(--rtk-space-96, 384px);\n animation: 0.3s swipe-in;\n}\n\n.selector-container.mobile .mobile-close-btn {\n margin-top: var(--rtk-space-4, 16px);\n margin-bottom: var(--rtk-space-4, 16px);\n margin-left: var(--rtk-space-6, 24px);\n margin-right: var(--rtk-space-6, 24px);\n display: block;\n}\n\n.pinned-messages {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.pinned-messages-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--rtk-space-2, 8px);\n padding: var(--rtk-space-4, 16px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n font-size: 14px;\n cursor: pointer;\n}\n\n.pinned-messages-header div {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n}\n\n.pinned-messages-header rtk-icon {\n height: var(--rtk-space-3, 12px);\n width: var(--rtk-space-3, 12px);\n}\n\n.pinned-messages-content {\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));\n position: absolute;\n left: var(--rtk-space-0, 0px);\n top: 100%;\n z-index: 50;\n max-height: 30vh;\n width: 100%;\n overflow: auto;\n}\n\n.pinned-message {\n display: flex;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n gap: var(--rtk-space-2, 8px);\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));\n padding: var(--rtk-space-4, 16px);\n border-bottom-width: var(--rtk-border-width-sm, 1px);\n border-right-width: var(--rtk-border-width-none, 0);\n border-left-width: var(--rtk-border-width-none, 0);\n border-top-width: var(--rtk-border-width-none, 0);\n border-style: solid;\n}\n\n.pinned-message-avatar {\n height: var(--rtk-space-6, 24px) !important;\n width: var(--rtk-space-6, 24px) !important;\n}\n\n@keyframes swipe-in {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n";
|
|
230
229
|
const RtkChatStyle0 = rtkChatCss;
|
|
231
230
|
|
|
232
231
|
var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -263,6 +262,8 @@ const RtkChat = class {
|
|
|
263
262
|
this.iconPack = defaultIconPack;
|
|
264
263
|
/** Language */
|
|
265
264
|
this.t = useLanguage();
|
|
265
|
+
/** UI Overrides */
|
|
266
|
+
this.overrides = defaultOverrides;
|
|
266
267
|
/** disables private chat */
|
|
267
268
|
this.disablePrivateChat = false;
|
|
268
269
|
/** Can current user pin/unpin messages */
|
|
@@ -300,6 +301,7 @@ const RtkChat = class {
|
|
|
300
301
|
this.searchQuery = '';
|
|
301
302
|
this.selectorState = 'hide';
|
|
302
303
|
this.creatingChannel = false;
|
|
304
|
+
this.isSendingMessage = false;
|
|
303
305
|
this.showPinnedMessages = false;
|
|
304
306
|
this.channelMap = new Map();
|
|
305
307
|
this.onDragOver = (e) => {
|
|
@@ -479,12 +481,24 @@ const RtkChat = class {
|
|
|
479
481
|
};
|
|
480
482
|
this.onNewMessageHandler = async (e) => {
|
|
481
483
|
const message = e.detail;
|
|
482
|
-
this.
|
|
484
|
+
this.isSendingMessage = true;
|
|
485
|
+
try {
|
|
486
|
+
await this.meeting.chat.sendMessage(message, this.getRecipientPeerIds());
|
|
487
|
+
}
|
|
488
|
+
finally {
|
|
489
|
+
this.isSendingMessage = false;
|
|
490
|
+
}
|
|
483
491
|
};
|
|
484
492
|
this.onEditMessageHandler = async (e) => {
|
|
485
493
|
var _a, _b;
|
|
486
|
-
|
|
487
|
-
|
|
494
|
+
this.isSendingMessage = true;
|
|
495
|
+
try {
|
|
496
|
+
await ((_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.chat) === null || _b === void 0 ? void 0 : _b.editTextMessage(this.editingMessage.id, e.detail, this.editingMessage.channelId));
|
|
497
|
+
}
|
|
498
|
+
finally {
|
|
499
|
+
this.isSendingMessage = false;
|
|
500
|
+
this.editingMessage = null;
|
|
501
|
+
}
|
|
488
502
|
};
|
|
489
503
|
this.onEditCancel = () => {
|
|
490
504
|
this.editingMessage = null;
|
|
@@ -499,9 +513,35 @@ const RtkChat = class {
|
|
|
499
513
|
}
|
|
500
514
|
};
|
|
501
515
|
this.onDeleteMessage = (event) => {
|
|
516
|
+
var _a;
|
|
502
517
|
const message = event.detail;
|
|
518
|
+
if (((_a = this.editingMessage) === null || _a === void 0 ? void 0 : _a.id) === message.id) {
|
|
519
|
+
this.editingMessage = null;
|
|
520
|
+
}
|
|
521
|
+
try {
|
|
522
|
+
if (typeof localStorage !== 'undefined') {
|
|
523
|
+
const keysToRemove = [];
|
|
524
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
525
|
+
const key = localStorage.key(i);
|
|
526
|
+
if (key && key.startsWith('rtk-chat-edit-') && key.endsWith(`-${message.id}`)) {
|
|
527
|
+
keysToRemove.push(key);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
keysToRemove.forEach((key) => localStorage.removeItem(key));
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
catch (_b) {
|
|
534
|
+
// ignore storage access errors
|
|
535
|
+
}
|
|
503
536
|
this.meeting.chat.deleteMessage(message.id);
|
|
504
537
|
};
|
|
538
|
+
this.onMessageEdit = (event) => {
|
|
539
|
+
const message = event.detail;
|
|
540
|
+
if (message.type !== 'text')
|
|
541
|
+
return;
|
|
542
|
+
this.replyMessage = null;
|
|
543
|
+
this.editingMessage = message;
|
|
544
|
+
};
|
|
505
545
|
this.getPrivateChatRecipients = () => {
|
|
506
546
|
const participants = this.getFilteredParticipants().map((participant) => {
|
|
507
547
|
const key = generateChatGroupKey([participant.userId, this.meeting.self.userId]);
|
|
@@ -521,13 +561,25 @@ const RtkChat = class {
|
|
|
521
561
|
};
|
|
522
562
|
return [everyone, ...participants];
|
|
523
563
|
};
|
|
524
|
-
this.
|
|
525
|
-
|
|
564
|
+
this.getPinnedMessageLabel = (message) => {
|
|
565
|
+
if (message.type === 'text')
|
|
566
|
+
return message.message;
|
|
567
|
+
if (message.type === 'image')
|
|
568
|
+
return 'Image';
|
|
569
|
+
if (message.type === 'file')
|
|
570
|
+
return 'File';
|
|
571
|
+
return '';
|
|
526
572
|
};
|
|
527
573
|
this.renderPinnedMessagesHeader = () => {
|
|
528
574
|
if (this.meeting.chat.pinned.length === 0)
|
|
529
575
|
return null;
|
|
530
|
-
|
|
576
|
+
/**
|
|
577
|
+
* We do not display a picture against the avatar because the chatMessage API does not provide it.
|
|
578
|
+
*/
|
|
579
|
+
return (h("div", { class: "pinned-messages" }, h("div", { class: "pinned-messages-header", onClick: () => (this.showPinnedMessages = !this.showPinnedMessages) }, h("div", null, h("rtk-icon", { icon: this.iconPack.pin, size: "sm" }), this.t('chat.pinned_msgs'), ` (${this.meeting.chat.pinned.length})`), h("rtk-icon", { icon: this.showPinnedMessages ? this.iconPack.chevron_up : this.iconPack.chevron_down, size: "sm" })), this.showPinnedMessages && (h("div", { class: "pinned-messages-content scrollbar" }, this.meeting.chat.pinned.map((message) => {
|
|
580
|
+
const label = this.getPinnedMessageLabel(message);
|
|
581
|
+
return (h("div", { class: "pinned-message" }, h("rtk-avatar", { class: "pinned-message-avatar", participant: { name: message.displayName, picture: '' }, size: "sm" }), h("span", null, label.length > 20 ? `${label.substring(0, 20)}...` : label)));
|
|
582
|
+
})))));
|
|
531
583
|
};
|
|
532
584
|
}
|
|
533
585
|
connectedCallback() {
|
|
@@ -662,7 +714,7 @@ const RtkChat = class {
|
|
|
662
714
|
this.onChannelChanged(e);
|
|
663
715
|
}
|
|
664
716
|
renderComposerUI() {
|
|
665
|
-
var _a
|
|
717
|
+
var _a;
|
|
666
718
|
if (this.chatRecipientId === 'everyone') {
|
|
667
719
|
if (!this.canSendTextMessage && !this.canSendFiles)
|
|
668
720
|
return null;
|
|
@@ -674,18 +726,21 @@ const RtkChat = class {
|
|
|
674
726
|
const uiProps = { iconPack: this.iconPack, t: this.t, size: this.size };
|
|
675
727
|
const message = this.editingMessage ? this.editingMessage.message : '';
|
|
676
728
|
const quotedMessage = this.replyMessage ? this.replyMessage.message : '';
|
|
677
|
-
|
|
729
|
+
const draftStorageKey = this.selectedChannelId
|
|
730
|
+
? `rtk-chat-draft-${this.selectedChannelId}`
|
|
731
|
+
: 'rtk-chat-draft';
|
|
732
|
+
const editStorageKey = this.editingMessage
|
|
733
|
+
? `rtk-chat-edit-${(_a = this.selectedChannelId) !== null && _a !== void 0 ? _a : 'no-channel'}-${this.editingMessage.id}`
|
|
734
|
+
: 'rtk-chat-edit';
|
|
735
|
+
const storageKey = this.editingMessage ? editStorageKey : draftStorageKey;
|
|
736
|
+
return (h("rtk-chat-composer-view", Object.assign({ message: message, storageKey: storageKey, quotedMessage: quotedMessage, isEditing: !!this.editingMessage, isSending: this.isSendingMessage, canSendTextMessage: this.isTextMessagingAllowed(), canSendFiles: this.isFileMessagingAllowed(), disableEmojiPicker: this.overrides.disableEmojiPicker, maxLength: this.meeting.chat.maxTextLimit, rateLimits: this.meeting.chat.rateLimits, inputTextPlaceholder: this.t('chat.message_placeholder'), onNewMessage: this.onNewMessageHandler, onEditMessage: this.onEditMessageHandler, onEditCancel: this.onEditCancel, onQuotedMessageDismiss: this.onQuotedMessageDismiss }, uiProps), h("slot", { name: "chat-addon", slot: "chat-addon" })));
|
|
678
737
|
}
|
|
679
738
|
render() {
|
|
680
739
|
var _a;
|
|
681
740
|
if (!this.meeting) {
|
|
682
741
|
return null;
|
|
683
742
|
}
|
|
684
|
-
|
|
685
|
-
if (this.showPinnedMessages && this.meeting.chat.pinned.length !== 0) {
|
|
686
|
-
chatMessages = chatMessages.filter((chat) => chat.type === 'chat' && chat.message.pinned);
|
|
687
|
-
}
|
|
688
|
-
return (h(Host, null, h("div", { class: "chat-container" }, h("div", { class: "chat" }, this.isFileMessagingAllowed() && (h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, h("rtk-icon", { icon: this.iconPack.attach }), h("p", null, this.t('chat.send_attachment')))), this.renderPinnedMessagesHeader(), this.isPrivateChatSupported() && (h("rtk-channel-selector-view", { channels: this.getPrivateChatRecipients(), selectedChannelId: ((_a = this.selectedParticipant) === null || _a === void 0 ? void 0 : _a.userId) || 'everyone', onChannelChange: this.updateRecipients, t: this.t, viewAs: "dropdown" })), h("rtk-chat-messages-ui-paginated", { meeting: this.meeting, onPinMessage: this.onPinMessage, onDeleteMessage: this.onDeleteMessage, size: this.size, iconPack: this.iconPack, t: this.t }), this.renderComposerUI()))));
|
|
743
|
+
return (h(Host, null, h("div", { class: "chat-container" }, h("div", { class: "chat" }, this.isFileMessagingAllowed() && (h("div", { id: "dropzone", class: { active: this.dropzoneActivated }, part: "dropzone" }, h("rtk-icon", { icon: this.iconPack.attach }), h("p", null, this.t('chat.send_attachment')))), this.renderPinnedMessagesHeader(), this.isPrivateChatSupported() && (h("rtk-channel-selector-view", { channels: this.getPrivateChatRecipients(), selectedChannelId: ((_a = this.selectedParticipant) === null || _a === void 0 ? void 0 : _a.userId) || 'everyone', onChannelChange: this.updateRecipients, t: this.t, viewAs: "dropdown" })), h("rtk-chat-messages-ui-paginated", { meeting: this.meeting, onPinMessage: this.onPinMessage, onEditMessage: this.onMessageEdit, onDeleteMessage: this.onDeleteMessage, size: this.size, iconPack: this.iconPack, t: this.t }), this.renderComposerUI()))));
|
|
689
744
|
}
|
|
690
745
|
get host() { return getElement(this); }
|
|
691
746
|
static get watchers() { return {
|
|
@@ -706,6 +761,9 @@ __decorate$f([
|
|
|
706
761
|
__decorate$f([
|
|
707
762
|
SyncWithStore()
|
|
708
763
|
], RtkChat.prototype, "t", void 0);
|
|
764
|
+
__decorate$f([
|
|
765
|
+
SyncWithStore()
|
|
766
|
+
], RtkChat.prototype, "overrides", void 0);
|
|
709
767
|
RtkChat.style = RtkChatStyle0;
|
|
710
768
|
|
|
711
769
|
const rtkChatComposerViewCss = ":host {\n display: flex;\n flex-direction: column;\n font-family: var(--rtk-font-family, sans-serif);\n font-size: 14px;\n position: relative;\n}\n\n.quoted-message-container {\n margin-bottom: var(--rtk-space-2, 8px);\n display: flex;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n border-radius: var(--rtk-border-radius-md, 8px);\n border: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.quoted-message-container .quoted-message {\n flex: 1 1 0%;\n padding: var(--rtk-space-2, 8px);\n border-radius: var(--rtk-border-radius-md, 8px);\n max-height: var(--rtk-space-24, 96px);\n overflow-y: auto;\n word-break: break-all;\n}\n\n.quoted-message-container .quoted-message blockquote {\n display: none;\n}\n\n.quoted-message-container rtk-icon.dismiss {\n margin-left: auto;\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n padding: var(--rtk-space-2, 8px);\n border-radius: var(--rtk-border-radius-md, 8px);\n color: rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));\n}\n\n.quoted-message-container rtk-icon.dismiss:hover {\n cursor: pointer;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.quoted-message-container rtk-icon.dismiss {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.composer-container {\n position: relative;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n border-radius: var(--rtk-border-radius-md, 8px);\n overflow: hidden;\n border: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n}\n\n.composer-container > .composers {\n min-height: 60px;\n }\n\n@container chatcontainer (height < 360px) {\n .composer-container > .composers {\n min-height: 30px;\n }\n}\n\n.chat-buttons {\n padding: var(--rtk-space-3, 12px);\n display: flex;\n align-items: center;\n justify-content: space-between;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n}\n\n.chat-buttons .right {\n z-index: 10;\n}\n\n.chat-buttons .right .edit-buttons {\n display: flex;\n gap: var(--rtk-space-2, 8px);\n}\n\n.chat-buttons > div {\n display: flex;\n align-items: center;\n}\n\nrtk-emoji-picker {\n z-index: 20;\n position: absolute;\n top: calc(var(--rtk-space-72, 288px) * -1);\n border-top: var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));\n animation: 0.3s slide-up ease;\n}\n\n@keyframes slide-up {\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0%);\n }\n}\n";
|
|
@@ -734,6 +792,7 @@ const RtkChatComposerView = class {
|
|
|
734
792
|
this.onQuotedMessageDismiss = createEvent(this, "quotedMessageDismiss", 7);
|
|
735
793
|
/** Whether user can send text messages */
|
|
736
794
|
this.canSendTextMessage = true;
|
|
795
|
+
this.isSending = false;
|
|
737
796
|
/** Whether user can send file messages */
|
|
738
797
|
this.canSendFiles = true;
|
|
739
798
|
/** Message to be pre-populated */
|
|
@@ -794,15 +853,7 @@ const RtkChatComposerView = class {
|
|
|
794
853
|
messageLimits.messagesSent += 1;
|
|
795
854
|
this.checkRateLimitBreached(currentTime);
|
|
796
855
|
if (message.length > 0) {
|
|
797
|
-
|
|
798
|
-
this.onNewMessage.emit({
|
|
799
|
-
type: 'text',
|
|
800
|
-
message,
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
else {
|
|
804
|
-
this.onNewMessage.emit({ type: 'text', message });
|
|
805
|
-
}
|
|
856
|
+
this.onNewMessage.emit({ type: 'text', message });
|
|
806
857
|
this.cleanup();
|
|
807
858
|
}
|
|
808
859
|
};
|
|
@@ -886,17 +937,17 @@ const RtkChatComposerView = class {
|
|
|
886
937
|
render() {
|
|
887
938
|
var _a;
|
|
888
939
|
const uiProps = { iconPack: this.iconPack, t: this.t };
|
|
889
|
-
return (h(Host, { key: '
|
|
940
|
+
return (h(Host, { key: '2df23422579c855ced1cb6d24bb95786a1326baf' }, this.canSendTextMessage && this.isEmojiPickerOpen && (h("rtk-emoji-picker", Object.assign({ key: 'a7ed280a636d0207f58f0ad13f79c1eaed52ab9c', part: "emoji-picker", onPickerClose: () => {
|
|
890
941
|
this.isEmojiPickerOpen = false;
|
|
891
942
|
}, onRtkEmojiClicked: (e) => {
|
|
892
943
|
this.textMessage += e.detail;
|
|
893
944
|
this.$textComposer.setText(this.textMessage, true);
|
|
894
|
-
} }, uiProps))), h("slot", { key: '
|
|
895
|
-
h("rtk-file-picker-button", Object.assign({ key: '
|
|
896
|
-
h("rtk-file-picker-button", Object.assign({ key: '
|
|
897
|
-
], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: '
|
|
945
|
+
} }, 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 && [
|
|
946
|
+
h("rtk-file-picker-button", Object.assign({ key: 'cbb6f17b22f10b48ada27a4b4da3c1d5b2c7e320' }, uiProps, { onFileChange: (event) => this.onFileUploadHandler('file', event.detail) })),
|
|
947
|
+
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)),
|
|
948
|
+
], this.canSendTextMessage && !this.disableEmojiPicker && (h("rtk-emoji-picker-button", Object.assign({ key: 'a73378b5495dc3bfcde7dba335f674292ee6a96c', isActive: this.isEmojiPickerOpen, onClick: () => {
|
|
898
949
|
this.isEmojiPickerOpen = !this.isEmojiPickerOpen;
|
|
899
|
-
} }, uiProps))), h("slot", { key: '
|
|
950
|
+
} }, 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 })))))))))));
|
|
900
951
|
}
|
|
901
952
|
};
|
|
902
953
|
__decorate$e([
|
|
@@ -925,6 +976,7 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
925
976
|
registerInstance(this, hostRef);
|
|
926
977
|
this.editMessageInit = createEvent(this, "editMessageInit", 7);
|
|
927
978
|
this.onPinMessage = createEvent(this, "pinMessage", 7);
|
|
979
|
+
this.onEditMessage = createEvent(this, "editMessage", 7);
|
|
928
980
|
this.onDeleteMessage = createEvent(this, "deleteMessage", 7);
|
|
929
981
|
this.stateUpdate = createEvent(this, "rtkStateUpdate", 7);
|
|
930
982
|
/** Icon pack */
|
|
@@ -975,22 +1027,18 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
975
1027
|
};
|
|
976
1028
|
this.getMessageActions = (message) => {
|
|
977
1029
|
const actions = [];
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
const canDelete = message.userId === this.meeting.self.userId;
|
|
986
|
-
if (this.meeting.self.permissions.pinParticipant) {
|
|
1030
|
+
const messageBelongsToSelf = message.userId === this.meeting.self.userId;
|
|
1031
|
+
actions.push({
|
|
1032
|
+
id: 'pin_message',
|
|
1033
|
+
label: message.pinned ? this.t('unpin') : this.t('pin'),
|
|
1034
|
+
icon: this.iconPack.pin,
|
|
1035
|
+
});
|
|
1036
|
+
if (messageBelongsToSelf) {
|
|
987
1037
|
actions.push({
|
|
988
|
-
id: '
|
|
989
|
-
label:
|
|
990
|
-
icon: this.iconPack.
|
|
1038
|
+
id: 'edit_message',
|
|
1039
|
+
label: this.t('chat.edit_msg'),
|
|
1040
|
+
icon: this.iconPack.edit,
|
|
991
1041
|
});
|
|
992
|
-
}
|
|
993
|
-
if (canDelete) {
|
|
994
1042
|
actions.push({
|
|
995
1043
|
id: 'delete_message',
|
|
996
1044
|
label: this.t('chat.delete_msg'),
|
|
@@ -1004,6 +1052,9 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
1004
1052
|
case 'pin_message':
|
|
1005
1053
|
this.onPinMessage.emit(message);
|
|
1006
1054
|
break;
|
|
1055
|
+
case 'edit_message':
|
|
1056
|
+
this.onEditMessage.emit(message);
|
|
1057
|
+
break;
|
|
1007
1058
|
case 'delete_message':
|
|
1008
1059
|
this.onDeleteMessage.emit(message);
|
|
1009
1060
|
break;
|
|
@@ -1032,9 +1083,9 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
1032
1083
|
}
|
|
1033
1084
|
const isSelf = message.userId === this.meeting.self.userId;
|
|
1034
1085
|
const viewType = isSelf ? 'outgoing' : 'incoming';
|
|
1035
|
-
return (h("div",
|
|
1086
|
+
return (h("div", null, h("div", { class: "message-wrapper", id: message.id }, h("rtk-message-view", { messageType: message.type, pinned: message.pinned, isEdited: message.isEdited, time: message.time, actions: this.getMessageActions(message), authorName: message.displayName, isSelf: isSelf, avatarUrl: displayPicture, hideAuthorName: isContinued, viewType: viewType, variant: "bubble", onAction: (event) => this.onMessageActionHandler(event.detail, message) }, h("div", null, h("div", { class: "body" }, message.type === 'text' && (h("rtk-text-message-view", { text: message.message, isMarkdown: true })), message.type === 'file' && (h("rtk-file-message-view", { name: message.name, url: message.link, size: message.size })), message.type === 'image' && (h("rtk-image-message-view", { url: message.link, onPreview: () => {
|
|
1036
1087
|
this.stateUpdate.emit({ image: message });
|
|
1037
|
-
} })))
|
|
1088
|
+
} }))))))));
|
|
1038
1089
|
};
|
|
1039
1090
|
this.chatUpdateListener = (data) => {
|
|
1040
1091
|
if (this.selectedChannelId && data.message.channelId !== this.selectedChannelId)
|
|
@@ -1080,7 +1131,7 @@ const RtkChatMessagesUiPaginated = class {
|
|
|
1080
1131
|
this.lastReadMessageIndex = -1;
|
|
1081
1132
|
}
|
|
1082
1133
|
render() {
|
|
1083
|
-
return (h(Host, { key: '
|
|
1134
|
+
return (h(Host, { key: '1cbb364021b79bd756621987ac03c2e852acf3bd' }, h("rtk-paginated-list", { key: 'b7896890b5e3ea9a190bfa9c86c825233b635aa4', ref: (el) => (this.$paginatedListRef = el), pageSize: this.pageSize, pagesAllowed: 3, fetchData: this.getChatMessages, createNodes: this.createChatNodes, selectedItemId: this.selectedChannelId, emptyListLabel: this.t('chat.empty_channel') }, h("slot", { key: 'b1255713fc172c4e35385021809d391a5fdf9acc' }))));
|
|
1084
1135
|
}
|
|
1085
1136
|
get host() { return getElement(this); }
|
|
1086
1137
|
static get watchers() { return {
|
|
@@ -1153,7 +1204,7 @@ const RtkDraftAttachmentView = class {
|
|
|
1153
1204
|
this.onAttachmentChange();
|
|
1154
1205
|
}
|
|
1155
1206
|
render() {
|
|
1156
|
-
return (h(Host, { key: '
|
|
1207
|
+
return (h(Host, { key: 'f6ede093bcdf8100807baab4de2a296fc4960a07' }, h("div", { key: 'b19bbe9b2ea58ea4adccc2028a1b24ea6bc9f0a9', class: "preview-overlay" }, h("div", { key: 'cbb2bfcb3a50e6e7fbfd4109eb340ba51d6a162d', class: "preview" }, h("rtk-tooltip", { key: '15b50c547470b0fa22014e0992a1c7e26b234573', label: this.t('chat.cancel_upload') }, h("rtk-button", { key: '940332a51747af3368ffec497d5ef76fa64ecf75', variant: "secondary", kind: "icon", onClick: this.onDeleteClickHandler }, h("rtk-icon", { key: 'cc04b0ac70753e970ff638f187ad5f702dc3656b', icon: this.iconPack.dismiss }))), this.attachment.type === 'image' ? (h("img", { class: "preview-image", src: this.filePreview })) : (h("div", { class: "preview-file" }, h("span", null, this.filePreview)))))));
|
|
1157
1208
|
}
|
|
1158
1209
|
static get watchers() { return {
|
|
1159
1210
|
"attachment": ["onAttachmentChange"]
|
|
@@ -1238,7 +1289,7 @@ const RtkEmojiPicker = class {
|
|
|
1238
1289
|
return (h("div", { id: "emoji-grid", class: "scrollbar max-w-40" }, this.filteredEmojis.map((e) => (h("rtk-button", { key: `emoji-button-${e.name}`, class: "emoji", variant: "ghost", kind: "icon", title: e.name, onClick: () => this.handleEmojiClick(e.emoji) }, e.emoji)))));
|
|
1239
1290
|
}
|
|
1240
1291
|
render() {
|
|
1241
|
-
return (h(Host, { key: '
|
|
1292
|
+
return (h(Host, { key: '6581d26d75a7b869d0ba00243ec74ee06b927e7d' }, h("div", { key: '3705d8c557ac3e05769171998e9176e7e40a232c', class: 'close-parent' }, h("rtk-button", { key: 'b437e579cb828a709de255ddfa6b751e4bdfbe51', variant: "ghost", kind: "icon", class: "close", onClick: () => { var _a; return (_a = this.pickerClose) === null || _a === void 0 ? void 0 : _a.emit(); }, "aria-label": this.t('close') }, h("rtk-icon", { key: '7fac79a21c6be57156d17ceeff9ceb2834bbf709', icon: this.iconPack.dismiss }))), h("div", { key: '46cb2af6654ef36b7258baf47e3cd9e5bd60bf89', class: 'emoji-parent' }, h("input", { key: 'cfde33638d531f9bac1b1bf25d966a369f4dfb38', value: this.filterVal, onInput: (event) => this.handleInputChange(event.target), placeholder: this.t('search'), ref: (el) => (this.inputElement = el) }), this.mapEmojiList())));
|
|
1242
1293
|
}
|
|
1243
1294
|
};
|
|
1244
1295
|
__decorate$b([
|
|
@@ -1271,7 +1322,7 @@ const RtkEmojiPickerButton = class {
|
|
|
1271
1322
|
this.t = useLanguage();
|
|
1272
1323
|
}
|
|
1273
1324
|
render() {
|
|
1274
|
-
return (h("rtk-tooltip", { key: '
|
|
1325
|
+
return (h("rtk-tooltip", { key: '45ef1f18da6d1ecc3c02882590cd22e930461562', label: this.t('chat.send_emoji') }, h("rtk-button", { key: '6504abab2f1c6537443699c53a8cbdcf13530cba', variant: "ghost", kind: "icon", class: { active: this.isActive }, title: this.t('chat.send_emoji') }, h("rtk-icon", { key: 'd730c81abce72d9c3226f1f666941e1136bee77f', icon: this.iconPack.emoji_multiple }))));
|
|
1275
1326
|
}
|
|
1276
1327
|
};
|
|
1277
1328
|
__decorate$a([
|
|
@@ -1302,7 +1353,7 @@ const RtkFileMessageView = class {
|
|
|
1302
1353
|
this.iconPack = defaultIconPack;
|
|
1303
1354
|
}
|
|
1304
1355
|
render() {
|
|
1305
|
-
return (h("div", { key: '
|
|
1356
|
+
return (h("div", { key: '5cc29b4780f581a2f8b045e5051bcc66f3fdaf55', class: "file" }, h("rtk-button", { key: '4100b47bc1d72f08ec5fe645291bfbb58e3a6486', variant: "secondary", kind: "icon", onClick: () => downloadFile(sanitizeLink(this.url), { name: this.name, fallbackName: 'file' }), part: "button" }, h("rtk-icon", { key: '52ae14abb7c27b89861d5ba4c907d606257628c9', icon: this.iconPack.download })), h("div", { key: '02c9ad8d173172a85cc474273a966607d456360e', class: "file-data" }, h("div", { key: '6ceca21685d04f175006ba35a6de194cc98879ad', class: "name" }, this.name), h("div", { key: 'b07d07bcaedee3fd6fbcfe81ce2f6bf757655b5f', class: "file-data-split" }, h("div", { key: '280635ef486de02bc68ca3e774be14fa5a461d1c', class: "ext" }, getExtension(this.name)), h("span", { key: '84f72d8b37b7d15c257faed036b76c737eec780b', class: "divider" }), h("div", { key: '1b88f48f51afe3fceb57920c3d17f586e848a25f', class: "size" }, getFileSize(this.size))))));
|
|
1306
1357
|
}
|
|
1307
1358
|
};
|
|
1308
1359
|
__decorate$9([
|
|
@@ -1358,7 +1409,7 @@ const RtkFilePickerButton = class {
|
|
|
1358
1409
|
render() {
|
|
1359
1410
|
const label = this.label || this.t('chat.send_file');
|
|
1360
1411
|
const icon = this.iconPack[this.icon];
|
|
1361
|
-
return (h("rtk-tooltip", { key: '
|
|
1412
|
+
return (h("rtk-tooltip", { key: '057a0a5a714dbbde228e3481e53adea4f88fb3ad', label: label }, h("rtk-button", { key: '04193df1053b14687fb9464a122b9158707bdda1', variant: "ghost", kind: "icon", onClick: () => this.uploadFile(), title: label }, h("rtk-icon", { key: 'ed2fce30b93dfce9dd6b967d5993c93496cf3388', icon: icon }))));
|
|
1362
1413
|
}
|
|
1363
1414
|
};
|
|
1364
1415
|
__decorate$8([
|
|
@@ -1389,7 +1440,7 @@ const RtkIcon = class {
|
|
|
1389
1440
|
this.size = 'lg';
|
|
1390
1441
|
}
|
|
1391
1442
|
render() {
|
|
1392
|
-
return (h(Host, { key: '
|
|
1443
|
+
return (h(Host, { key: 'fdbe6fd9647bae7cfdf02ba6a250aa3c0c39ad85' }, h("div", { key: '114baca2f9ce9376e69073b40170473cc359915f', class: "icon-wrapper", innerHTML: parseIcon(this.icon), part: "wrapper" })));
|
|
1393
1444
|
}
|
|
1394
1445
|
};
|
|
1395
1446
|
RtkIcon.style = RtkIconStyle0;
|
|
@@ -1418,7 +1469,7 @@ const RtkImageMessageView = class {
|
|
|
1418
1469
|
this.status = 'loading';
|
|
1419
1470
|
}
|
|
1420
1471
|
render() {
|
|
1421
|
-
return (h("div", { key: '
|
|
1472
|
+
return (h("div", { key: '066606e6ae62634b2466bb46b453e0c2d91b17ea', class: { image: true, loaded: this.status === 'loaded' } }, h("img", { key: 'f042e5d3c1a6341e9fc0845e6643016f1be5b5f7', src: sanitizeLink(this.url), onLoad: () => {
|
|
1422
1473
|
this.status = 'loaded';
|
|
1423
1474
|
}, onError: () => {
|
|
1424
1475
|
this.status = 'errored';
|
|
@@ -1426,9 +1477,9 @@ const RtkImageMessageView = class {
|
|
|
1426
1477
|
if (this.status === 'loaded') {
|
|
1427
1478
|
this.onPreview.emit(this.url);
|
|
1428
1479
|
}
|
|
1429
|
-
} }), this.status === 'loading' && (h("div", { key: '
|
|
1480
|
+
} }), this.status === 'loading' && (h("div", { key: 'd4a5030468fbf70afae62bd55ae4d0fa989e15c2', class: "image-spinner", title: this.t('chat.img.loading'), "aria-label": this.t('chat.img.loading') }, h("rtk-spinner", { key: '216aba361a46cc100e7d26cc2daf1ffb0948d695', iconPack: this.iconPack }))), this.status === 'errored' && (h("div", { key: '01f5da8f70872c9fa22dc9a9b70b046b0001d05b', class: "image-errored", title: this.t('chat.error.img_not_found'), "aria-label": this.t('chat.error.img_not_found') }, h("rtk-icon", { key: '0f7e6fed2730f6366d07fc6afddb2b247e9b7d3a', icon: this.iconPack.image_off }))), this.status === 'loaded' && (h("div", { key: '5ac0e61c65a88a8d6b9ee54c900b856854d1b84b', class: "actions" }, h("rtk-button", { key: 'fd83dfecd7b5d9c3976374c3c55731b1f026fc0a', class: "action", variant: "secondary", kind: "icon", onClick: () => {
|
|
1430
1481
|
this.onPreview.emit(this.url);
|
|
1431
|
-
} }, h("rtk-icon", { key: '
|
|
1482
|
+
} }, h("rtk-icon", { key: '3ca7384fa28e6716345acacf9225ae9471ff8d63', icon: this.iconPack.full_screen_maximize })), h("rtk-button", { key: '198787808c389e4df48d3609a53c2d27cf2e7fb3', class: "action", variant: "secondary", kind: "icon", onClick: () => downloadFile(this.url, { fallbackName: 'image' }) }, h("rtk-icon", { key: 'f38fe3da48d1fc854001c719164c95f0673808c5', icon: this.iconPack.download }))))));
|
|
1432
1483
|
}
|
|
1433
1484
|
};
|
|
1434
1485
|
__decorate$7([
|
|
@@ -1519,7 +1570,7 @@ const RtkMarkdownView = class {
|
|
|
1519
1570
|
const slicedMessage = this.text.slice(0, this.maxLength);
|
|
1520
1571
|
const withReply = extractReplyBlock(slicedMessage, true);
|
|
1521
1572
|
const withoutReply = stripOutReplyBlock(slicedMessage);
|
|
1522
|
-
return (h("p", { key: '
|
|
1573
|
+
return (h("p", { key: '787e6d3177f4faf1c8dcd7c73d83a6de9c57b42b' }, withReply.length !== 0 && h("blockquote", { key: '1c4b82fb870994e6707d35adcd5e6f2f0e65dd26' }, this.renderMessage(withReply)), withoutReply.length !== 0 && this.renderMessage(withoutReply)));
|
|
1523
1574
|
}
|
|
1524
1575
|
};
|
|
1525
1576
|
RtkMarkdownView.style = RtkMarkdownViewStyle0;
|
|
@@ -1606,6 +1657,8 @@ const RtkMeeting = class {
|
|
|
1606
1657
|
this.gridLayout = 'row';
|
|
1607
1658
|
/** Icon pack */
|
|
1608
1659
|
this.iconPack = defaultIconPack;
|
|
1660
|
+
/** UI Kit Overrides */
|
|
1661
|
+
this.overrides = defaultOverrides;
|
|
1609
1662
|
this.handleChangingMeeting = (destinationMeetingId) => {
|
|
1610
1663
|
const currentStates = (this.peerStore || uiStore).state.states;
|
|
1611
1664
|
this.updateStates({
|
|
@@ -1634,6 +1687,7 @@ const RtkMeeting = class {
|
|
|
1634
1687
|
this.iconPackChanged(this.iconPack);
|
|
1635
1688
|
this.tChanged(this.t);
|
|
1636
1689
|
this.configChanged(this.config);
|
|
1690
|
+
this.overridesChanged(this.overrides);
|
|
1637
1691
|
this.resizeObserver = new index(() => this.handleResize());
|
|
1638
1692
|
this.resizeObserver.observe(this.host);
|
|
1639
1693
|
if (this.applyDesignSystem &&
|
|
@@ -1718,6 +1772,7 @@ const RtkMeeting = class {
|
|
|
1718
1772
|
iconPack: this.iconPack,
|
|
1719
1773
|
t: this.t,
|
|
1720
1774
|
providerId: this.providerId,
|
|
1775
|
+
overrides: deepMerge(Object.assign({}, defaultOverrides), this.overrides),
|
|
1721
1776
|
});
|
|
1722
1777
|
// Notify components that peer specific store is now available
|
|
1723
1778
|
document.dispatchEvent(new CustomEvent('rtkPeerStoreReady', {
|
|
@@ -1789,6 +1844,11 @@ const RtkMeeting = class {
|
|
|
1789
1844
|
provideRtkDesignSystem(document.documentElement, config.designTokens);
|
|
1790
1845
|
}
|
|
1791
1846
|
}
|
|
1847
|
+
overridesChanged(overrides) {
|
|
1848
|
+
if (this.peerStore) {
|
|
1849
|
+
this.peerStore.state.overrides = deepMerge(Object.assign({}, defaultOverrides), overrides);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1792
1852
|
handleResize() {
|
|
1793
1853
|
this.size = getSize(this.host.clientWidth);
|
|
1794
1854
|
}
|
|
@@ -1831,7 +1891,8 @@ const RtkMeeting = class {
|
|
|
1831
1891
|
"meeting": ["meetingChanged"],
|
|
1832
1892
|
"iconPack": ["iconPackChanged"],
|
|
1833
1893
|
"t": ["tChanged"],
|
|
1834
|
-
"config": ["configChanged"]
|
|
1894
|
+
"config": ["configChanged"],
|
|
1895
|
+
"overrides": ["overridesChanged"]
|
|
1835
1896
|
}; }
|
|
1836
1897
|
};
|
|
1837
1898
|
RtkMeeting.style = RtkMeetingStyle0;
|
|
@@ -1890,7 +1951,7 @@ const RtkMenu$1 = class {
|
|
|
1890
1951
|
});
|
|
1891
1952
|
}
|
|
1892
1953
|
render() {
|
|
1893
|
-
return (h(Host, { key: '
|
|
1954
|
+
return (h(Host, { key: '15461c803838be1651df6116a61598ce8ab988f9' }, h("span", { key: 'f36cdd2f1141f46a993daa880682382904a72509', id: "trigger", ref: (el) => (this.triggerEl = el), onClick: () => {
|
|
1894
1955
|
this.clickedThis = true;
|
|
1895
1956
|
if (this.menuListEl.style.display !== 'block') {
|
|
1896
1957
|
this.menuListEl.style.display = 'block';
|
|
@@ -1899,7 +1960,7 @@ const RtkMenu$1 = class {
|
|
|
1899
1960
|
else {
|
|
1900
1961
|
this.menuListEl.style.display = 'none';
|
|
1901
1962
|
}
|
|
1902
|
-
} }, h("slot", { key: '
|
|
1963
|
+
} }, h("slot", { key: 'af622c9dbb3394cb46a6bb909a45c5e3248b1a09', name: "trigger" })), h("span", { key: '445258e31b4b775fbc22b268234fe15a33f809c9', part: "menu-list", id: "menu-list", ref: (el) => (this.menuListEl = el) }, h("slot", { key: '87396622c6078253736cbe43a1cac55c6f90754f' }))));
|
|
1903
1964
|
}
|
|
1904
1965
|
};
|
|
1905
1966
|
__decorate$6([
|
|
@@ -1910,7 +1971,7 @@ __decorate$6([
|
|
|
1910
1971
|
], RtkMenu$1.prototype, "t", void 0);
|
|
1911
1972
|
RtkMenu$1.style = RtkMenuStyle0;
|
|
1912
1973
|
|
|
1913
|
-
const rtkMenuItemCss = ":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;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-size:14px}::slotted([slot='start']){margin-right:var(--rtk-space-2, 8px)}::slotted([slot='end']){margin-left:var(--rtk-space-2, 8px)}:host(:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-
|
|
1974
|
+
const rtkMenuItemCss = ":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;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);cursor:pointer;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));font-size:14px}::slotted([slot='start']){margin-right:var(--rtk-space-2, 8px)}::slotted([slot='end']){margin-left:var(--rtk-space-2, 8px)}:host(:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}:host(.primary:hover){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity))}:host(.red){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}";
|
|
1914
1975
|
const RtkMenuItemStyle0 = rtkMenuItemCss;
|
|
1915
1976
|
|
|
1916
1977
|
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -1926,13 +1987,15 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
1926
1987
|
const RtkMenuItem = class {
|
|
1927
1988
|
constructor(hostRef) {
|
|
1928
1989
|
registerInstance(this, hostRef);
|
|
1990
|
+
/** Variant */
|
|
1991
|
+
this.menuVariant = 'secondary';
|
|
1929
1992
|
/** Icon pack */
|
|
1930
1993
|
this.iconPack = defaultIconPack;
|
|
1931
1994
|
/** Language */
|
|
1932
1995
|
this.t = useLanguage();
|
|
1933
1996
|
}
|
|
1934
1997
|
render() {
|
|
1935
|
-
return (h(Host, { key: '
|
|
1998
|
+
return (h(Host, { key: '8679dae05e846bb8b83a1dbc9580aa2dcad18ccd', class: { [this.menuVariant]: true } }, h("slot", { key: 'da53376b8188bfc47f904d348212fedff932b03a', name: "start" }), h("slot", { key: '4394a3afa13bd298880c1be5255f5a004c5ed42e' }), h("slot", { key: '2be62c70172912e6516ce207b571ea4794aa4f6c', name: "end" })));
|
|
1936
1999
|
}
|
|
1937
2000
|
};
|
|
1938
2001
|
__decorate$5([
|
|
@@ -1943,7 +2006,7 @@ __decorate$5([
|
|
|
1943
2006
|
], RtkMenuItem.prototype, "t", void 0);
|
|
1944
2007
|
RtkMenuItem.style = RtkMenuItemStyle0;
|
|
1945
2008
|
|
|
1946
|
-
const rtkMenuListCss = ":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;width:-moz-max-content;width:max-content;flex-direction:column;padding
|
|
2009
|
+
const rtkMenuListCss = ":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;width:-moz-max-content;width:max-content;flex-direction:column;padding:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-1000, 255 255 255));border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));overflow:hidden;border-radius:var(--rtk-border-radius-sm, 4px);--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-backdrop-filter:blur(60px);backdrop-filter:blur(60px)}:host(.primary){--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.3)}";
|
|
1947
2010
|
const RtkMenuListStyle0 = rtkMenuListCss;
|
|
1948
2011
|
|
|
1949
2012
|
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -1961,11 +2024,13 @@ const RtkMenuList = class {
|
|
|
1961
2024
|
registerInstance(this, hostRef);
|
|
1962
2025
|
/** Icon pack */
|
|
1963
2026
|
this.iconPack = defaultIconPack;
|
|
2027
|
+
/** Variant */
|
|
2028
|
+
this.menuVariant = 'secondary';
|
|
1964
2029
|
/** Language */
|
|
1965
2030
|
this.t = useLanguage();
|
|
1966
2031
|
}
|
|
1967
2032
|
render() {
|
|
1968
|
-
return (h(Host, { key: '
|
|
2033
|
+
return (h(Host, { key: 'b743da0bae39c93cff7896968a64c84166b8a751', class: { [this.menuVariant]: true } }, h("slot", { key: '46ca973e68fccbf5c8c7544f61bb9745840d0054' })));
|
|
1969
2034
|
}
|
|
1970
2035
|
};
|
|
1971
2036
|
__decorate$4([
|
|
@@ -1976,7 +2041,7 @@ __decorate$4([
|
|
|
1976
2041
|
], RtkMenuList.prototype, "t", void 0);
|
|
1977
2042
|
RtkMenuList.style = RtkMenuListStyle0;
|
|
1978
2043
|
|
|
1979
|
-
const rtkMessageViewCss = ":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)))\n 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)))}:host{max-width:var(--rtk-space-96, 384px)}.message-wrapper{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:var(--rtk-space-2, 8px)}.message-wrapper.incoming{flex-direction:row}.message{display:flex;flex-direction:column;align-items:flex-end}.incoming .message{display:flex;flex-direction:column;align-items:flex-start}.header{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);align-self:flex-end;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:12px;font-weight:600}.incoming .header{align-self:flex-start}.body{display:flex;flex-direction:column;min-width:var(--rtk-space-24, 96px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:14px;line-height:1.375;position:relative}.bubble{max-width:90%;padding:var(--rtk-space-2, 8px);border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:var(--rtk-border-radius-md, 8px)}.incoming .bubble{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.metadata{margin-top:var(--rtk-space-2, 8px);align-self:flex-end;font-size:
|
|
2044
|
+
const rtkMessageViewCss = ":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)))\n 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)))}:host{max-width:var(--rtk-space-96, 384px)}.message-wrapper{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:var(--rtk-space-2, 8px)}.message-wrapper.incoming{flex-direction:row}.message{display:flex;flex-direction:column;align-items:flex-end}.incoming .message{display:flex;flex-direction:column;align-items:flex-start}.header{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);align-self:flex-end;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:12px;font-weight:600}.incoming .header{align-self:flex-start}.body{display:flex;flex-direction:column;min-width:var(--rtk-space-24, 96px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));font-size:14px;line-height:1.375;position:relative}.bubble{max-width:90%;padding:var(--rtk-space-2, 8px);border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:var(--rtk-border-radius-md, 8px)}.incoming .bubble{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.metadata{margin-top:var(--rtk-space-2, 8px);display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px);align-self:flex-end;font-size:11px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.metadata-content{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-1, 4px)}.avatar{display:none}rtk-menu{position:absolute;right:var(--rtk-space-1, 4px);top:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-lg, 12px)}rtk-menu rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);cursor:pointer}.actions{display:flex;align-items:center;justify-content:center;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-brand-600, 13 81 253) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity));padding:var(--rtk-space-1, 4px);border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none}.actions rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.incoming rtk-avatar{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.incoming .actions{--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}@media (min-width: 400px){.avatar{display:flex;width:var(--rtk-space-6, 24px)}.avatar rtk-avatar{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px);font-size:10px;overflow:clip;border-radius:9999px}}@media (hover: hover){rtk-menu{visibility:hidden}.body:hover rtk-menu{visibility:visible}}";
|
|
1980
2045
|
const RtkMessageViewStyle0 = rtkMessageViewCss;
|
|
1981
2046
|
|
|
1982
2047
|
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -1997,6 +2062,8 @@ const RtkMessageView = class {
|
|
|
1997
2062
|
this.actions = [];
|
|
1998
2063
|
/** Appearance */
|
|
1999
2064
|
this.variant = 'bubble';
|
|
2065
|
+
/** Is message pinned */
|
|
2066
|
+
this.pinned = false;
|
|
2000
2067
|
/** Render */
|
|
2001
2068
|
this.viewType = 'outgoing';
|
|
2002
2069
|
/** Hides avatar */
|
|
@@ -2011,10 +2078,14 @@ const RtkMessageView = class {
|
|
|
2011
2078
|
this.iconPack = defaultIconPack;
|
|
2012
2079
|
}
|
|
2013
2080
|
renderActions() {
|
|
2014
|
-
return (h("rtk-menu", { placement:
|
|
2081
|
+
return (h("rtk-menu", { placement: this.isSelf ? 'bottom-start' : 'bottom-end', offset: 1 }, h("button", { slot: "trigger", class: "actions" }, h("rtk-icon", { icon: this.iconPack.chevron_down })), h("rtk-menu-list", { menuVariant: this.isSelf ? 'primary' : 'secondary' }, this.actions.map((action) => {
|
|
2082
|
+
if (action.id === 'edit_message' && this.messageType !== 'text')
|
|
2083
|
+
return;
|
|
2084
|
+
return (h("rtk-menu-item", { menuVariant: this.isSelf ? 'primary' : 'secondary', onClick: () => this.onAction.emit(action.id) }, action.icon && h("rtk-icon", { icon: action.icon, slot: "start" }), action.label));
|
|
2085
|
+
}))));
|
|
2015
2086
|
}
|
|
2016
2087
|
render() {
|
|
2017
|
-
return (h(Host, { key: '
|
|
2088
|
+
return (h(Host, { key: '4ea54e7662406a5a3897295972506c043d54598c' }, h("div", { key: 'e8734f99436b9bd16b8c7a801dfb018eb5e07f20', class: { 'message-wrapper': true, [this.viewType]: true } }, !this.hideAvatar && (h("aside", { key: 'ad92c5ee28a635070e5fe2517dd2c01185082f88', class: "avatar", part: "avatar" }, h("rtk-avatar", { key: '7da7496c3613a2280dc5fb1ba383790eb7efacf5', participant: { name: this.authorName, picture: this.avatarUrl }, size: "sm" }))), h("div", { key: '969bc1103c403ea477147d34cd0992114a713d70', class: "message", part: "message" }, !this.hideAuthorName && (h("div", { key: 'b99ea9217f1b641e67e509bba4c56d936e2af7b0', class: "header" }, this.authorName, " ", this.isSelf ? ' (You)' : '')), h("div", { key: '2dad045ba207872c932a38ab4c52e3b0e25af024', class: { body: true, bubble: this.variant === 'bubble' } }, h("slot", { key: '64e80b06045b8e624df64090b5104e828ccc130e' }), !this.hideMetadata && !!this.time && (h("div", { key: 'b362dd31d38f3729da45be1150c34a1cea2cd394', class: "metadata", title: formatDateTime(this.time) }, this.pinned && (h("span", { key: '70940e475a08ba64a53300516c64f23549a0b856', class: "metadata-content" }, h("rtk-icon", { key: 'be9561043f9c0814ae38d9eeadf2ff1c5ccae52c', icon: this.iconPack.pin, size: "sm" }), " \u2022")), this.isEdited && (h("span", { key: '0abe565d472751a6a341ca6beaf9fc6d50f2f3e0', class: "metadata-content" }, h("span", { key: 'e89ebd6a787ad2c1d7961209f9052e31e374eec3' }, "Edited"), " \u2022")), elapsedDuration(this.time, new Date(Date.now())))), this.actions.length !== 0 && this.renderActions())))));
|
|
2018
2089
|
}
|
|
2019
2090
|
};
|
|
2020
2091
|
__decorate$3([
|
|
@@ -2022,9 +2093,35 @@ __decorate$3([
|
|
|
2022
2093
|
], RtkMessageView.prototype, "iconPack", void 0);
|
|
2023
2094
|
RtkMessageView.style = RtkMessageViewStyle0;
|
|
2024
2095
|
|
|
2025
|
-
const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n 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)))}:host{position:relative;display:flex;flex-direction:column;flex:1}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh)
|
|
2096
|
+
const rtkPaginatedListCss = ".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n 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)))}:host{position:relative;display:flex;flex-direction:column;flex:1}.container{box-sizing:border-box;display:flex;flex-direction:column-reverse;padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);flex:1 0 0px;overflow-y:scroll}.file-picker{display:none}.chat *:first-child{margin-top:var(--rtk-space-0, 0px)}.chat .head{display:flex;align-items:center}.chat .head .name{margin-right:var(--rtk-space-4, 16px);font-size:12px;font-weight:700}.chat .head .time{font-size:12px;color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.chat .body{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);overflow-wrap:break-word;font-size:14px;line-height:1.375}.chat .body .emoji{font-size:24px}p{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}rtk-text-message,rtk-image-message,rtk-file-message{margin-top:var(--rtk-space-4, 16px);display:block;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);font-family:var(--rtk-font-family, sans-serif);color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));box-sizing:border-box}*[is-continued]{margin-top:var(--rtk-space-3, 12px)}rtk-text-message[is-continued]{margin-top:var(--rtk-space-2, 8px)}.chat .image{position:relative;height:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);cursor:pointer}.chat .image img{display:none;height:100%;width:100%;border-radius:var(--rtk-border-radius-sm, 4px);-o-object-fit:cover;object-fit:cover}.chat .image .image-spinner{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.chat .image .image-spinner rtk-spinner{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}.chat .image .image-errored{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--rtk-border-radius-sm, 4px);background-color:rgba(var(--rtk-colors-danger, 255 45 45) / 0.1);--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}.chat .image .actions{display:none;height:var(--rtk-space-8, 32px);align-items:center;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-none, 0);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.chat .image .actions .action:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.image.loaded img{display:block}.image.loaded .image-spinner{display:none}.image:hover .actions,.image:focus .actions{display:flex}.chat .file{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px);padding-top:var(--rtk-space-1\\.5, 6px);padding-bottom:var(--rtk-space-1\\.5, 6px);border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.chat .file .file-data{flex:1 1 0%}.chat .file .file-data .name{word-break:break-all;color:rgb(var(--rtk-colors-text-1000, 255 255 255));overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split{margin-top:var(--rtk-space-0\\.5, 2px);display:flex;align-items:center;font-size:12px}.chat .file .file-data .file-data-split .ext{margin-right:var(--rtk-space-2, 8px);text-transform:uppercase;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat .file .file-data .file-data-split .divider{height:var(--rtk-space-4, 16px);width:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}.chat .file .file-data .file-data-split .size{margin-left:var(--rtk-space-2, 8px)}.smallest-dom-element{width:1px}#top-scroll{transform:translateY(20vh);transform:translateY(20px)}a{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));text-decoration-line:none}a:hover{text-decoration-line:underline}.show-new-messages-ctr{position:absolute;bottom:var(--rtk-space-4, 16px);right:var(--rtk-space-4, 16px);z-index:10;margin-top:calc(var(--rtk-space-14, 56px) * -1);--tw-translate-y:var(--rtk-space-28, 112px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.show-new-messages-ctr.active{--tw-translate-y:var(--rtk-space-0, 0px);transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;opacity:1}.show-new-messages{pointer-events:auto;border-radius:9999px}.show-new-messages:hover{border-radius:9999px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}rtk-spinner,.empty-list{margin:auto}.page-wrapper{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px);display:flex;flex-direction:column-reverse}.message-wrapper{margin-bottom:var(--rtk-space-2, 8px)}.pinned .message-wrapper{position:relative}.pinned .pin-icon{position:absolute;right:calc(var(--rtk-space-1, 4px) * -1);top:calc(var(--rtk-space-1, 4px) * -1);display:flex;border-radius:var(--rtk-border-radius-sm, 4px)}.pinned rtk-message-view{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px)}.load-more-on-top-container{pointer-events:none;position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-4, 16px);z-index:10}.load-more-icon{pointer-events:auto;border-radius:9999px}.load-more-icon:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-ring-opacity));--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity))}";
|
|
2026
2097
|
const RtkPaginatedListStyle0 = rtkPaginatedListCss;
|
|
2027
2098
|
|
|
2099
|
+
/**
|
|
2100
|
+
* NOTE(ikabra): INFINITE SCROLL IMPLEMENTATION:
|
|
2101
|
+
*
|
|
2102
|
+
* Uses scrollend listener for 2way scrolling.
|
|
2103
|
+
* Empty divs ($topRef, $bottomRef) act as scroll triggers to fetch new messages.
|
|
2104
|
+
*
|
|
2105
|
+
* UPWARD SCROLLING:
|
|
2106
|
+
* - Fetch top anchor (element currently visible to the user near top)
|
|
2107
|
+
* - Fetch older messages, push to end of 2D array
|
|
2108
|
+
* - When exceeding pagesAllowed, delete pages and scroll back to anchor
|
|
2109
|
+
*
|
|
2110
|
+
* DOWNWARD SCROLLING:
|
|
2111
|
+
* - Fetch bottom anchor (element currently visible to the user near bottom)
|
|
2112
|
+
* - Fetch new page, insert at the start
|
|
2113
|
+
* - Update timestamps & firstEmptyIndex, then rerender
|
|
2114
|
+
* - When exceeding pagesAllowed, delete pages and scroll back to anchor
|
|
2115
|
+
*
|
|
2116
|
+
* ADDING NEW NODES:
|
|
2117
|
+
* - If no pages exist, load old page
|
|
2118
|
+
* - If on 1st page, append messages till page size is full and then load new page
|
|
2119
|
+
*
|
|
2120
|
+
* DELETE NODE:
|
|
2121
|
+
* - If deleting the only available node, reset to initial state
|
|
2122
|
+
* - If page is empty, delete it
|
|
2123
|
+
* - Update timestamp curors
|
|
2124
|
+
*/
|
|
2028
2125
|
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2029
2126
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2030
2127
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -2038,274 +2135,306 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2038
2135
|
const RtkPaginatedList = class {
|
|
2039
2136
|
constructor(hostRef) {
|
|
2040
2137
|
registerInstance(this, hostRef);
|
|
2138
|
+
// Timestamp pertaining to the oldest stored message
|
|
2139
|
+
this.oldestPaginatedTimestamp = null;
|
|
2140
|
+
// Timestamp pertaining to the latest stored message
|
|
2141
|
+
this.latestPaginatedTimestamp = null;
|
|
2142
|
+
// Timestamp pertaining to the latest message stored in backend
|
|
2143
|
+
this.latestMessageTimestamp = null;
|
|
2144
|
+
// the length of pages will always be pageSize + 2
|
|
2145
|
+
this.pages = [];
|
|
2146
|
+
// Controls whether to keep auto-scrolling when a new page load.
|
|
2147
|
+
this.shouldScrollToBottom = false;
|
|
2148
|
+
// Shows "scroll to bottom" button when new nodes arrive and autoscroll is off.
|
|
2149
|
+
this.showNewMessagesCTR = false;
|
|
2150
|
+
/** label to show when empty */
|
|
2151
|
+
this.emptyListLabel = null;
|
|
2041
2152
|
/** Icon pack */
|
|
2042
2153
|
this.iconPack = defaultIconPack;
|
|
2043
2154
|
/** Language */
|
|
2044
2155
|
this.t = useLanguage();
|
|
2045
|
-
|
|
2046
|
-
this.
|
|
2156
|
+
this.rerenderBoolean = false;
|
|
2157
|
+
this.showEmptyListLabel = false;
|
|
2047
2158
|
this.isLoading = false;
|
|
2048
2159
|
this.isLoadingTop = false;
|
|
2049
2160
|
this.isLoadingBottom = false;
|
|
2050
|
-
|
|
2051
|
-
this.
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
*/
|
|
2056
|
-
this.shouldRenderNewNodes = true;
|
|
2057
|
-
/**
|
|
2058
|
-
* This gets disabled when the user scrolls up and the bottom node
|
|
2059
|
-
* is not visible anymore.
|
|
2060
|
-
*/
|
|
2061
|
-
this.hasNewNodesToRender = false;
|
|
2062
|
-
this.showEmptyListLabel = false;
|
|
2063
|
-
/**
|
|
2064
|
-
* This is a private variable not a state
|
|
2065
|
-
* since we want to debounce rerenders
|
|
2066
|
-
*
|
|
2067
|
-
* A list of pages where each page contains a number of Nodes
|
|
2068
|
-
* [
|
|
2069
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
2070
|
-
* [Node 1, Node 2, Node 3.... Node N],
|
|
2071
|
-
* ]
|
|
2072
|
-
*/
|
|
2073
|
-
this.pagesToRender = [[]];
|
|
2074
|
-
this.currentTime = () => {
|
|
2075
|
-
return new Date().getTime();
|
|
2076
|
-
};
|
|
2077
|
-
this.observe = (el) => {
|
|
2078
|
-
if (!el)
|
|
2079
|
-
return;
|
|
2080
|
-
this.intersectionObserver.observe(el);
|
|
2161
|
+
// Tells us if we need to scroll to a specific anchor after a rerender
|
|
2162
|
+
this.pendingScrollAnchor = null;
|
|
2163
|
+
this.isInView = (el) => {
|
|
2164
|
+
const rect = el.getBoundingClientRect();
|
|
2165
|
+
return rect.top >= 0 && rect.bottom <= window.innerHeight;
|
|
2081
2166
|
};
|
|
2082
2167
|
}
|
|
2083
2168
|
/**
|
|
2084
|
-
*
|
|
2169
|
+
* Adds a new node to the beginning of the paginated list
|
|
2170
|
+
* @param {DataNode} node - The data node to add to the beginning of the list
|
|
2085
2171
|
*/
|
|
2086
2172
|
async onNewNode(node) {
|
|
2087
|
-
if
|
|
2088
|
-
|
|
2089
|
-
|
|
2173
|
+
// if there are no pages, append to the first page
|
|
2174
|
+
if (this.pages.length < 1) {
|
|
2175
|
+
this.oldestPaginatedTimestamp = node.timeMs;
|
|
2176
|
+
this.pages.unshift([node]);
|
|
2177
|
+
this.latestPaginatedTimestamp = node.timeMs;
|
|
2178
|
+
this.latestMessageTimestamp = node.timeMs;
|
|
2179
|
+
this.rerender();
|
|
2180
|
+
if (this.autoScroll)
|
|
2181
|
+
this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
|
|
2090
2182
|
}
|
|
2091
|
-
this.
|
|
2092
|
-
|
|
2183
|
+
else if (this.latestMessageTimestamp === this.latestPaginatedTimestamp) {
|
|
2184
|
+
// append messages to the page if page has not reached full capacity
|
|
2185
|
+
if (this.pages[0].length < this.pageSize) {
|
|
2186
|
+
this.pages[0].unshift(node);
|
|
2187
|
+
this.latestPaginatedTimestamp = node.timeMs;
|
|
2188
|
+
this.latestMessageTimestamp = node.timeMs;
|
|
2189
|
+
this.rerender();
|
|
2190
|
+
}
|
|
2191
|
+
else {
|
|
2192
|
+
// if page is at full capacity, load next page
|
|
2193
|
+
this.pages.unshift([node]);
|
|
2194
|
+
this.latestPaginatedTimestamp = node.timeMs;
|
|
2195
|
+
this.latestMessageTimestamp = node.timeMs;
|
|
2196
|
+
// remove pages if out of bounds
|
|
2197
|
+
if (this.pages.length > this.pagesAllowed)
|
|
2198
|
+
this.pages.pop();
|
|
2199
|
+
// update timestamps
|
|
2200
|
+
const lastPage = this.pages[this.pages.length - 1];
|
|
2201
|
+
this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
|
|
2202
|
+
this.rerender();
|
|
2203
|
+
}
|
|
2204
|
+
if (this.autoScroll)
|
|
2205
|
+
this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
|
|
2206
|
+
}
|
|
2207
|
+
else {
|
|
2208
|
+
if (this.autoScroll)
|
|
2209
|
+
this.scrollToBottom();
|
|
2210
|
+
}
|
|
2211
|
+
this.pendingScrollAnchor = null;
|
|
2093
2212
|
}
|
|
2094
2213
|
/**
|
|
2095
|
-
*
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2214
|
+
* Deletes a node anywhere from the list
|
|
2215
|
+
* @param {string} id - The id of the node to delete
|
|
2216
|
+
* */
|
|
2217
|
+
async onNodeDelete(id) {
|
|
2218
|
+
var _a, _b;
|
|
2219
|
+
for (let i = this.pages.length - 1; i >= 0; i--) {
|
|
2220
|
+
const index = this.pages[i].findIndex((node) => node.id === id);
|
|
2221
|
+
// if message not found, move on
|
|
2222
|
+
if (index === -1)
|
|
2223
|
+
continue;
|
|
2224
|
+
// delete message
|
|
2225
|
+
this.pages[i].splice(index, 1);
|
|
2226
|
+
// if page is empty, delete it
|
|
2227
|
+
if (this.pages[i].length === 0)
|
|
2228
|
+
this.pages.splice(i, 1);
|
|
2229
|
+
// update timestamps
|
|
2230
|
+
const firstPage = this.pages[0];
|
|
2231
|
+
const lastPage = this.pages[this.pages.length - 1];
|
|
2232
|
+
this.latestPaginatedTimestamp = (_a = firstPage === null || firstPage === void 0 ? void 0 : firstPage[0]) === null || _a === void 0 ? void 0 : _a.timeMs;
|
|
2233
|
+
this.oldestPaginatedTimestamp = (_b = lastPage === null || lastPage === void 0 ? void 0 : lastPage[lastPage.length - 1]) === null || _b === void 0 ? void 0 : _b.timeMs;
|
|
2234
|
+
// if I have deleted the latest message, update latestMessageTimestamp
|
|
2235
|
+
if (index === 0 && i === 0)
|
|
2236
|
+
this.latestMessageTimestamp = this.latestPaginatedTimestamp;
|
|
2101
2237
|
this.rerender();
|
|
2238
|
+
break;
|
|
2102
2239
|
}
|
|
2103
2240
|
}
|
|
2104
2241
|
/**
|
|
2105
|
-
*
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2242
|
+
* Updates a new node anywhere in the list
|
|
2243
|
+
* @param {string} id - The id of the node to update
|
|
2244
|
+
* @param {DataNode} node - The updated data node
|
|
2245
|
+
* */
|
|
2246
|
+
async onNodeUpdate(id, node) {
|
|
2247
|
+
for (let i = this.pages.length - 1; i >= 0; i--) {
|
|
2248
|
+
const index = this.pages[i].findIndex((node) => node.id === id);
|
|
2249
|
+
// if message not found, move on
|
|
2250
|
+
if (index === -1)
|
|
2251
|
+
continue;
|
|
2252
|
+
// edit message
|
|
2253
|
+
this.pages[i][index] = node;
|
|
2117
2254
|
this.rerender();
|
|
2118
|
-
|
|
2119
|
-
onItemChanged(newItemId, oldItemId) {
|
|
2120
|
-
if (newItemId !== oldItemId) {
|
|
2121
|
-
this.pagesToRender = [[]];
|
|
2122
|
-
this.loadFirstPage().then(() => this.rerender());
|
|
2255
|
+
break;
|
|
2123
2256
|
}
|
|
2124
2257
|
}
|
|
2125
2258
|
connectedCallback() {
|
|
2126
2259
|
this.rerender = debounce(this.rerender.bind(this), 50, { maxWait: 200 });
|
|
2127
|
-
this.autoScroll = true;
|
|
2128
|
-
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
2129
|
-
writeTask(() => {
|
|
2130
|
-
for (const entry of entries) {
|
|
2131
|
-
if (entry.target.id === 'bottom-scroll') {
|
|
2132
|
-
if (entry.isIntersecting)
|
|
2133
|
-
this.loadBottom();
|
|
2134
|
-
else
|
|
2135
|
-
this.shouldRenderNewNodes = false;
|
|
2136
|
-
}
|
|
2137
|
-
if (entry.target.id === 'top-scroll' && entry.isIntersecting) {
|
|
2138
|
-
this.loadTop();
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
});
|
|
2142
|
-
});
|
|
2143
|
-
}
|
|
2144
|
-
disconnectedCallback() {
|
|
2145
|
-
this.intersectionObserver.disconnect();
|
|
2146
2260
|
}
|
|
2147
2261
|
componentDidLoad() {
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2262
|
+
// initial load
|
|
2263
|
+
this.loadPrevPage();
|
|
2264
|
+
if (this.$containerRef) {
|
|
2265
|
+
this.$containerRef.onscrollend = async () => {
|
|
2266
|
+
// do not do anything if we are scrolling to bottom
|
|
2267
|
+
if (this.shouldScrollToBottom)
|
|
2268
|
+
return;
|
|
2269
|
+
// handle top and bottom scroll
|
|
2270
|
+
if (this.isInView(this.$bottomRef) &&
|
|
2271
|
+
this.latestMessageTimestamp > this.latestPaginatedTimestamp) {
|
|
2272
|
+
await this.loadNextPage();
|
|
2273
|
+
}
|
|
2274
|
+
else if (this.isInView(this.$topRef)) {
|
|
2275
|
+
this.showNewMessagesCTR = true;
|
|
2276
|
+
await this.loadPrevPage();
|
|
2277
|
+
}
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2155
2280
|
}
|
|
2156
2281
|
componentDidRender() {
|
|
2157
|
-
if (this.
|
|
2158
|
-
smoothScrollToBottom(this.$paginatedList);
|
|
2159
|
-
}
|
|
2160
|
-
loadFirstPage() {
|
|
2161
|
-
return this.loadPage(this.currentTime(), this.pageSize, true, (data) => {
|
|
2162
|
-
if (data.length === 0) {
|
|
2163
|
-
this.showEmptyListLabel = true;
|
|
2164
|
-
}
|
|
2165
|
-
});
|
|
2166
|
-
}
|
|
2167
|
-
loadTop() {
|
|
2168
|
-
/**
|
|
2169
|
-
* If there is only one unfilled page or no page, no need to check
|
|
2170
|
-
* for top since it will be empty
|
|
2171
|
-
*/
|
|
2172
|
-
if (this.pagesToRender.length === 0)
|
|
2282
|
+
if (!this.pendingScrollAnchor)
|
|
2173
2283
|
return;
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
* TODO: Make this more flexible currently this only works with chat
|
|
2178
|
-
*/
|
|
2179
|
-
const oldestVNode = this.pagesToRender[0][0];
|
|
2180
|
-
const oldestTimestamp = oldestVNode.timeMs;
|
|
2181
|
-
// TODO: scrollIntoView
|
|
2182
|
-
const onPageRendered = () => { }; // oldestVNode.$elm$?.scrollIntoView();
|
|
2183
|
-
this.isLoadingTop = true;
|
|
2184
|
-
this.loadPage(oldestTimestamp - 1, this.pageSize, true, onPageRendered, 'top');
|
|
2284
|
+
const anchor = this.pendingScrollAnchor;
|
|
2285
|
+
this.pendingScrollAnchor = null;
|
|
2286
|
+
this.restoreScrollToAnchor(anchor);
|
|
2185
2287
|
}
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
* If there is only one unfilled page or no page, no need to check
|
|
2189
|
-
* for top since it will be empty
|
|
2190
|
-
*/
|
|
2191
|
-
if (this.pagesToRender.length === 0) {
|
|
2192
|
-
this.shouldRenderNewNodes = true;
|
|
2288
|
+
async loadPrevPage() {
|
|
2289
|
+
if (this.isLoading)
|
|
2193
2290
|
return;
|
|
2194
|
-
|
|
2195
|
-
if
|
|
2196
|
-
|
|
2291
|
+
const scrollAnchor = this.getScrollAnchor('top');
|
|
2292
|
+
// if no old timestamp, it means we are at initial state
|
|
2293
|
+
if (!this.oldestPaginatedTimestamp)
|
|
2294
|
+
this.oldestPaginatedTimestamp = new Date().getTime();
|
|
2295
|
+
// load data
|
|
2296
|
+
this.isLoading = true;
|
|
2297
|
+
this.isLoadingTop = true;
|
|
2298
|
+
const data = await this.fetchData(this.oldestPaginatedTimestamp - 1, this.pageSize, true);
|
|
2299
|
+
this.isLoading = false;
|
|
2300
|
+
this.isLoadingTop = false;
|
|
2301
|
+
// no more old messages to show, we are at the top of the page
|
|
2302
|
+
if (!data.length)
|
|
2197
2303
|
return;
|
|
2304
|
+
// add old data to the end of the array
|
|
2305
|
+
this.pages.push(data);
|
|
2306
|
+
// clear old pages when we reach the limit
|
|
2307
|
+
if (this.pages.length > this.pagesAllowed)
|
|
2308
|
+
this.pages.shift();
|
|
2309
|
+
// update timestamps
|
|
2310
|
+
const lastPage = this.pages[this.pages.length - 1];
|
|
2311
|
+
this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
|
|
2312
|
+
this.latestPaginatedTimestamp = this.pages[0][0].timeMs;
|
|
2313
|
+
if (!this.latestMessageTimestamp)
|
|
2314
|
+
this.latestMessageTimestamp = this.latestPaginatedTimestamp;
|
|
2315
|
+
this.rerender();
|
|
2316
|
+
// fix scroll position
|
|
2317
|
+
if (scrollAnchor)
|
|
2318
|
+
this.pendingScrollAnchor = scrollAnchor;
|
|
2319
|
+
}
|
|
2320
|
+
async loadNextPage() {
|
|
2321
|
+
if (this.isLoading)
|
|
2322
|
+
return [];
|
|
2323
|
+
// Do nothing. New timestamp needs to be assigned by loadPrevPage method
|
|
2324
|
+
if (!this.latestPaginatedTimestamp) {
|
|
2325
|
+
this.showNewMessagesCTR = false;
|
|
2326
|
+
return [];
|
|
2198
2327
|
}
|
|
2199
|
-
|
|
2200
|
-
const newestTimestamp = newestVNode.timeMs;
|
|
2201
|
-
// TODO: scrollIntoView
|
|
2202
|
-
const onPageRendered = () => smoothScrollToBottom(this.$paginatedList);
|
|
2328
|
+
this.isLoading = true;
|
|
2203
2329
|
this.isLoadingBottom = true;
|
|
2204
|
-
|
|
2330
|
+
const scrollAnchor = this.getScrollAnchor('bottom');
|
|
2331
|
+
const data = await this.fetchData(this.latestPaginatedTimestamp + 1, this.pageSize, false);
|
|
2332
|
+
this.isLoading = false;
|
|
2333
|
+
this.isLoadingBottom = false;
|
|
2334
|
+
// no more new messages to load
|
|
2335
|
+
if (!data.length) {
|
|
2336
|
+
this.latestMessageTimestamp = this.latestPaginatedTimestamp;
|
|
2337
|
+
this.showNewMessagesCTR = false;
|
|
2338
|
+
return [];
|
|
2339
|
+
}
|
|
2340
|
+
// load new messages and append to the start
|
|
2341
|
+
const incoming = [...data].reverse();
|
|
2342
|
+
if (this.pages.length === 0)
|
|
2343
|
+
this.pages.unshift([]);
|
|
2344
|
+
const firstPage = this.pages[0];
|
|
2345
|
+
const spaceInFirstPage = this.pageSize - firstPage.length;
|
|
2346
|
+
if (spaceInFirstPage > 0) {
|
|
2347
|
+
const toFill = incoming.splice(0, spaceInFirstPage);
|
|
2348
|
+
firstPage.unshift(...toFill);
|
|
2349
|
+
}
|
|
2350
|
+
while (incoming.length > 0) {
|
|
2351
|
+
this.pages.unshift(incoming.splice(0, this.pageSize));
|
|
2352
|
+
}
|
|
2353
|
+
// remove pages if out of bounds
|
|
2354
|
+
if (this.pages.length > this.pagesAllowed)
|
|
2355
|
+
this.pages.pop();
|
|
2356
|
+
// update timestamps
|
|
2357
|
+
const lastPage = this.pages[this.pages.length - 1];
|
|
2358
|
+
this.oldestPaginatedTimestamp = lastPage[lastPage.length - 1].timeMs;
|
|
2359
|
+
this.latestPaginatedTimestamp = this.pages[0][0].timeMs;
|
|
2360
|
+
this.rerender();
|
|
2361
|
+
this.pendingScrollAnchor = scrollAnchor;
|
|
2362
|
+
return data;
|
|
2205
2363
|
}
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
}
|
|
2224
|
-
else {
|
|
2225
|
-
const [lastPage] = this.pagesToRender.slice(-1);
|
|
2226
|
-
if (lastPage && (lastPage === null || lastPage === void 0 ? void 0 : lastPage.length) < this.pageSize) {
|
|
2227
|
-
/**
|
|
2228
|
-
* If last page is not full then just add it
|
|
2229
|
-
*/
|
|
2230
|
-
lastPage.push(node);
|
|
2364
|
+
// Find the element that is closest to the top/bottom of the container
|
|
2365
|
+
getScrollAnchor(edge = 'top') {
|
|
2366
|
+
if (!this.$containerRef)
|
|
2367
|
+
return null;
|
|
2368
|
+
const containerRect = this.$containerRef.getBoundingClientRect();
|
|
2369
|
+
const candidates = Array.from(this.$containerRef.querySelectorAll('[id]')).filter((el) => el.id !== 'top-scroll' && el.id !== 'bottom-scroll');
|
|
2370
|
+
let best = null;
|
|
2371
|
+
for (const el of candidates) {
|
|
2372
|
+
const rect = el.getBoundingClientRect();
|
|
2373
|
+
const isVisibleInContainer = rect.bottom > containerRect.top && rect.top < containerRect.bottom;
|
|
2374
|
+
if (!isVisibleInContainer)
|
|
2375
|
+
continue;
|
|
2376
|
+
if (edge === 'top') {
|
|
2377
|
+
const offsetTop = rect.top - containerRect.top;
|
|
2378
|
+
if (best == null || (best.edge === 'top' && offsetTop < best.offsetTop)) {
|
|
2379
|
+
best = { id: el.id, edge: 'top', offsetTop };
|
|
2380
|
+
}
|
|
2231
2381
|
}
|
|
2232
2382
|
else {
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
const newPage = [node];
|
|
2238
|
-
this.pagesToRender.push(newPage);
|
|
2239
|
-
this.removeLastPageIfNeeded(true);
|
|
2383
|
+
const offsetBottom = containerRect.bottom - rect.bottom;
|
|
2384
|
+
if (best == null || (best.edge === 'bottom' && offsetBottom < best.offsetBottom)) {
|
|
2385
|
+
best = { id: el.id, edge: 'bottom', offsetBottom };
|
|
2386
|
+
}
|
|
2240
2387
|
}
|
|
2241
2388
|
}
|
|
2389
|
+
return best;
|
|
2242
2390
|
}
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2391
|
+
//instant scroll to anchor to make sure we are at the same position after a rerender
|
|
2392
|
+
restoreScrollToAnchor(anchor) {
|
|
2393
|
+
if (!this.$containerRef)
|
|
2394
|
+
return;
|
|
2395
|
+
// make element id safe to use inside a CSS selector
|
|
2396
|
+
const escapeId = (id) => {
|
|
2397
|
+
var _a;
|
|
2398
|
+
const cssEscape = (_a = globalThis.CSS) === null || _a === void 0 ? void 0 : _a.escape;
|
|
2399
|
+
return typeof cssEscape === 'function'
|
|
2400
|
+
? cssEscape(id)
|
|
2401
|
+
: id.replace(/[^a-zA-Z0-9_-]/g, '\\$&');
|
|
2402
|
+
};
|
|
2403
|
+
const el = this.$containerRef.querySelector(`#${escapeId(anchor.id)}`);
|
|
2404
|
+
if (!el)
|
|
2405
|
+
return;
|
|
2406
|
+
const containerRect = this.$containerRef.getBoundingClientRect();
|
|
2407
|
+
const rect = el.getBoundingClientRect();
|
|
2408
|
+
if (anchor.edge === 'top') {
|
|
2409
|
+
const newOffsetTop = rect.top - containerRect.top;
|
|
2410
|
+
this.$containerRef.scrollTop += newOffsetTop - anchor.offsetTop;
|
|
2257
2411
|
}
|
|
2258
|
-
|
|
2259
|
-
|
|
2412
|
+
else {
|
|
2413
|
+
const newOffsetBottom = containerRect.bottom - rect.bottom;
|
|
2414
|
+
this.$containerRef.scrollTop += anchor.offsetBottom - newOffsetBottom;
|
|
2260
2415
|
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
onPageRendered([]);
|
|
2271
|
-
return;
|
|
2416
|
+
}
|
|
2417
|
+
// this method is called recursively based on shouldScrollToBottom (see loadNextPage)
|
|
2418
|
+
async scrollToBottom() {
|
|
2419
|
+
this.shouldScrollToBottom = true;
|
|
2420
|
+
while (this.shouldScrollToBottom) {
|
|
2421
|
+
const response = await this.loadNextPage();
|
|
2422
|
+
this.$bottomRef.scrollIntoView({ behavior: 'smooth' });
|
|
2423
|
+
if (response.length === 0)
|
|
2424
|
+
this.shouldScrollToBottom = false;
|
|
2272
2425
|
}
|
|
2273
|
-
data.forEach((node) => this.addNodeToRender(node, reversed));
|
|
2274
|
-
this.rerender();
|
|
2275
|
-
onPageRendered(data);
|
|
2276
2426
|
}
|
|
2277
2427
|
rerender() {
|
|
2278
2428
|
this.rerenderBoolean = !this.rerenderBoolean;
|
|
2279
2429
|
}
|
|
2280
|
-
removeLastPageIfNeeded(removeFromStart) {
|
|
2281
|
-
if (this.pagesToRender.length > this.pagesAllowed) {
|
|
2282
|
-
if (removeFromStart)
|
|
2283
|
-
this.pagesToRender.shift();
|
|
2284
|
-
else
|
|
2285
|
-
this.pagesToRender.pop();
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
onDownArrowClicked() {
|
|
2289
|
-
/**
|
|
2290
|
-
* Load the freshest pages
|
|
2291
|
-
*/
|
|
2292
|
-
this.loadBottom();
|
|
2293
|
-
}
|
|
2294
|
-
onLoadMoreOnTopClicked() {
|
|
2295
|
-
this.loadTop();
|
|
2296
|
-
}
|
|
2297
2430
|
render() {
|
|
2298
|
-
var _a;
|
|
2299
2431
|
/**
|
|
2300
|
-
* div.container is flex=column-
|
|
2301
|
-
* which is why div#bottom-scroll comes before div#top-scroll
|
|
2302
|
-
* div.page-wrapper prevents reversal of messages
|
|
2432
|
+
* div.container is flex=column-reversewhich is why div#bottom-scroll comes before div#top-scroll
|
|
2303
2433
|
*/
|
|
2304
|
-
return (h(Host, { key: '
|
|
2434
|
+
return (h(Host, { key: 'd3a69c210794a552e1a45d0d184b16657cbfde79' }, h("div", { key: 'c9cdb45d5cea872660bc8e2170c3d94c9331a861', class: "scrollbar container", part: "container", ref: (el) => (this.$containerRef = el) }, h("div", { key: '1bacf2a627e8a7f11f75e0ecbda873609cd347b9', class: { 'show-new-messages-ctr': true, active: this.showNewMessagesCTR } }, h("rtk-button", { key: '0c4e3f79e2a7447f1195e03aa026d0f228d09f90', class: "show-new-messages", kind: "icon", variant: "secondary", part: "show-new-messages", onClick: () => {
|
|
2435
|
+
this.scrollToBottom();
|
|
2436
|
+
} }, this.shouldScrollToBottom ? (h("rtk-spinner", { size: "sm" })) : (h("rtk-icon", { icon: this.iconPack.chevron_down })))), h("div", { key: '439f9e943266f60c933812771682bc414b86d418', class: "smallest-dom-element", id: "bottom-scroll", ref: (el) => (this.$bottomRef = el) }), this.isLoadingBottom && this.pages.length > 0 && h("rtk-spinner", { key: 'd79aa2e74a62b14a456c8437362bb01a9df933e1', size: "sm" }), this.isLoading && this.pages.length < 1 && h("rtk-spinner", { key: '7ccfd41966d0337a8abe9a3086ca3f07fe051dc0', size: "lg" }), !this.isLoading && this.pages.flat().length === 0 ? (h("div", { class: "empty-list" }, 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: '1c6c11863adba0205d0dd2ce649f3bdf51c9df60', size: "sm" }), h("div", { key: '413506236882f6d516967db0f642f5db63c7971f', class: "smallest-dom-element", id: "top-scroll", ref: (el) => (this.$topRef = el) }))));
|
|
2305
2437
|
}
|
|
2306
|
-
static get watchers() { return {
|
|
2307
|
-
"selectedItemId": ["onItemChanged"]
|
|
2308
|
-
}; }
|
|
2309
2438
|
};
|
|
2310
2439
|
__decorate$2([
|
|
2311
2440
|
SyncWithStore()
|
|
@@ -2337,7 +2466,7 @@ const RtkSpinner = class {
|
|
|
2337
2466
|
this.size = 'md';
|
|
2338
2467
|
}
|
|
2339
2468
|
render() {
|
|
2340
|
-
return (h(Host, { key: '
|
|
2469
|
+
return (h(Host, { key: 'c042cbd31d8fa9e58c0cbbc5646575a3172fc824' }, h("rtk-icon", { key: '0171ba3d5f7506e2c67eb813c5ad5b263352088d', class: "spinner", icon: this.iconPack.spinner })));
|
|
2341
2470
|
}
|
|
2342
2471
|
};
|
|
2343
2472
|
__decorate$1([
|
|
@@ -2415,7 +2544,7 @@ const RtkTextComposerView = class {
|
|
|
2415
2544
|
}
|
|
2416
2545
|
}
|
|
2417
2546
|
render() {
|
|
2418
|
-
return (h("div", { key: '
|
|
2547
|
+
return (h("div", { key: 'e5f7fa2bd4a2386ff5185001981477ccacf24556', class: "chat-input", part: "chat-input-container" }, this.maxLengthBreached > 0 && (h("div", { key: '4c06c853ddc7bebafe45fdb2e2c5c9e1c20021fe', class: 'text-error ' + (this.maxLengthBreached === this.maxLength ? 'breached' : '') }, h("rtk-icon", { key: '524037dc257f0aea206fbc3503d1fe1cb03449be', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.maxLengthBreached, " / ", this.maxLength, " ", this.t('chat.max_limit_warning'))), this.rateLimitBreached && (h("div", { key: 'cf975664f367f2621593239ab1cf2e73f5acdb45', class: 'text-error breached' }, h("rtk-icon", { key: '70a6555f1fa9752f91951181b46e0ed0e7eb8679', id: "warning-indicator", icon: this.iconPack.warning, part: "warning-indicator" }), ' ', this.t('chat.rate_limit_error'))), h("textarea", { key: '7fc7280dd143cd701d5037e04c2b36c3ea8ec023', ref: (el) => (this.$textArea = el), placeholder: this.placeholder, disabled: this.disabled, onInput: this.onInputHandler, onKeyDown: this.keyDownHandler, part: "chat-input", value: this.value })));
|
|
2419
2548
|
}
|
|
2420
2549
|
};
|
|
2421
2550
|
__decorate([
|
|
@@ -2436,7 +2565,7 @@ const RtkTextMessageView = class {
|
|
|
2436
2565
|
this.isMarkdown = false;
|
|
2437
2566
|
}
|
|
2438
2567
|
render() {
|
|
2439
|
-
return (h("p", { key: '
|
|
2568
|
+
return (h("p", { key: 'b4cbabb44d32f96a23cd72f108d6a36b05491c97', class: { text: true, emoji: hasOnlyEmojis(this.text) } }, this.isMarkdown ? h("rtk-markdown-view", { text: this.text }) : this.text));
|
|
2440
2569
|
}
|
|
2441
2570
|
};
|
|
2442
2571
|
RtkTextMessageView.style = RtkTextMessageViewStyle0;
|
|
@@ -2542,7 +2671,7 @@ const RtkMenu = class {
|
|
|
2542
2671
|
});
|
|
2543
2672
|
}
|
|
2544
2673
|
render() {
|
|
2545
|
-
return (h(Host, { key: '
|
|
2674
|
+
return (h(Host, { key: '5278137bc9b99d9fe9ffeb0fc30bd887d600494d' }, h("span", { key: 'cbefda068a15340dad76668c3696a10bd94cb8e9', part: "trigger", id: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: 'f160cf29ece64145e795a9a11459bd458482c446' })), h("div", { key: '1056b2bbc8cbacd3c32280d334d9f703a578b5ef', part: "tooltip", class: "tooltip", id: "tooltip", role: "tooltip", ref: (el) => (this.tooltipEl = el) }, h("div", { key: '6c6816fa1b18d49fa22ab6ffb600aaa23c5b9ec5', id: "arrow", ref: (el) => (this.arrowEl = el), part: "arrow" }), this.label, h("slot", { key: '3c2d3425b2e8b4d810de2ce40394491c4698aede', name: "tooltip" }))));
|
|
2546
2675
|
}
|
|
2547
2676
|
static get watchers() { return {
|
|
2548
2677
|
"open": ["openChanged"]
|