@memberjunction/ng-conversations 6.2.0-edge.0 → 6.2.0-edge.2
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/README.md +43 -2
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +19 -3
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -1
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js +39 -7
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts +74 -6
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.js +111 -21
- package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts +31 -5
- package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.js +71 -15
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +65 -9
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +169 -57
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.d.ts +77 -11
- package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.js +181 -47
- package/dist/lib/components/attachment/image-viewer.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +129 -19
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +350 -116
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts +60 -8
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +130 -46
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +63 -3
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +113 -19
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +54 -8
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +130 -46
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts +70 -10
- package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.js +175 -53
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts +89 -9
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +220 -70
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +89 -11
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +154 -40
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +390 -38
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +951 -367
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +213 -18
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +388 -44
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +12 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.js +26 -4
- package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +1191 -124
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +2816 -785
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +139 -19
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +296 -59
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +579 -78
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +2322 -823
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts +42 -4
- package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/pinned-messages-panel.component.js +93 -21
- package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts +57 -11
- package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.js +128 -16
- package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -1
- package/dist/lib/components/dialogs/rating-dialog.component.d.ts +68 -10
- package/dist/lib/components/dialogs/rating-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/rating-dialog.component.js +151 -27
- package/dist/lib/components/dialogs/rating-dialog.component.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +84 -10
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +173 -49
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts +29 -3
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js +58 -12
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js.map +1 -1
- package/dist/lib/components/library/library-full-view.component.d.ts +57 -8
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +119 -35
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts +76 -10
- package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
- package/dist/lib/components/members/members-modal.component.js +164 -50
- package/dist/lib/components/members/members-modal.component.js.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.d.ts +49 -5
- package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.js +140 -26
- package/dist/lib/components/message/actionable-commands.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +46 -10
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +120 -36
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +613 -74
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +1390 -422
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +490 -29
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +1088 -244
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +297 -29
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +598 -123
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +64 -5
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +101 -11
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/notification/activity-indicator.component.d.ts +6 -2
- package/dist/lib/components/notification/activity-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/notification/activity-indicator.component.js +13 -3
- package/dist/lib/components/notification/activity-indicator.component.js.map +1 -1
- package/dist/lib/components/notification/notification-badge.component.d.ts +15 -3
- package/dist/lib/components/notification/notification-badge.component.d.ts.map +1 -1
- package/dist/lib/components/notification/notification-badge.component.js +36 -8
- package/dist/lib/components/notification/notification-badge.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +4 -4
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +93 -11
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +348 -87
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +78 -8
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +177 -46
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.js +2 -2
- package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.js +2 -2
- package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +18 -18
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts +47 -23
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.js +136 -92
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js +4 -4
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +3 -3
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +13 -11
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +29 -25
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +3 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +6 -2
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +133 -22
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +312 -83
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts +69 -9
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +139 -31
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts +48 -8
- package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
- package/dist/lib/components/shared/user-picker.component.js +110 -30
- package/dist/lib/components/shared/user-picker.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +114 -11
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +199 -21
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/sidebar/routines-section.component.d.ts +20 -1
- package/dist/lib/components/sidebar/routines-section.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/routines-section.component.js +25 -5
- package/dist/lib/components/sidebar/routines-section.component.js.map +1 -1
- package/dist/lib/components/slots/slot-interfaces.d.ts +19 -0
- package/dist/lib/components/slots/slot-interfaces.d.ts.map +1 -1
- package/dist/lib/components/slots/slot-interfaces.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts +95 -13
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +223 -75
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/tasks/task-widget.component.d.ts +46 -6
- package/dist/lib/components/tasks/task-widget.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/task-widget.component.js +100 -16
- package/dist/lib/components/tasks/task-widget.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +64 -7
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +127 -27
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts +66 -8
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.js +146 -36
- package/dist/lib/components/thread/thread-panel.component.js.map +1 -1
- package/dist/lib/components/toast/toast.component.d.ts +11 -1
- package/dist/lib/components/toast/toast.component.d.ts.map +1 -1
- package/dist/lib/components/toast/toast.component.js +25 -5
- package/dist/lib/components/toast/toast.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +385 -42
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +891 -292
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +8 -0
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js +8 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
- package/dist/lib/directives/chat-slot.directive.d.ts +5 -1
- package/dist/lib/directives/chat-slot.directive.d.ts.map +1 -1
- package/dist/lib/directives/chat-slot.directive.js.map +1 -1
- package/dist/lib/directives/search-shortcut.directive.d.ts +9 -1
- package/dist/lib/directives/search-shortcut.directive.d.ts.map +1 -1
- package/dist/lib/directives/search-shortcut.directive.js +14 -4
- package/dist/lib/directives/search-shortcut.directive.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +34 -7
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +37 -7
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +113 -0
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -0
- package/dist/lib/models/agent-turn.model.js +12 -0
- package/dist/lib/models/agent-turn.model.js.map +1 -0
- package/dist/lib/models/collection-view.model.js.map +1 -1
- package/dist/lib/models/conversation-state.model.d.ts +8 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-state.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +44 -12
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +98 -34
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +30 -4
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +71 -19
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +17 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +48 -16
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts +39 -0
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +152 -17
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +58 -5
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +135 -35
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/collection-permission.service.d.ts +28 -0
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +88 -32
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/collection-state.service.d.ts +11 -1
- package/dist/lib/services/collection-state.service.d.ts.map +1 -1
- package/dist/lib/services/collection-state.service.js +25 -5
- package/dist/lib/services/collection-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +47 -4
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +85 -20
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-attachment.service.d.ts +17 -0
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-attachment.service.js +38 -10
- package/dist/lib/services/conversation-attachment.service.js.map +1 -1
- package/dist/lib/services/conversation-liveness-dom.service.d.ts +42 -0
- package/dist/lib/services/conversation-liveness-dom.service.d.ts.map +1 -0
- package/dist/lib/services/conversation-liveness-dom.service.js +74 -0
- package/dist/lib/services/conversation-liveness-dom.service.js.map +1 -0
- package/dist/lib/services/conversation-streaming.service.d.ts +22 -0
- package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-streaming.service.js +50 -10
- package/dist/lib/services/conversation-streaming.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +31 -0
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +71 -15
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/dialog.service.d.ts +13 -0
- package/dist/lib/services/dialog.service.d.ts.map +1 -1
- package/dist/lib/services/dialog.service.js +25 -5
- package/dist/lib/services/dialog.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +2 -0
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +5 -1
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +10 -0
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +25 -5
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/notification.service.d.ts +54 -6
- package/dist/lib/services/notification.service.d.ts.map +1 -1
- package/dist/lib/services/notification.service.js +123 -27
- package/dist/lib/services/notification.service.js.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.d.ts +4 -4
- package/dist/lib/services/realtime-audio-recorder.js +12 -12
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- package/dist/lib/services/realtime-pcm-wav.d.ts +4 -0
- package/dist/lib/services/realtime-pcm-wav.d.ts.map +1 -1
- package/dist/lib/services/realtime-pcm-wav.js +10 -2
- package/dist/lib/services/realtime-pcm-wav.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +42 -9
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +103 -23
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/services/toast.service.d.ts +19 -1
- package/dist/lib/services/toast.service.d.ts.map +1 -1
- package/dist/lib/services/toast.service.js +45 -9
- package/dist/lib/services/toast.service.js.map +1 -1
- package/dist/lib/services/ui-command-handler.service.d.ts +56 -5
- package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
- package/dist/lib/services/ui-command-handler.service.js +113 -16
- package/dist/lib/services/ui-command-handler.service.js.map +1 -1
- package/dist/lib/utils/agent-artifact-summary.d.ts +2 -2
- package/dist/lib/utils/agent-artifact-summary.js +3 -3
- package/dist/lib/utils/agent-artifact-summary.js.map +1 -1
- package/dist/lib/utils/agent-turn-routing.d.ts +70 -0
- package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -0
- package/dist/lib/utils/agent-turn-routing.js +84 -0
- package/dist/lib/utils/agent-turn-routing.js.map +1 -0
- package/dist/lib/utils/artifact-panel-action.d.ts +15 -4
- package/dist/lib/utils/artifact-panel-action.d.ts.map +1 -1
- package/dist/lib/utils/artifact-panel-action.js +10 -2
- package/dist/lib/utils/artifact-panel-action.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +68 -0
- package/dist/lib/utils/decision-routing.d.ts.map +1 -0
- package/dist/lib/utils/decision-routing.js +101 -0
- package/dist/lib/utils/decision-routing.js.map +1 -0
- package/dist/lib/utils/distinct-artifacts.d.ts +2 -0
- package/dist/lib/utils/distinct-artifacts.d.ts.map +1 -1
- package/dist/lib/utils/distinct-artifacts.js +5 -1
- package/dist/lib/utils/distinct-artifacts.js.map +1 -1
- package/dist/lib/utils/plan-mode-preference.d.ts +2 -2
- package/dist/lib/utils/plan-mode-preference.js +6 -6
- package/dist/lib/utils/plan-mode-preference.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +8 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +32 -32
|
@@ -112,16 +112,88 @@ function ThreadPanelComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
112
112
|
export class ThreadPanelComponent extends BaseAngularComponent {
|
|
113
113
|
dataCache;
|
|
114
114
|
cdRef;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
ParentMessageId;
|
|
116
|
+
/** @deprecated Use {@link ParentMessageId}. */
|
|
117
|
+
set parentMessageId(value) {
|
|
118
|
+
this.ParentMessageId = value;
|
|
119
|
+
}
|
|
120
|
+
/** @deprecated Use {@link ParentMessageId}. */
|
|
121
|
+
get parentMessageId() {
|
|
122
|
+
return this.ParentMessageId;
|
|
123
|
+
}
|
|
124
|
+
ConversationId;
|
|
125
|
+
/** @deprecated Use {@link ConversationId}. */
|
|
126
|
+
set conversationId(value) {
|
|
127
|
+
this.ConversationId = value;
|
|
128
|
+
}
|
|
129
|
+
/** @deprecated Use {@link ConversationId}. */
|
|
130
|
+
get conversationId() {
|
|
131
|
+
return this.ConversationId;
|
|
132
|
+
}
|
|
133
|
+
CurrentUser;
|
|
134
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
135
|
+
set currentUser(value) {
|
|
136
|
+
this.CurrentUser = value;
|
|
137
|
+
}
|
|
138
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
139
|
+
get currentUser() {
|
|
140
|
+
return this.CurrentUser;
|
|
141
|
+
}
|
|
142
|
+
Closed = new EventEmitter();
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated Use {@link Closed}.
|
|
145
|
+
*
|
|
146
|
+
* The same emitter under the old binding name, so a template still binding
|
|
147
|
+
* (closed) keeps working. Must stay AFTER Closed: class fields
|
|
148
|
+
* initialise in order, and the other way round this captures undefined.
|
|
149
|
+
*/
|
|
150
|
+
closed = this.Closed;
|
|
151
|
+
ReplyAdded = new EventEmitter();
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated Use {@link ReplyAdded}.
|
|
154
|
+
*
|
|
155
|
+
* The same emitter under the old binding name, so a template still binding
|
|
156
|
+
* (replyAdded) keeps working. Must stay AFTER ReplyAdded: class fields
|
|
157
|
+
* initialise in order, and the other way round this captures undefined.
|
|
158
|
+
*/
|
|
159
|
+
replyAdded = this.ReplyAdded;
|
|
160
|
+
ParentMessage = null;
|
|
161
|
+
/** @deprecated Use {@link ParentMessage}. */
|
|
162
|
+
get parentMessage() {
|
|
163
|
+
return this.ParentMessage;
|
|
164
|
+
}
|
|
165
|
+
/** @deprecated Use {@link ParentMessage}. */
|
|
166
|
+
set parentMessage(value) {
|
|
167
|
+
this.ParentMessage = value;
|
|
168
|
+
}
|
|
169
|
+
Replies = [];
|
|
170
|
+
/** @deprecated Use {@link Replies}. */
|
|
171
|
+
get replies() {
|
|
172
|
+
return this.Replies;
|
|
173
|
+
}
|
|
174
|
+
/** @deprecated Use {@link Replies}. */
|
|
175
|
+
set replies(value) {
|
|
176
|
+
this.Replies = value;
|
|
177
|
+
}
|
|
178
|
+
ReplyText = '';
|
|
179
|
+
/** @deprecated Use {@link ReplyText}. */
|
|
180
|
+
get replyText() {
|
|
181
|
+
return this.ReplyText;
|
|
182
|
+
}
|
|
183
|
+
/** @deprecated Use {@link ReplyText}. */
|
|
184
|
+
set replyText(value) {
|
|
185
|
+
this.ReplyText = value;
|
|
186
|
+
}
|
|
123
187
|
isLoading = false;
|
|
124
|
-
|
|
188
|
+
IsSending = false;
|
|
189
|
+
/** @deprecated Use {@link IsSending}. */
|
|
190
|
+
get isSending() {
|
|
191
|
+
return this.IsSending;
|
|
192
|
+
}
|
|
193
|
+
/** @deprecated Use {@link IsSending}. */
|
|
194
|
+
set isSending(value) {
|
|
195
|
+
this.IsSending = value;
|
|
196
|
+
}
|
|
125
197
|
errorMessage = '';
|
|
126
198
|
destroy$ = new Subject();
|
|
127
199
|
constructor(dataCache, cdRef) {
|
|
@@ -145,13 +217,13 @@ export class ThreadPanelComponent extends BaseAngularComponent {
|
|
|
145
217
|
this.errorMessage = '';
|
|
146
218
|
try {
|
|
147
219
|
// Load parent message from cache
|
|
148
|
-
const parent = await this.dataCache.getConversationDetail(this.
|
|
220
|
+
const parent = await this.dataCache.getConversationDetail(this.ParentMessageId, this.CurrentUser);
|
|
149
221
|
if (!parent) {
|
|
150
222
|
this.errorMessage = 'Failed to load parent message';
|
|
151
223
|
this.isLoading = false;
|
|
152
224
|
return;
|
|
153
225
|
}
|
|
154
|
-
this.
|
|
226
|
+
this.ParentMessage = parent;
|
|
155
227
|
// Load all replies
|
|
156
228
|
await this.loadReplies();
|
|
157
229
|
}
|
|
@@ -172,12 +244,12 @@ export class ThreadPanelComponent extends BaseAngularComponent {
|
|
|
172
244
|
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
173
245
|
const result = await rv.RunView({
|
|
174
246
|
EntityName: 'MJ: Conversation Details',
|
|
175
|
-
ExtraFilter: `ParentID='${this.
|
|
247
|
+
ExtraFilter: `ParentID='${this.ParentMessageId}'`,
|
|
176
248
|
OrderBy: '__mj_CreatedAt ASC',
|
|
177
249
|
ResultType: 'entity_object'
|
|
178
|
-
}, this.
|
|
250
|
+
}, this.CurrentUser);
|
|
179
251
|
if (result.Success) {
|
|
180
|
-
this.
|
|
252
|
+
this.Replies = result.Results || [];
|
|
181
253
|
}
|
|
182
254
|
else {
|
|
183
255
|
console.error('Failed to load replies:', result.ErrorMessage);
|
|
@@ -192,27 +264,27 @@ export class ThreadPanelComponent extends BaseAngularComponent {
|
|
|
192
264
|
/**
|
|
193
265
|
* Handles sending a new reply
|
|
194
266
|
*/
|
|
195
|
-
async
|
|
196
|
-
if (!this.
|
|
267
|
+
async OnSendReply() {
|
|
268
|
+
if (!this.CanSendReply)
|
|
197
269
|
return;
|
|
198
|
-
this.
|
|
270
|
+
this.IsSending = true;
|
|
199
271
|
this.errorMessage = '';
|
|
200
272
|
try {
|
|
201
|
-
const reply = await this.dataCache.createConversationDetail(this.
|
|
202
|
-
reply.ConversationID = this.
|
|
203
|
-
reply.ParentID = this.
|
|
204
|
-
reply.Message = this.
|
|
273
|
+
const reply = await this.dataCache.createConversationDetail(this.CurrentUser);
|
|
274
|
+
reply.ConversationID = this.ConversationId;
|
|
275
|
+
reply.ParentID = this.ParentMessageId;
|
|
276
|
+
reply.Message = this.ReplyText.trim();
|
|
205
277
|
reply.Role = 'User';
|
|
206
278
|
const saved = await reply.Save();
|
|
207
279
|
if (saved) {
|
|
208
280
|
// Add to local list
|
|
209
|
-
this.
|
|
210
|
-
this.
|
|
281
|
+
this.Replies = [...this.Replies, reply];
|
|
282
|
+
this.ReplyText = '';
|
|
211
283
|
// Emit event to parent
|
|
212
|
-
this.
|
|
284
|
+
this.ReplyAdded.emit(reply);
|
|
213
285
|
// Update parent message thread count
|
|
214
|
-
if (this.
|
|
215
|
-
this.
|
|
286
|
+
if (this.ParentMessage) {
|
|
287
|
+
this.ParentMessage.ThreadCount = (this.ParentMessage.ThreadCount || 0) + 1; // TODO: ThreadCount field doesn't exist on MJConversationDetailEntity yet
|
|
216
288
|
}
|
|
217
289
|
this.cdRef.detectChanges();
|
|
218
290
|
}
|
|
@@ -226,26 +298,38 @@ export class ThreadPanelComponent extends BaseAngularComponent {
|
|
|
226
298
|
this.errorMessage = 'Error sending reply. Please try again.';
|
|
227
299
|
}
|
|
228
300
|
finally {
|
|
229
|
-
this.
|
|
301
|
+
this.IsSending = false;
|
|
230
302
|
this.cdRef.detectChanges();
|
|
231
303
|
}
|
|
232
304
|
}
|
|
305
|
+
/** @deprecated Use {@link OnSendReply}. */
|
|
306
|
+
async onSendReply() {
|
|
307
|
+
return this.OnSendReply();
|
|
308
|
+
}
|
|
233
309
|
/**
|
|
234
310
|
* Handles closing the thread panel
|
|
235
311
|
*/
|
|
312
|
+
OnClose() {
|
|
313
|
+
this.Closed.emit();
|
|
314
|
+
}
|
|
315
|
+
/** @deprecated Use {@link OnClose}. */
|
|
236
316
|
onClose() {
|
|
237
|
-
this.
|
|
317
|
+
return this.OnClose();
|
|
238
318
|
}
|
|
239
319
|
/**
|
|
240
320
|
* Gets the display text for a message
|
|
241
321
|
*/
|
|
242
|
-
|
|
322
|
+
GetMessageText(message) {
|
|
243
323
|
return message.Message || '';
|
|
244
324
|
}
|
|
325
|
+
/** @deprecated Use {@link GetMessageText}. */
|
|
326
|
+
getMessageText(message) {
|
|
327
|
+
return this.GetMessageText(message);
|
|
328
|
+
}
|
|
245
329
|
/**
|
|
246
330
|
* Gets the timestamp display for a message
|
|
247
331
|
*/
|
|
248
|
-
|
|
332
|
+
GetMessageTime(message) {
|
|
249
333
|
if (!message.__mj_CreatedAt)
|
|
250
334
|
return '';
|
|
251
335
|
const date = new Date(message.__mj_CreatedAt);
|
|
@@ -264,29 +348,45 @@ export class ThreadPanelComponent extends BaseAngularComponent {
|
|
|
264
348
|
return `${diffDays}d ago`;
|
|
265
349
|
return date.toLocaleDateString();
|
|
266
350
|
}
|
|
351
|
+
/** @deprecated Use {@link GetMessageTime}. */
|
|
352
|
+
getMessageTime(message) {
|
|
353
|
+
return this.GetMessageTime(message);
|
|
354
|
+
}
|
|
267
355
|
/**
|
|
268
356
|
* Gets the sender name for a message
|
|
269
357
|
*/
|
|
270
|
-
|
|
358
|
+
GetSenderName(message) {
|
|
271
359
|
if (message.Role === 'AI')
|
|
272
360
|
return 'AI Assistant';
|
|
273
361
|
return message.User || 'User';
|
|
274
362
|
}
|
|
363
|
+
/** @deprecated Use {@link GetSenderName}. */
|
|
364
|
+
getSenderName(message) {
|
|
365
|
+
return this.GetSenderName(message);
|
|
366
|
+
}
|
|
275
367
|
/**
|
|
276
368
|
* Checks if current user can send reply
|
|
277
369
|
*/
|
|
370
|
+
get CanSendReply() {
|
|
371
|
+
return !this.IsSending && !this.isLoading && this.ReplyText.trim().length > 0;
|
|
372
|
+
}
|
|
373
|
+
/** @deprecated Use {@link CanSendReply}. */
|
|
278
374
|
get canSendReply() {
|
|
279
|
-
return
|
|
375
|
+
return this.CanSendReply;
|
|
280
376
|
}
|
|
281
377
|
/**
|
|
282
378
|
* Gets the reply count text
|
|
283
379
|
*/
|
|
284
|
-
get
|
|
285
|
-
const count = this.
|
|
380
|
+
get ReplyCountText() {
|
|
381
|
+
const count = this.Replies.length;
|
|
286
382
|
return count === 1 ? '1 reply' : `${count} replies`;
|
|
287
383
|
}
|
|
384
|
+
/** @deprecated Use {@link ReplyCountText}. */
|
|
385
|
+
get replyCountText() {
|
|
386
|
+
return this.ReplyCountText;
|
|
387
|
+
}
|
|
288
388
|
static ɵfac = function ThreadPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ThreadPanelComponent)(i0.ɵɵdirectiveInject(i1.DataCacheService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
289
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ThreadPanelComponent, selectors: [["mj-thread-panel"]], inputs: { parentMessageId: "parentMessageId", conversationId: "conversationId", currentUser: "currentUser" }, outputs: { closed: "closed", replyAdded: "replyAdded" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 3, consts: [[1, "thread-panel-overlay", 3, "click"], [1, "thread-panel"], [1, "thread-header"], [1, "thread-title"], [1, "fa-solid", "fa-comments"], ["title", "Close thread", 1, "close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "thread-loading"], [1, "thread-error"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-exclamation-circle"], [1, "thread-content"], [1, "parent-message"], [1, "message-header"], [1, "message-sender"], [1, "message-time"], [1, "message-body"], [1, "reply-count"], [1, "fa-solid", "fa-reply"], [1, "replies-container"], [1, "no-replies"], [1, "reply-item", 3, "ai-reply"], [1, "reply-input-container"], ["placeholder", "Reply to thread...", "rows", "3", 1, "reply-input", 3, "ngModelChange", "keydown.control.enter", "keydown.meta.enter", "ngModel", "disabled"], [1, "reply-actions"], [1, "btn-send-reply", 3, "click", "disabled"], [1, "fa-solid", "fa-paper-plane"], [1, "fa-solid", "fa-message"], [1, "reply-item"], [1, "reply-header"], [1, "reply-sender"], [1, "reply-time"], [1, "reply-body"]], template: function ThreadPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
389
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ThreadPanelComponent, selectors: [["mj-thread-panel"]], inputs: { ParentMessageId: "ParentMessageId", parentMessageId: "parentMessageId", ConversationId: "ConversationId", conversationId: "conversationId", CurrentUser: "CurrentUser", currentUser: "currentUser" }, outputs: { Closed: "Closed", closed: "closed", ReplyAdded: "ReplyAdded", replyAdded: "replyAdded" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 3, consts: [[1, "thread-panel-overlay", 3, "click"], [1, "thread-panel"], [1, "thread-header"], [1, "thread-title"], [1, "fa-solid", "fa-comments"], ["title", "Close thread", 1, "close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "thread-loading"], [1, "thread-error"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-exclamation-circle"], [1, "thread-content"], [1, "parent-message"], [1, "message-header"], [1, "message-sender"], [1, "message-time"], [1, "message-body"], [1, "reply-count"], [1, "fa-solid", "fa-reply"], [1, "replies-container"], [1, "no-replies"], [1, "reply-item", 3, "ai-reply"], [1, "reply-input-container"], ["placeholder", "Reply to thread...", "rows", "3", 1, "reply-input", 3, "ngModelChange", "keydown.control.enter", "keydown.meta.enter", "ngModel", "disabled"], [1, "reply-actions"], [1, "btn-send-reply", 3, "click", "disabled"], [1, "fa-solid", "fa-paper-plane"], [1, "fa-solid", "fa-message"], [1, "reply-item"], [1, "reply-header"], [1, "reply-sender"], [1, "reply-time"], [1, "reply-body"]], template: function ThreadPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
290
390
|
i0.ɵɵelementStart(0, "div", 0);
|
|
291
391
|
i0.ɵɵlistener("click", function ThreadPanelComponent_Template_div_click_0_listener() { return ctx.onClose(); });
|
|
292
392
|
i0.ɵɵelementEnd();
|
|
@@ -315,14 +415,24 @@ export class ThreadPanelComponent extends BaseAngularComponent {
|
|
|
315
415
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ThreadPanelComponent, [{
|
|
316
416
|
type: Component,
|
|
317
417
|
args: [{ standalone: false, selector: 'mj-thread-panel', template: "<div class=\"thread-panel-overlay\" (click)=\"onClose()\"></div>\n\n<div class=\"thread-panel\">\n <div class=\"thread-header\">\n <div class=\"thread-title\">\n <i class=\"fa-solid fa-comments\"></i>\n <span>Thread</span>\n </div>\n <button class=\"close-btn\" (click)=\"onClose()\" title=\"Close thread\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n @if (isLoading) {\n <div class=\"thread-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading thread...</span>\n </div>\n }\n\n @if (errorMessage && !isLoading) {\n <div class=\"thread-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <span>{{ errorMessage }}</span>\n </div>\n }\n\n @if (!isLoading && !errorMessage && parentMessage) {\n <div class=\"thread-content\">\n <!-- Parent Message -->\n <div class=\"parent-message\">\n <div class=\"message-header\">\n <span class=\"message-sender\">{{ getSenderName(parentMessage) }}</span>\n <span class=\"message-time\">{{ getMessageTime(parentMessage) }}</span>\n </div>\n <div class=\"message-body\">\n {{ getMessageText(parentMessage) }}\n </div>\n <div class=\"reply-count\">\n <i class=\"fa-solid fa-reply\"></i>\n <span>{{ replyCountText }}</span>\n </div>\n </div>\n\n <!-- Replies List -->\n <div class=\"replies-container\">\n @if (replies.length === 0) {\n <div class=\"no-replies\">\n <i class=\"fa-solid fa-message\"></i>\n <span>No replies yet. Be the first to reply!</span>\n </div>\n }\n\n @for (reply of replies; track reply.ID) {\n <div class=\"reply-item\" [class.ai-reply]=\"reply.Role === 'AI'\">\n <div class=\"reply-header\">\n <span class=\"reply-sender\">{{ getSenderName(reply) }}</span>\n <span class=\"reply-time\">{{ getMessageTime(reply) }}</span>\n </div>\n <div class=\"reply-body\">\n {{ getMessageText(reply) }}\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Reply Input -->\n <div class=\"reply-input-container\">\n <textarea\n class=\"reply-input\"\n [(ngModel)]=\"replyText\"\n [disabled]=\"isSending\"\n placeholder=\"Reply to thread...\"\n rows=\"3\"\n (keydown.control.enter)=\"onSendReply()\"\n (keydown.meta.enter)=\"onSendReply()\">\n </textarea>\n <div class=\"reply-actions\">\n <button\n class=\"btn-send-reply\"\n [disabled]=\"!canSendReply\"\n (click)=\"onSendReply()\">\n <i class=\"fa-solid fa-paper-plane\"></i>\n <span>{{ isSending ? 'Sending...' : 'Reply' }}</span>\n </button>\n </div>\n </div>\n }\n</div>\n", styles: ["/* Thread Panel Overlay */\n.thread-panel-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 999;\n animation: fadeIn 200ms ease;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Thread Panel Container */\n.thread-panel {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 450px;\n max-width: 90vw;\n background: var(--mj-bg-surface-card);\n box-shadow: -2px 0 8px color-mix(in srgb, var(--mj-text-primary) 15%, transparent);\n z-index: 1000;\n display: flex;\n flex-direction: column;\n animation: slideIn 250ms ease;\n}\n\n@keyframes slideIn {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n/* Header */\n.thread-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n}\n\n.thread-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.thread-title i {\n color: var(--mj-text-secondary);\n}\n\n.close-btn {\n padding: 6px;\n background: transparent;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 18px;\n transition: all 150ms ease;\n}\n\n.close-btn:hover {\n background: var(--mj-border-default);\n color: var(--mj-text-primary);\n}\n\n/* Loading State */\n.thread-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px;\n color: var(--mj-text-secondary);\n}\n\n.thread-loading i {\n font-size: 24px;\n}\n\n/* Error State */\n.thread-error {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 16px 20px;\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n border-left: 3px solid var(--mj-status-error);\n color: var(--mj-status-error);\n margin: 16px 20px;\n border-radius: 4px;\n}\n\n/* Content Container */\n.thread-content {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n}\n\n/* Parent Message */\n.parent-message {\n padding: 16px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n margin-bottom: 20px;\n}\n\n.message-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n}\n\n.message-sender {\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: 14px;\n}\n\n.message-time {\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.message-body {\n color: var(--mj-text-primary);\n line-height: 1.6;\n white-space: pre-wrap;\n word-break: break-word;\n font-size: 14px;\n margin-bottom: 12px;\n}\n\n.reply-count {\n display: flex;\n align-items: center;\n gap: 6px;\n padding-top: 12px;\n border-top: 1px solid var(--mj-border-default);\n font-size: 13px;\n color: var(--mj-text-secondary);\n font-weight: 500;\n}\n\n.reply-count i {\n font-size: 12px;\n}\n\n/* Replies Container */\n.replies-container {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.no-replies {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 40px 20px;\n color: var(--mj-text-muted);\n text-align: center;\n}\n\n.no-replies i {\n font-size: 32px;\n opacity: 0.5;\n}\n\n.no-replies span {\n font-size: 14px;\n}\n\n/* Reply Item */\n.reply-item {\n padding: 12px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n transition: all 150ms ease;\n}\n\n.reply-item:hover {\n border-color: var(--mj-border-strong);\n box-shadow: 0 1px 3px color-mix(in srgb, var(--mj-text-primary) 5%, transparent);\n}\n\n.reply-item.ai-reply {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-bg-surface));\n}\n\n.reply-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n}\n\n.reply-sender {\n font-weight: 600;\n color: var(--mj-text-primary);\n font-size: 13px;\n}\n\n.reply-time {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.reply-body {\n color: var(--mj-text-primary);\n line-height: 1.5;\n white-space: pre-wrap;\n word-break: break-word;\n font-size: 13px;\n}\n\n/* Reply Input */\n.reply-input-container {\n padding: 16px 20px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.reply-input {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n resize: vertical;\n font-family: inherit;\n font-size: 14px;\n min-height: 60px;\n transition: all 150ms ease;\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n}\n\n.reply-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.reply-input:disabled {\n background: var(--mj-bg-surface-sunken);\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.reply-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: 10px;\n}\n\n.btn-send-reply {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n border-radius: 6px;\n cursor: pointer;\n font-weight: 600;\n font-size: 13px;\n transition: all 150ms ease;\n}\n\n.btn-send-reply:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px color-mix(in srgb, var(--mj-brand-primary) 20%, transparent);\n}\n\n.btn-send-reply:disabled {\n background: var(--mj-border-default);\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.btn-send-reply i {\n font-size: 12px;\n}\n\n/* Scrollbar Styling */\n.thread-content::-webkit-scrollbar {\n width: 6px;\n}\n\n.thread-content::-webkit-scrollbar-track {\n background: var(--mj-bg-surface-sunken);\n}\n\n.thread-content::-webkit-scrollbar-thumb {\n background: var(--mj-border-default);\n border-radius: 3px;\n}\n\n.thread-content::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-muted);\n}\n"] }]
|
|
318
|
-
}], () => [{ type: i1.DataCacheService }, { type: i0.ChangeDetectorRef }], {
|
|
418
|
+
}], () => [{ type: i1.DataCacheService }, { type: i0.ChangeDetectorRef }], { ParentMessageId: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}], parentMessageId: [{
|
|
421
|
+
type: Input
|
|
422
|
+
}], ConversationId: [{
|
|
319
423
|
type: Input
|
|
320
424
|
}], conversationId: [{
|
|
321
425
|
type: Input
|
|
426
|
+
}], CurrentUser: [{
|
|
427
|
+
type: Input
|
|
322
428
|
}], currentUser: [{
|
|
323
429
|
type: Input
|
|
430
|
+
}], Closed: [{
|
|
431
|
+
type: Output
|
|
324
432
|
}], closed: [{
|
|
325
433
|
type: Output
|
|
434
|
+
}], ReplyAdded: [{
|
|
435
|
+
type: Output
|
|
326
436
|
}], replyAdded: [{
|
|
327
437
|
type: Output
|
|
328
438
|
}] }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread-panel.component.js","sourceRoot":"","sources":["../../../../src/lib/components/thread/thread-panel.component.ts","../../../../src/lib/components/thread/thread-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAwC,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,oBAAoB,EAAE,MAAM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EN,sFAAiB;YAOjB,wFAAkC;YAOlC,+EAAoD;YA8DtD,iBAAM;;YA5EJ,eAKC;YALD,wCAKC;YAED,cAKC;YALD,8DAKC;YAED,cA6DC;YA7DD,oFA6DC;;;iFDtEU,oBAAoB;cANhC,SAAS;6BACI,KAAK,YACP,iBAAiB;;kBAK1B,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kFANI,oBAAoB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { MJConversationDetailEntity } from '@memberjunction/core-entities';\nimport { UserInfo, RunView, Metadata } from '@memberjunction/core';\nimport { DataCacheService } from '../../services/data-cache.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Side panel component for displaying and managing threaded message replies\n * Shows parent message at top with all replies in chronological order\n */\n@Component({\n standalone: false,\n selector: 'mj-thread-panel',\n templateUrl: './thread-panel.component.html',\n styleUrls: ['./thread-panel.component.css']\n})\nexport class ThreadPanelComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Input() parentMessageId!: string;\n @Input() conversationId!: string;\n @Input() currentUser!: UserInfo;\n\n @Output() closed = new EventEmitter<void>();\n @Output() replyAdded = new EventEmitter<MJConversationDetailEntity>();\n\n public parentMessage: MJConversationDetailEntity | null = null;\n public replies: MJConversationDetailEntity[] = [];\n public replyText: string = '';\n public isLoading: boolean = false;\n public isSending: boolean = false;\n public errorMessage: string = '';\n\n private destroy$ = new Subject<void>();\n\n constructor(\n private dataCache: DataCacheService,\n private cdRef: ChangeDetectorRef\n ) {\n super();}\n\n async ngOnInit() {\n this.dataCache.Provider = this.ProviderToUse;\n await this.loadThreadData();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Loads the parent message and all replies\n */\n private async loadThreadData(): Promise<void> {\n this.isLoading = true;\n this.errorMessage = '';\n\n try {\n // Load parent message from cache\n const parent = await this.dataCache.getConversationDetail(this.parentMessageId, this.currentUser);\n\n if (!parent) {\n this.errorMessage = 'Failed to load parent message';\n this.isLoading = false;\n return;\n }\n\n this.parentMessage = parent;\n\n // Load all replies\n await this.loadReplies();\n } catch (error) {\n console.error('Error loading thread data:', error);\n this.errorMessage = 'Error loading thread. Please try again.';\n } finally {\n this.isLoading = false;\n this.cdRef.detectChanges();\n }\n }\n\n /**\n * Loads all replies for the parent message\n */\n private async loadReplies(): Promise<void> {\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJConversationDetailEntity>(\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `ParentID='${this.parentMessageId}'`,\n OrderBy: '__mj_CreatedAt ASC',\n ResultType: 'entity_object'\n },\n this.currentUser\n );\n\n if (result.Success) {\n this.replies = result.Results || [];\n } else {\n console.error('Failed to load replies:', result.ErrorMessage);\n this.errorMessage = 'Failed to load replies';\n }\n } catch (error) {\n console.error('Error loading replies:', error);\n this.errorMessage = 'Error loading replies';\n }\n }\n\n /**\n * Handles sending a new reply\n */\n async onSendReply(): Promise<void> {\n if (!this.canSendReply) return;\n\n this.isSending = true;\n this.errorMessage = '';\n\n try {\n const reply = await this.dataCache.createConversationDetail(this.currentUser);\n\n reply.ConversationID = this.conversationId;\n reply.ParentID = this.parentMessageId;\n reply.Message = this.replyText.trim();\n reply.Role = 'User';\n\n const saved = await reply.Save();\n\n if (saved) {\n // Add to local list\n this.replies = [...this.replies, reply];\n this.replyText = '';\n\n // Emit event to parent\n this.replyAdded.emit(reply);\n\n // Update parent message thread count\n if (this.parentMessage) {\n (this.parentMessage as any).ThreadCount = ((this.parentMessage as any).ThreadCount || 0) + 1; // TODO: ThreadCount field doesn't exist on MJConversationDetailEntity yet\n }\n\n this.cdRef.detectChanges();\n } else {\n console.error('Failed to save reply:', reply.LatestResult?.Message);\n this.errorMessage = 'Failed to send reply. Please try again.';\n }\n } catch (error) {\n console.error('Error sending reply:', error);\n this.errorMessage = 'Error sending reply. Please try again.';\n } finally {\n this.isSending = false;\n this.cdRef.detectChanges();\n }\n }\n\n /**\n * Handles closing the thread panel\n */\n onClose(): void {\n this.closed.emit();\n }\n\n /**\n * Gets the display text for a message\n */\n getMessageText(message: MJConversationDetailEntity): string {\n return message.Message || '';\n }\n\n /**\n * Gets the timestamp display for a message\n */\n getMessageTime(message: MJConversationDetailEntity): string {\n if (!message.__mj_CreatedAt) return '';\n\n const date = new Date(message.__mj_CreatedAt);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMs / 3600000);\n const diffDays = Math.floor(diffMs / 86400000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins < 60) return `${diffMins}m ago`;\n if (diffHours < 24) return `${diffHours}h ago`;\n if (diffDays < 7) return `${diffDays}d ago`;\n\n return date.toLocaleDateString();\n }\n\n /**\n * Gets the sender name for a message\n */\n getSenderName(message: MJConversationDetailEntity): string {\n if (message.Role === 'AI') return 'AI Assistant';\n return message.User || 'User';\n }\n\n /**\n * Checks if current user can send reply\n */\n get canSendReply(): boolean {\n return !this.isSending && !this.isLoading && this.replyText.trim().length > 0;\n }\n\n /**\n * Gets the reply count text\n */\n get replyCountText(): string {\n const count = this.replies.length;\n return count === 1 ? '1 reply' : `${count} replies`;\n }\n}\n","<div class=\"thread-panel-overlay\" (click)=\"onClose()\"></div>\n\n<div class=\"thread-panel\">\n <div class=\"thread-header\">\n <div class=\"thread-title\">\n <i class=\"fa-solid fa-comments\"></i>\n <span>Thread</span>\n </div>\n <button class=\"close-btn\" (click)=\"onClose()\" title=\"Close thread\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n @if (isLoading) {\n <div class=\"thread-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading thread...</span>\n </div>\n }\n\n @if (errorMessage && !isLoading) {\n <div class=\"thread-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <span>{{ errorMessage }}</span>\n </div>\n }\n\n @if (!isLoading && !errorMessage && parentMessage) {\n <div class=\"thread-content\">\n <!-- Parent Message -->\n <div class=\"parent-message\">\n <div class=\"message-header\">\n <span class=\"message-sender\">{{ getSenderName(parentMessage) }}</span>\n <span class=\"message-time\">{{ getMessageTime(parentMessage) }}</span>\n </div>\n <div class=\"message-body\">\n {{ getMessageText(parentMessage) }}\n </div>\n <div class=\"reply-count\">\n <i class=\"fa-solid fa-reply\"></i>\n <span>{{ replyCountText }}</span>\n </div>\n </div>\n\n <!-- Replies List -->\n <div class=\"replies-container\">\n @if (replies.length === 0) {\n <div class=\"no-replies\">\n <i class=\"fa-solid fa-message\"></i>\n <span>No replies yet. Be the first to reply!</span>\n </div>\n }\n\n @for (reply of replies; track reply.ID) {\n <div class=\"reply-item\" [class.ai-reply]=\"reply.Role === 'AI'\">\n <div class=\"reply-header\">\n <span class=\"reply-sender\">{{ getSenderName(reply) }}</span>\n <span class=\"reply-time\">{{ getMessageTime(reply) }}</span>\n </div>\n <div class=\"reply-body\">\n {{ getMessageText(reply) }}\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Reply Input -->\n <div class=\"reply-input-container\">\n <textarea\n class=\"reply-input\"\n [(ngModel)]=\"replyText\"\n [disabled]=\"isSending\"\n placeholder=\"Reply to thread...\"\n rows=\"3\"\n (keydown.control.enter)=\"onSendReply()\"\n (keydown.meta.enter)=\"onSendReply()\">\n </textarea>\n <div class=\"reply-actions\">\n <button\n class=\"btn-send-reply\"\n [disabled]=\"!canSendReply\"\n (click)=\"onSendReply()\">\n <i class=\"fa-solid fa-paper-plane\"></i>\n <span>{{ isSending ? 'Sending...' : 'Reply' }}</span>\n </button>\n </div>\n </div>\n }\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"thread-panel.component.js","sourceRoot":"","sources":["../../../../src/lib/components/thread/thread-panel.component.ts","../../../../src/lib/components/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KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kFAnDI,oBAAoB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { MJConversationDetailEntity } from '@memberjunction/core-entities';\nimport { UserInfo, RunView, Metadata } from '@memberjunction/core';\nimport { DataCacheService } from '../../services/data-cache.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Side panel component for displaying and managing threaded message replies\n * Shows parent message at top with all replies in chronological order\n */\n@Component({\n standalone: false,\n selector: 'mj-thread-panel',\n templateUrl: './thread-panel.component.html',\n styleUrls: ['./thread-panel.component.css']\n})\nexport class ThreadPanelComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Input() ParentMessageId!: string;\n\n /** @deprecated Use {@link ParentMessageId}. */\n @Input() set parentMessageId(value: string) {\n this.ParentMessageId = value;\n }\n /** @deprecated Use {@link ParentMessageId}. */\n get parentMessageId(): string {\n return this.ParentMessageId;\n }\n @Input() ConversationId!: string;\n\n /** @deprecated Use {@link ConversationId}. */\n @Input() set conversationId(value: string) {\n this.ConversationId = value;\n }\n /** @deprecated Use {@link ConversationId}. */\n get conversationId(): string {\n return this.ConversationId;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n\n @Output() Closed = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Closed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (closed) keeps working. Must stay AFTER Closed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() closed = this.Closed;\n @Output() ReplyAdded = new EventEmitter<MJConversationDetailEntity>();\n\n /**\n * @deprecated Use {@link ReplyAdded}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (replyAdded) keeps working. Must stay AFTER ReplyAdded: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() replyAdded = this.ReplyAdded;\n\n public ParentMessage: MJConversationDetailEntity | null = null;\n\n /** @deprecated Use {@link ParentMessage}. */\n public get parentMessage(): MJConversationDetailEntity | null {\n return this.ParentMessage;\n }\n /** @deprecated Use {@link ParentMessage}. */\n public set parentMessage(value: MJConversationDetailEntity | null) {\n this.ParentMessage = value;\n }\n public Replies: MJConversationDetailEntity[] = [];\n\n /** @deprecated Use {@link Replies}. */\n public get replies(): MJConversationDetailEntity[] {\n return this.Replies;\n }\n /** @deprecated Use {@link Replies}. */\n public set replies(value: MJConversationDetailEntity[]) {\n this.Replies = value;\n }\n public ReplyText: string = '';\n\n /** @deprecated Use {@link ReplyText}. */\n public get replyText(): string {\n return this.ReplyText;\n }\n /** @deprecated Use {@link ReplyText}. */\n public set replyText(value: string) {\n this.ReplyText = value;\n }\n public isLoading: boolean = false;\n public IsSending: boolean = false;\n\n /** @deprecated Use {@link IsSending}. */\n public get isSending(): boolean {\n return this.IsSending;\n }\n /** @deprecated Use {@link IsSending}. */\n public set isSending(value: boolean) {\n this.IsSending = value;\n }\n public errorMessage: string = '';\n\n private destroy$ = new Subject<void>();\n\n constructor(\n private dataCache: DataCacheService,\n private cdRef: ChangeDetectorRef\n ) {\n super();}\n\n async ngOnInit() {\n this.dataCache.Provider = this.ProviderToUse;\n await this.loadThreadData();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Loads the parent message and all replies\n */\n private async loadThreadData(): Promise<void> {\n this.isLoading = true;\n this.errorMessage = '';\n\n try {\n // Load parent message from cache\n const parent = await this.dataCache.getConversationDetail(this.ParentMessageId, this.CurrentUser);\n\n if (!parent) {\n this.errorMessage = 'Failed to load parent message';\n this.isLoading = false;\n return;\n }\n\n this.ParentMessage = parent;\n\n // Load all replies\n await this.loadReplies();\n } catch (error) {\n console.error('Error loading thread data:', error);\n this.errorMessage = 'Error loading thread. Please try again.';\n } finally {\n this.isLoading = false;\n this.cdRef.detectChanges();\n }\n }\n\n /**\n * Loads all replies for the parent message\n */\n private async loadReplies(): Promise<void> {\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJConversationDetailEntity>(\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `ParentID='${this.ParentMessageId}'`,\n OrderBy: '__mj_CreatedAt ASC',\n ResultType: 'entity_object'\n },\n this.CurrentUser\n );\n\n if (result.Success) {\n this.Replies = result.Results || [];\n } else {\n console.error('Failed to load replies:', result.ErrorMessage);\n this.errorMessage = 'Failed to load replies';\n }\n } catch (error) {\n console.error('Error loading replies:', error);\n this.errorMessage = 'Error loading replies';\n }\n }\n\n /**\n * Handles sending a new reply\n */\n async OnSendReply(): Promise<void> {\n if (!this.CanSendReply) return;\n\n this.IsSending = true;\n this.errorMessage = '';\n\n try {\n const reply = await this.dataCache.createConversationDetail(this.CurrentUser);\n\n reply.ConversationID = this.ConversationId;\n reply.ParentID = this.ParentMessageId;\n reply.Message = this.ReplyText.trim();\n reply.Role = 'User';\n\n const saved = await reply.Save();\n\n if (saved) {\n // Add to local list\n this.Replies = [...this.Replies, reply];\n this.ReplyText = '';\n\n // Emit event to parent\n this.ReplyAdded.emit(reply);\n\n // Update parent message thread count\n if (this.ParentMessage) {\n (this.ParentMessage as any).ThreadCount = ((this.ParentMessage as any).ThreadCount || 0) + 1; // TODO: ThreadCount field doesn't exist on MJConversationDetailEntity yet\n }\n\n this.cdRef.detectChanges();\n } else {\n console.error('Failed to save reply:', reply.LatestResult?.Message);\n this.errorMessage = 'Failed to send reply. Please try again.';\n }\n } catch (error) {\n console.error('Error sending reply:', error);\n this.errorMessage = 'Error sending reply. Please try again.';\n } finally {\n this.IsSending = false;\n this.cdRef.detectChanges();\n }\n }\n\n /** @deprecated Use {@link OnSendReply}. */\n async onSendReply(): Promise<void> {\n return this.OnSendReply();\n }\n\n /**\n * Handles closing the thread panel\n */\n OnClose(): void {\n this.Closed.emit();\n }\n\n /** @deprecated Use {@link OnClose}. */\n onClose(): void {\n return this.OnClose();\n }\n\n /**\n * Gets the display text for a message\n */\n GetMessageText(message: MJConversationDetailEntity): string {\n return message.Message || '';\n }\n\n /** @deprecated Use {@link GetMessageText}. */\n getMessageText(message: MJConversationDetailEntity): string {\n return this.GetMessageText(message);\n }\n\n /**\n * Gets the timestamp display for a message\n */\n GetMessageTime(message: MJConversationDetailEntity): string {\n if (!message.__mj_CreatedAt) return '';\n\n const date = new Date(message.__mj_CreatedAt);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMs / 3600000);\n const diffDays = Math.floor(diffMs / 86400000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins < 60) return `${diffMins}m ago`;\n if (diffHours < 24) return `${diffHours}h ago`;\n if (diffDays < 7) return `${diffDays}d ago`;\n\n return date.toLocaleDateString();\n }\n\n /** @deprecated Use {@link GetMessageTime}. */\n getMessageTime(message: MJConversationDetailEntity): string {\n return this.GetMessageTime(message);\n }\n\n /**\n * Gets the sender name for a message\n */\n GetSenderName(message: MJConversationDetailEntity): string {\n if (message.Role === 'AI') return 'AI Assistant';\n return message.User || 'User';\n }\n\n /** @deprecated Use {@link GetSenderName}. */\n getSenderName(message: MJConversationDetailEntity): string {\n return this.GetSenderName(message);\n }\n\n /**\n * Checks if current user can send reply\n */\n get CanSendReply(): boolean {\n return !this.IsSending && !this.isLoading && this.ReplyText.trim().length > 0;\n }\n\n /** @deprecated Use {@link CanSendReply}. */\n get canSendReply(): boolean {\n return this.CanSendReply;\n }\n\n /**\n * Gets the reply count text\n */\n get ReplyCountText(): string {\n const count = this.Replies.length;\n return count === 1 ? '1 reply' : `${count} replies`;\n }\n\n /** @deprecated Use {@link ReplyCountText}. */\n get replyCountText(): string {\n return this.ReplyCountText;\n }\n}\n","<div class=\"thread-panel-overlay\" (click)=\"onClose()\"></div>\n\n<div class=\"thread-panel\">\n <div class=\"thread-header\">\n <div class=\"thread-title\">\n <i class=\"fa-solid fa-comments\"></i>\n <span>Thread</span>\n </div>\n <button class=\"close-btn\" (click)=\"onClose()\" title=\"Close thread\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n @if (isLoading) {\n <div class=\"thread-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading thread...</span>\n </div>\n }\n\n @if (errorMessage && !isLoading) {\n <div class=\"thread-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <span>{{ errorMessage }}</span>\n </div>\n }\n\n @if (!isLoading && !errorMessage && parentMessage) {\n <div class=\"thread-content\">\n <!-- Parent Message -->\n <div class=\"parent-message\">\n <div class=\"message-header\">\n <span class=\"message-sender\">{{ getSenderName(parentMessage) }}</span>\n <span class=\"message-time\">{{ getMessageTime(parentMessage) }}</span>\n </div>\n <div class=\"message-body\">\n {{ getMessageText(parentMessage) }}\n </div>\n <div class=\"reply-count\">\n <i class=\"fa-solid fa-reply\"></i>\n <span>{{ replyCountText }}</span>\n </div>\n </div>\n\n <!-- Replies List -->\n <div class=\"replies-container\">\n @if (replies.length === 0) {\n <div class=\"no-replies\">\n <i class=\"fa-solid fa-message\"></i>\n <span>No replies yet. Be the first to reply!</span>\n </div>\n }\n\n @for (reply of replies; track reply.ID) {\n <div class=\"reply-item\" [class.ai-reply]=\"reply.Role === 'AI'\">\n <div class=\"reply-header\">\n <span class=\"reply-sender\">{{ getSenderName(reply) }}</span>\n <span class=\"reply-time\">{{ getMessageTime(reply) }}</span>\n </div>\n <div class=\"reply-body\">\n {{ getMessageText(reply) }}\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Reply Input -->\n <div class=\"reply-input-container\">\n <textarea\n class=\"reply-input\"\n [(ngModel)]=\"replyText\"\n [disabled]=\"isSending\"\n placeholder=\"Reply to thread...\"\n rows=\"3\"\n (keydown.control.enter)=\"onSendReply()\"\n (keydown.meta.enter)=\"onSendReply()\">\n </textarea>\n <div class=\"reply-actions\">\n <button\n class=\"btn-send-reply\"\n [disabled]=\"!canSendReply\"\n (click)=\"onSendReply()\">\n <i class=\"fa-solid fa-paper-plane\"></i>\n <span>{{ isSending ? 'Sending...' : 'Reply' }}</span>\n </button>\n </div>\n </div>\n }\n</div>\n"]}
|
|
@@ -3,7 +3,11 @@ import { ToastService, Toast } from '../../services/toast.service';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ToastComponent implements OnInit, OnDestroy {
|
|
5
5
|
private toastService;
|
|
6
|
-
|
|
6
|
+
Toasts: Toast[];
|
|
7
|
+
/** @deprecated Use {@link Toasts}. */
|
|
8
|
+
get toasts(): Toast[];
|
|
9
|
+
/** @deprecated Use {@link Toasts}. */
|
|
10
|
+
set toasts(value: Toast[]);
|
|
7
11
|
private subscription;
|
|
8
12
|
constructor(toastService: ToastService);
|
|
9
13
|
ngOnInit(): void;
|
|
@@ -11,14 +15,20 @@ export declare class ToastComponent implements OnInit, OnDestroy {
|
|
|
11
15
|
/**
|
|
12
16
|
* Get the icon class for a toast type
|
|
13
17
|
*/
|
|
18
|
+
GetIconClass(type: string): string;
|
|
19
|
+
/** @deprecated Use {@link GetIconClass}. */
|
|
14
20
|
getIconClass(type: string): string;
|
|
15
21
|
/**
|
|
16
22
|
* Dismiss a toast
|
|
17
23
|
*/
|
|
24
|
+
Dismiss(toastId: string): void;
|
|
25
|
+
/** @deprecated Use {@link Dismiss}. */
|
|
18
26
|
dismiss(toastId: string): void;
|
|
19
27
|
/**
|
|
20
28
|
* Track toasts by ID for performance
|
|
21
29
|
*/
|
|
30
|
+
TrackByToastId(index: number, toast: Toast): string;
|
|
31
|
+
/** @deprecated Use {@link TrackByToastId}. */
|
|
22
32
|
trackByToastId(index: number, toast: Toast): string;
|
|
23
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
|
|
24
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "mj-toast", never, {}, {}, never, never, false, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/toast/toast.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG7D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;;AAEnE,qBAiBa,cAAe,YAAW,MAAM,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/toast/toast.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG7D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;;AAEnE,qBAiBa,cAAe,YAAW,MAAM,EAAE,SAAS;IAa1C,OAAO,CAAC,YAAY;IAZzB,MAAM,EAAE,KAAK,EAAE,CAAM;IAE5B,sCAAsC;IACtC,IAAW,MAAM,IAAI,KAAK,EAAE,CAE3B;IACD,sCAAsC;IACtC,IAAW,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,EAE/B;IACD,OAAO,CAAC,YAAY,CAA6B;gBAE7B,YAAY,EAAE,YAAY;IAE9C,QAAQ,IAAI,IAAI;IAMhB,WAAW,IAAI,IAAI;IAMnB;;OAEG;IACI,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAezC,4CAA4C;IACrC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIzC;;OAEG;IACI,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIrC,uCAAuC;IAChC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIrC;;OAEG;IACI,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM;IAI1D,8CAA8C;IACvC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM;yCAtE/C,cAAc;2CAAd,cAAc;CAyE1B"}
|
|
@@ -25,14 +25,22 @@ function ToastComponent_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
25
25
|
} }
|
|
26
26
|
export class ToastComponent {
|
|
27
27
|
toastService;
|
|
28
|
-
|
|
28
|
+
Toasts = [];
|
|
29
|
+
/** @deprecated Use {@link Toasts}. */
|
|
30
|
+
get toasts() {
|
|
31
|
+
return this.Toasts;
|
|
32
|
+
}
|
|
33
|
+
/** @deprecated Use {@link Toasts}. */
|
|
34
|
+
set toasts(value) {
|
|
35
|
+
this.Toasts = value;
|
|
36
|
+
}
|
|
29
37
|
subscription = null;
|
|
30
38
|
constructor(toastService) {
|
|
31
39
|
this.toastService = toastService;
|
|
32
40
|
}
|
|
33
41
|
ngOnInit() {
|
|
34
42
|
this.subscription = this.toastService.toasts$.subscribe(toasts => {
|
|
35
|
-
this.
|
|
43
|
+
this.Toasts = toasts;
|
|
36
44
|
});
|
|
37
45
|
}
|
|
38
46
|
ngOnDestroy() {
|
|
@@ -43,7 +51,7 @@ export class ToastComponent {
|
|
|
43
51
|
/**
|
|
44
52
|
* Get the icon class for a toast type
|
|
45
53
|
*/
|
|
46
|
-
|
|
54
|
+
GetIconClass(type) {
|
|
47
55
|
switch (type) {
|
|
48
56
|
case 'success':
|
|
49
57
|
return 'fa-solid fa-circle-check';
|
|
@@ -57,18 +65,30 @@ export class ToastComponent {
|
|
|
57
65
|
return 'fa-solid fa-circle-info';
|
|
58
66
|
}
|
|
59
67
|
}
|
|
68
|
+
/** @deprecated Use {@link GetIconClass}. */
|
|
69
|
+
getIconClass(type) {
|
|
70
|
+
return this.GetIconClass(type);
|
|
71
|
+
}
|
|
60
72
|
/**
|
|
61
73
|
* Dismiss a toast
|
|
62
74
|
*/
|
|
63
|
-
|
|
75
|
+
Dismiss(toastId) {
|
|
64
76
|
this.toastService.dismiss(toastId);
|
|
65
77
|
}
|
|
78
|
+
/** @deprecated Use {@link Dismiss}. */
|
|
79
|
+
dismiss(toastId) {
|
|
80
|
+
return this.Dismiss(toastId);
|
|
81
|
+
}
|
|
66
82
|
/**
|
|
67
83
|
* Track toasts by ID for performance
|
|
68
84
|
*/
|
|
69
|
-
|
|
85
|
+
TrackByToastId(index, toast) {
|
|
70
86
|
return toast.id;
|
|
71
87
|
}
|
|
88
|
+
/** @deprecated Use {@link TrackByToastId}. */
|
|
89
|
+
trackByToastId(index, toast) {
|
|
90
|
+
return this.TrackByToastId(index, toast);
|
|
91
|
+
}
|
|
72
92
|
static ɵfac = function ToastComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ToastComponent)(i0.ɵɵdirectiveInject(i1.ToastService)); };
|
|
73
93
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ToastComponent, selectors: [["mj-toast"]], standalone: false, decls: 3, vars: 0, consts: [[1, "toast-container"], [3, "class"], [1, "toast-content"], [1, "toast-icon"], [1, "toast-message"], ["aria-label", "Close notification", 1, "toast-close", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function ToastComponent_Template(rf, ctx) { if (rf & 1) {
|
|
74
94
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.component.js","sourceRoot":"","sources":["../../../../src/lib/components/toast/toast.component.ts","../../../../src/lib/components/toast/toast.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;;;;;ICKpE,AAJF,2BAGG,aAC0B;IACzB,uBAA6D;IAC7D,+BAA4B;IAAA,YAAmB;IAAA,iBAAO;IACtD,iCAIG;IAFD,qMAAS,2BAAiB,KAAC;IAG3B,uBAAiC;IAGvC,AADE,AADE,iBAAS,EACL,EACF;;;;IAdJ,cAAA,gDAAoC,CAAA;IACpC,oCAAU;IAGL,eAAkC;IAAlC,iDAAkC;IACT,eAAmB;IAAnB,sCAAmB;;ADcvD,MAAM,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"toast.component.js","sourceRoot":"","sources":["../../../../src/lib/components/toast/toast.component.ts","../../../../src/lib/components/toast/toast.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;;;;;ICKpE,AAJF,2BAGG,aAC0B;IACzB,uBAA6D;IAC7D,+BAA4B;IAAA,YAAmB;IAAA,iBAAO;IACtD,iCAIG;IAFD,qMAAS,2BAAiB,KAAC;IAG3B,uBAAiC;IAGvC,AADE,AADE,iBAAS,EACL,EACF;;;;IAdJ,cAAA,gDAAoC,CAAA;IACpC,oCAAU;IAGL,eAAkC;IAAlC,iDAAkC;IACT,eAAmB;IAAnB,sCAAmB;;ADcvD,MAAM,OAAO,cAAc;IAaL;IAZb,MAAM,GAAY,EAAE,CAAC;IAE5B,sCAAsC;IACtC,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,sCAAsC;IACtC,IAAW,MAAM,CAAC,KAAc;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IACO,YAAY,GAAwB,IAAI,CAAC;IAEjD,YAAoB,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAElD,QAAQ;QACN,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;YAC/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC,CAAC,C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EAAE,CAAC;wBACpD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAC7E,CAAC;oBACF,UAAU,CAAC,QAAQ,EAAE;wBACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAC/E,CAAC;iBACH,CAAC;aACH;;iFAEU,cAAc;cAjB1B,SAAS;6BACI,KAAK,YACP,UAAU,cAGR;oBACV,OAAO,CAAC,SAAS,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE;4BACnB,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4BACpD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC7E,CAAC;wBACF,UAAU,CAAC,QAAQ,EAAE;4BACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC/E,CAAC;qBACH,CAAC;iBACH;;kFAEU,cAAc","sourcesContent":["import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subscription } from 'rxjs';\nimport { ToastService, Toast } from '../../services/toast.service';\n\n@Component({\n standalone: false,\n selector: 'mj-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.css'],\n animations: [\n trigger('slideIn', [\n transition(':enter', [\n style({ transform: 'translateX(100%)', opacity: 0 }),\n animate('300ms ease-out', style({ transform: 'translateX(0)', opacity: 1 }))\n ]),\n transition(':leave', [\n animate('200ms ease-in', style({ transform: 'translateX(100%)', opacity: 0 }))\n ])\n ])\n ]\n})\nexport class ToastComponent implements OnInit, OnDestroy {\n public Toasts: Toast[] = [];\n\n /** @deprecated Use {@link Toasts}. */\n public get toasts(): Toast[] {\n return this.Toasts;\n }\n /** @deprecated Use {@link Toasts}. */\n public set toasts(value: Toast[]) {\n this.Toasts = value;\n }\n private subscription: Subscription | null = null;\n\n constructor(private toastService: ToastService) {}\n\n ngOnInit(): void {\n this.subscription = this.toastService.toasts$.subscribe(toasts => {\n this.Toasts = toasts;\n });\n }\n\n ngOnDestroy(): void {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n /**\n * Get the icon class for a toast type\n */\n public GetIconClass(type: string): string {\n switch (type) {\n case 'success':\n return 'fa-solid fa-circle-check';\n case 'error':\n return 'fa-solid fa-circle-xmark';\n case 'warning':\n return 'fa-solid fa-triangle-exclamation';\n case 'info':\n return 'fa-solid fa-circle-info';\n default:\n return 'fa-solid fa-circle-info';\n }\n }\n\n /** @deprecated Use {@link GetIconClass}. */\n public getIconClass(type: string): string {\n return this.GetIconClass(type);\n }\n\n /**\n * Dismiss a toast\n */\n public Dismiss(toastId: string): void {\n this.toastService.dismiss(toastId);\n }\n\n /** @deprecated Use {@link Dismiss}. */\n public dismiss(toastId: string): void {\n return this.Dismiss(toastId);\n }\n\n /**\n * Track toasts by ID for performance\n */\n public TrackByToastId(index: number, toast: Toast): string {\n return toast.id;\n }\n\n /** @deprecated Use {@link TrackByToastId}. */\n public trackByToastId(index: number, toast: Toast): string {\n return this.TrackByToastId(index, toast);\n }\n}\n","<div class=\"toast-container\">\n @for (toast of toasts; track trackByToastId($index, toast)) {\n <div\n class=\"toast toast-{{ toast.type }}\"\n [@slideIn]\n >\n <div class=\"toast-content\">\n <i [class]=\"getIconClass(toast.type)\" class=\"toast-icon\"></i>\n <span class=\"toast-message\">{{ toast.message }}</span>\n <button\n class=\"toast-close\"\n (click)=\"dismiss(toast.id)\"\n aria-label=\"Close notification\"\n >\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n </div>\n }\n</div>\n"]}
|