@memberjunction/ng-conversations 6.2.0-edge.0 → 6.2.0-edge.1
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 +35 -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 +1090 -123
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +2399 -706
- 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 +40 -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 +72 -14
- 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 +37 -5
- package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.js +82 -16
- 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 +549 -74
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +1250 -421
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +411 -29
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +896 -222
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +288 -29
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +561 -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 +887 -291
- 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 +103 -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 +26 -4
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +57 -18
- 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-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 +16 -2
- package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
- package/dist/lib/services/ui-command-handler.service.js +36 -8
- 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 +69 -0
- package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -0
- package/dist/lib/utils/agent-turn-routing.js +96 -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/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 +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +32 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.service.js","sourceRoot":"","sources":["../../../src/lib/services/export.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAY,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;;AAsFtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,cAAc;IACd,mBAAmB;IACnB,qBAAqB;IACrB,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,0BAA0B;IAC1B,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;CACjB,CAAC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,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;uGAhiBU,aAAa;gEAAb,aAAa,WAAb,aAAa,mBAFZ,MAAM;;iFAEP,aAAa;cAHzB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { MJConversationEntity, MJConversationDetailEntity } from '@memberjunction/core-entities';\nimport { RunView, UserInfo, Metadata, IMetadataProvider } from '@memberjunction/core';\n\nexport type ExportFormat = 'json' | 'markdown' | 'html' | 'text';\n\n/**\n * Branding applied to exported files, across EVERY format. HTML gets the full\n * treatment (theme colors, an inlined logo, the title, and a trademark footer);\n * JSON/markdown/text carry the title and trademark (markdown also references the\n * logo). Hosts supply this via `mj-conversation-chat-area`'s `exportBranding`\n * input. Color theming (`brandTokens`) is HTML-only — it has no meaning in the\n * data/plain-text formats.\n */\nexport interface ExportBranding {\n /**\n * CSS custom-property snapshot emitted as a `:root{}` block in the exported\n * document, so the export's stylesheet (which reads `var(--mj-…, fallback)`)\n * renders in the app's theme. HTML export only. Keys must be valid\n * custom-property names (`--like-this`). Entries are DROPPED when the key is\n * invalid or the value carries declaration-escape / network-call characters\n * (`<>{};@\\`, `url(`, `expression(`) — plain colors, `var()`, and\n * `color-mix()` pass. When omitted and `ExportOptions.includeTheme` is true,\n * the current theme is auto-snapshotted from `document.documentElement` (see\n * {@link DEFAULT_EXPORT_THEME_TOKENS}).\n */\n brandTokens?: Record<string, string>;\n /**\n * Logo URL. In HTML it is fetched and inlined as a data URI (so the file stays\n * self-contained) and rendered above the title — requires\n * `ExportOptions.includeCSS`, since it needs its stylesheet rule. In markdown it is\n * referenced by URL. JSON carries it as a string; plain text omits it.\n *\n * If the fetch fails, or the response isn't `content-type: image/*`, the raw URL is\n * emitted instead — so the exported file will reach out to that URL when opened.\n * There is no size or timeout guard on the fetch: a very large logo inflates the\n * export.\n */\n logoUrl?: string;\n /** Overrides the exported document's title (defaults to the conversation name). */\n title?: string;\n /**\n * A short trademark / attribution line (e.g. `© 2026 Acme Association ·\n * Powered by Betty`) rendered at the FOOT of the exported document: a styled HTML\n * footer, a markdown/text trailer, and a field in the JSON `branding` block.\n *\n * In HTML it needs its stylesheet rule, so — like the logo — it is emitted only when\n * `ExportOptions.includeCSS` is true. The markdown/text/JSON trailers have no such\n * dependency and always emit.\n *\n * NOT escaped for markdown: a value containing `_`, `]`, `)`, or a newline can break\n * the surrounding markdown. Supply plain text (HTML and JSON are escaped).\n */\n trademark?: string;\n}\n\nexport interface ExportOptions {\n includeMessages?: boolean;\n includeMetadata?: boolean;\n prettyPrint?: boolean;\n includeCSS?: boolean;\n /**\n * Emit the current app theme into the HTML export. When true and\n * `branding.brandTokens` is absent, the {@link DEFAULT_EXPORT_THEME_TOKENS}\n * are auto-snapshotted from the live document at export time. Default false —\n * an unthemed export renders exactly as before (the stylesheet's `var()`\n * fallbacks carry the legacy palette).\n *\n * Gates only the TOKEN auto-snapshot: a supplied `branding`'s `logoUrl`,\n * `title`, and `trademark` apply whenever `branding` is present — in HTML AND\n * in the JSON/markdown/text formats. (The export modal passes `branding`\n * through only while its \"Include branding\" checkbox is on, so in the UI flow\n * everything travels together.)\n */\n includeTheme?: boolean;\n /**\n * Which theme mode the snapshot captures — NOT whichever mode the app happens to be\n * in when the user clicks Export. Defaults to `'light'`: an export taken during a\n * dark session would otherwise bake dark text onto the page's white background and\n * come out unreadable. `'dark'` pairs the dark palette with the dark\n * `--mj-bg-page` the body rule applies, so the file is coherent either way.\n * HTML only — the data formats carry no colors.\n */\n themeMode?: 'light' | 'dark';\n /** Branding (tokens / logo / title) applied to the export — see {@link ExportBranding}. */\n branding?: ExportBranding;\n}\n\n/**\n * Tokens captured by the theme auto-snapshot — exactly the custom properties the\n * HTML export's stylesheet consumes. Hosts wanting more control supply their own\n * map via {@link ExportBranding.brandTokens} instead.\n */\nexport const DEFAULT_EXPORT_THEME_TOKENS: readonly string[] = [\n '--mj-bg-page',\n '--mj-text-primary',\n '--mj-text-secondary',\n '--mj-text-disabled',\n '--mj-border-default',\n '--mj-brand-primary',\n '--mj-brand-accent-subtle',\n '--mj-bg-surface-card',\n '--mj-font-family',\n '--mj-radius-md',\n];\n\n/** Internal: options with defaults applied (branding stays optional). */\ntype ResolvedExportOptions = Required<Omit<ExportOptions, 'branding'>> & Pick<ExportOptions, 'branding'>;\n\n/** Internal: the theme pieces resolved once per HTML export. */\ninterface ResolvedExportTheme {\n /** `<style>:root{…}</style>` block (empty string when no tokens resolved). */\n rootBlock: string;\n /** Inlined logo (data URI, or the raw URL on fetch failure); null = no logo. */\n logoDataUri: string | null;\n /** Document-title override; null = use the conversation name. */\n title: string | null;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ExportService {\n private _provider: IMetadataProvider | null = null;\n\n /**\n * Set the metadata provider this service should use. When unset, falls back to Metadata.Provider.\n */\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n async exportConversation(\n conversationId: string,\n format: ExportFormat,\n currentUser: UserInfo,\n options: ExportOptions = {}\n ): Promise<void> {\n const conversation = await this.loadConversationData(conversationId, currentUser);\n const { content, filename, mimeType } = await this.BuildExportContent(conversation, format, options);\n this.downloadFile(content, filename, mimeType);\n }\n\n /**\n * Build the export document for already-loaded conversation data — the\n * download-free seam of {@link exportConversation}. Async because HTML-format\n * branding may inline a logo. Exposed publicly so hosts (and tests) can build\n * export content without triggering a browser download.\n */\n public async BuildExportContent(\n data: { conversation: MJConversationEntity; details: MJConversationDetailEntity[] },\n format: ExportFormat,\n options: ExportOptions = {}\n ): Promise<{ content: string; filename: string; mimeType: string }> {\n const exportOptions: ResolvedExportOptions = {\n includeMessages: options.includeMessages ?? true,\n includeMetadata: options.includeMetadata ?? true,\n prettyPrint: options.prettyPrint ?? true,\n includeCSS: options.includeCSS ?? true,\n includeTheme: options.includeTheme ?? false,\n themeMode: options.themeMode ?? 'light',\n branding: options.branding\n };\n const baseName = `conversation-${data.conversation.Name}-${this.getTimestamp()}`;\n\n switch (format) {\n case 'json':\n return { content: this.exportAsJSON(data, exportOptions), filename: `${baseName}.json`, mimeType: 'application/json' };\n case 'markdown':\n return { content: this.exportAsMarkdown(data, exportOptions), filename: `${baseName}.md`, mimeType: 'text/markdown' };\n case 'html':\n return {\n content: this.exportAsHTML(data, exportOptions, await this.resolveTheme(exportOptions)),\n filename: `${baseName}.html`,\n mimeType: 'text/html'\n };\n case 'text':\n return { content: this.exportAsText(data, exportOptions), filename: `${baseName}.txt`, mimeType: 'text/plain' };\n default:\n throw new Error(`Unsupported export format: ${format}`);\n }\n }\n\n /**\n * Snapshot the given theme tokens from the live document. Empty/unset tokens are\n * skipped.\n *\n * `mode` captures a SPECIFIC palette rather than whatever the app is rendering right\n * now. Without it, exporting from a dark session bakes dark text onto the export's\n * white page and the file is unreadable. When the requested mode isn't the active one,\n * `data-theme` is flipped on `documentElement`, read, and restored — all synchronous\n * within one task, so the browser never paints the intermediate state. Omit `mode`\n * to read the live values as-is.\n */\n public SnapshotBrandTokens(\n tokens: readonly string[] = DEFAULT_EXPORT_THEME_TOKENS,\n mode?: 'light' | 'dark'\n ): Record<string, string> {\n const root = document.documentElement;\n const previous = root.getAttribute('data-theme');\n // The app's two real states are `data-theme=\"dark\"` and NO attribute at all —\n // `MJExplorerAppComponent` removes it for light rather than writing \"light\"\n // (explorer-app.component.ts). Reproduce those exactly rather than inventing a\n // third state, so the transient DOM is one the stylesheet has actually seen.\n const wantDark = mode === 'dark';\n const isDark = previous === 'dark';\n const mustSwap = mode != null && wantDark !== isDark;\n\n if (mustSwap) {\n if (wantDark) {\n root.setAttribute('data-theme', 'dark');\n } else {\n root.removeAttribute('data-theme');\n }\n }\n try {\n const style = getComputedStyle(root);\n const out: Record<string, string> = {};\n for (const token of tokens) {\n const value = style.getPropertyValue(token).trim();\n if (value) {\n out[token] = value;\n }\n }\n return out;\n } finally {\n // Restore even if reading throws — never strand the app in the other theme.\n if (mustSwap) {\n if (previous === null) {\n root.removeAttribute('data-theme');\n } else {\n root.setAttribute('data-theme', previous);\n }\n }\n }\n }\n\n /** Resolve the HTML export's theme pieces once: tokens (explicit > snapshot), logo, title. */\n private async resolveTheme(options: ResolvedExportOptions): Promise<ResolvedExportTheme> {\n const tokens = this.resolveBrandTokens(options);\n const rootBlock = tokens ? this.buildRootBlock(tokens) : '';\n const logoUrl = options.branding?.logoUrl?.trim();\n return {\n rootBlock,\n // The logo needs its `.brand-logo` rule (as the trademark footer needs its own),\n // so both are gated on includeCSS — a CSS-less export must never carry a\n // full-size unstyled logo. The modal enforces this too, but the public\n // BuildExportContent seam has to hold the line on its own.\n logoDataUri: options.includeCSS && logoUrl ? await this.inlineLogo(logoUrl) : null,\n // The title is deliberately NOT includeCSS-gated: it lands in <title>/<h1>, needs\n // no stylesheet, and is the one branding field every format carries unconditionally.\n title: options.branding?.title?.trim() || null\n };\n }\n\n /** Explicit host tokens win; `includeTheme` falls back to a live snapshot; else no theme. */\n private resolveBrandTokens(options: ResolvedExportOptions): Record<string, string> | null {\n const explicit = options.branding?.brandTokens;\n if (explicit && Object.keys(explicit).length > 0) {\n return explicit;\n }\n return options.includeTheme ? this.SnapshotBrandTokens(DEFAULT_EXPORT_THEME_TOKENS, options.themeMode) : null;\n }\n\n /** Document title used by every format: branding override → conversation name → generic. */\n private resolveTitle(\n data: { conversation: MJConversationEntity; details: MJConversationDetailEntity[] },\n options: ResolvedExportOptions\n ): string {\n return options.branding?.title?.trim() || data.conversation.Name || 'Conversation';\n }\n\n /**\n * The JSON `branding` block — the data-format analogue of the HTML header +\n * trademark footer. Carries the title, trademark, and logo URL the host set;\n * null when no branding (or none of those fields) is present. Theme color\n * tokens are HTML-only and never included here.\n */\n private buildBrandingBlock(options: ResolvedExportOptions): Record<string, string> | null {\n const b = options.branding;\n if (!b) {\n return null;\n }\n const block: Record<string, string> = {};\n const title = b.title?.trim();\n const trademark = b.trademark?.trim();\n const logoUrl = b.logoUrl?.trim();\n if (title) block.title = title;\n if (trademark) block.trademark = trademark;\n if (logoUrl) block.logoUrl = logoUrl;\n return Object.keys(block).length > 0 ? block : null;\n }\n\n /**\n * CSS functions permitted inside an exported token value. This is an ALLOWLIST\n * (not a blocklist) so no network-capable function can slip through: blocking\n * only `url(`/`expression(` let `image-set()`, `-webkit-image-set()`,\n * `cross-fade()`, `image()`, and `src()` fetch a beacon URL without ever\n * writing the literal `url(`. Anything not on this list drops the whole entry.\n * The set is the safe value/color-math functions the export could legitimately\n * carry; extend it only with functions that CANNOT load an external resource.\n */\n private static readonly SAFE_CSS_FUNCTIONS = new Set([\n 'var', 'calc', 'min', 'max', 'clamp',\n 'rgb', 'rgba', 'hsl', 'hsla', 'hwb', 'lab', 'lch', 'oklab', 'oklch',\n 'color', 'color-mix',\n ]);\n\n /**\n * Emit the sanitized `:root{}` style block. Keys must be custom-property names.\n * A value is REJECTED (the entry is dropped, not stripped) when it carries any\n * declaration/tag-escape or network-reach vector: `<>{}` (tag/rule breakout),\n * `;` (declaration breakout — e.g. `; background: url(beacon)`), `\\` (CSS\n * escapes), `@` (at-rules), OR any CSS function not in\n * {@link SAFE_CSS_FUNCTIONS} (which excludes every resource-loading function —\n * url/image-set/cross-fade/image/src/expression/…). Plain colors, `var()`, and\n * `color-mix()` pass untouched.\n */\n private buildRootBlock(tokens: Record<string, string>): string {\n const rules: string[] = [];\n for (const [key, rawValue] of Object.entries(tokens)) {\n if (!/^--[A-Za-z0-9_-]+$/.test(key)) {\n continue;\n }\n const value = String(rawValue).trim();\n if (!value || /[<>{};@\\\\]/.test(value) || this.hasUnsafeCssFunction(value)) {\n continue;\n }\n rules.push(`${key}: ${value};`);\n }\n return rules.length > 0 ? `\n <style>:root { ${rules.join(' ')} }</style>` : '';\n }\n\n /** True if the value calls any CSS function outside {@link SAFE_CSS_FUNCTIONS}. */\n private hasUnsafeCssFunction(value: string): boolean {\n // Every `name(` occurrence — the identifier immediately before a '('.\n const calls = value.match(/([a-zA-Z][a-zA-Z-]*)\\s*\\(/g) ?? [];\n return calls.some((c) => {\n const name = c.replace(/\\s*\\($/, '').toLowerCase();\n return !ExportService.SAFE_CSS_FUNCTIONS.has(name);\n });\n }\n\n /** Fetch → data URI so the export stays self-contained; raw URL on any failure\n * (or when the response isn't actually an image — don't inline HTML/other as\n * a bogus `data:` image). */\n private async inlineLogo(url: string): Promise<string> {\n try {\n const response = await fetch(url);\n if (!response.ok) {\n return url;\n }\n const contentType = response.headers.get('content-type') ?? '';\n if (!/^image\\//i.test(contentType)) {\n return url;\n }\n const blob = await response.blob();\n return await new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(String(reader.result));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n } catch {\n return url;\n }\n }\n\n private async loadConversationData(\n conversationId: string,\n currentUser: UserInfo\n ): Promise<{ conversation: MJConversationEntity; details: MJConversationDetailEntity[] }> {\n const rv = RunView.FromMetadataProvider(this.Provider);\n\n // Load conversation and details in parallel\n const [conversationResult, detailsResult] = await rv.RunViews([\n {\n EntityName: 'MJ: Conversations',\n ExtraFilter: `ID='${conversationId}'`,\n ResultType: 'entity_object'\n },\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `ConversationID='${conversationId}'`,\n OrderBy: 'Sequence ASC',\n ResultType: 'entity_object'\n }\n ], currentUser);\n\n if (!conversationResult.Success || !conversationResult.Results?.length) {\n throw new Error('Conversation not found');\n }\n\n return {\n conversation: conversationResult.Results[0] as MJConversationEntity,\n details: (detailsResult.Results || []) as MJConversationDetailEntity[]\n };\n }\n\n private exportAsJSON(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions\n ): string {\n const exportData: Record<string, unknown> = {};\n\n // Add metadata if requested\n if (options.includeMetadata) {\n exportData.conversation = {\n id: data.conversation.ID,\n name: data.conversation.Name,\n description: data.conversation.Description,\n createdAt: data.conversation.__mj_CreatedAt,\n updatedAt: data.conversation.__mj_UpdatedAt\n };\n } else {\n exportData.conversation = {\n name: data.conversation.Name\n };\n }\n\n // Branding block (title / trademark / logo) when the host supplied branding —\n // the data-format analogue of the HTML header + trademark footer.\n const branding = this.buildBrandingBlock(options);\n if (branding) {\n exportData.branding = branding;\n }\n\n // Add messages if requested\n if (options.includeMessages) {\n exportData.messages = data.details.map((detail, index) => {\n const message: Record<string, unknown> = {\n role: detail.Role,\n message: detail.Message\n };\n\n if (options.includeMetadata) {\n message.id = detail.ID;\n message.sequence = index + 1;\n message.timestamp = detail.__mj_CreatedAt;\n }\n\n return message;\n });\n }\n\n // Use pretty print option\n return JSON.stringify(exportData, null, options.prettyPrint ? 2 : 0);\n }\n\n private exportAsMarkdown(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions\n ): string {\n const logoUrl = options.branding?.logoUrl?.trim();\n // Unbranded markdown must stay byte-identical to before (`# <Name>`), so DON'T\n // route through resolveTitle's 'Conversation' fallback here — only a supplied\n // branding title overrides the raw conversation name.\n const title = options.branding?.title?.trim() || data.conversation.Name;\n let md = '';\n if (logoUrl) {\n md += `\\n\\n`;\n }\n md += `# ${title}\\n\\n`;\n\n if (data.conversation.Description) {\n md += `${data.conversation.Description}\\n\\n`;\n }\n\n if (options.includeMetadata) {\n md += `**Created:** ${this.formatDate(data.conversation.__mj_CreatedAt)}\\n\\n`;\n }\n\n md += `---\\n\\n`;\n\n if (options.includeMessages) {\n for (const detail of data.details) {\n md += `## ${this.capitalizeRole(detail.Role || 'Unknown')}\\n\\n`;\n md += `${detail.Message}\\n\\n`;\n\n if (options.includeMetadata) {\n md += `*${this.formatDate(detail.__mj_CreatedAt)}*\\n\\n`;\n }\n\n md += `---\\n\\n`;\n }\n }\n\n const trademark = options.branding?.trademark?.trim();\n if (trademark) {\n md += `_${trademark}_\\n`;\n }\n\n return md;\n }\n\n private exportAsHTML(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions,\n theme: ResolvedExportTheme\n ): string {\n const trademark = options.branding?.trademark?.trim();\n // Every color reads a theme token with the legacy hex as its fallback, so an\n // unthemed export (no :root block emitted) renders exactly as it always has,\n // while a themed one follows the app's palette.\n const styles = options.includeCSS ? `\n <style>\n body { font-family: var(--mj-font-family, system-ui, -apple-system, sans-serif); background: var(--mj-bg-page, #fff); color: var(--mj-text-primary, #333); max-width: 800px; margin: 40px auto; padding: 0 20px; line-height: 1.6; }\n h1 { color: var(--mj-text-primary, #333); border-bottom: 2px solid var(--mj-brand-primary, #007bff); padding-bottom: 10px; }\n .meta { color: var(--mj-text-secondary, #666); font-size: 14px; margin-bottom: 30px; }\n .message { margin-bottom: 30px; padding: 20px; border-radius: var(--mj-radius-md, 8px); background: var(--mj-bg-surface-card, #f5f5f5); }\n .message.user { background: var(--mj-brand-accent-subtle, #e3f2fd); }\n .message.assistant { background: var(--mj-bg-surface-card, #f5f5f5); }\n .role { font-weight: 600; color: var(--mj-brand-primary, #007bff); margin-bottom: 10px; }\n .content { white-space: pre-wrap; }\n .timestamp { color: var(--mj-text-disabled, #999); font-size: 12px; margin-top: 10px; }${theme.logoDataUri ? `\n .brand-logo { display: block; max-height: 48px; margin-bottom: 12px; }` : ''}${trademark ? `\n .brand-trademark { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--mj-border-default, #ddd); color: var(--mj-text-secondary, #666); font-size: 12px; text-align: center; }` : ''}\n </style>${theme.rootBlock}` : '';\n\n const title = theme.title ?? (data.conversation.Name || 'Conversation');\n let html = `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${this.escapeHtml(title)}</title>${styles}\n</head>\n<body>\n ${theme.logoDataUri ? `<img class=\"brand-logo\" src=\"${this.escapeAttr(theme.logoDataUri)}\" alt=\"\" />\n ` : ''}<h1>${this.escapeHtml(title)}</h1>`;\n\n if (options.includeMetadata) {\n html += `\n <div class=\"meta\">\n ${data.conversation.Description ? `<p>${this.escapeHtml(data.conversation.Description)}</p>` : ''}\n <p>Created: ${this.formatDate(data.conversation.__mj_CreatedAt)}</p>\n </div>`;\n }\n\n if (options.includeMessages) {\n for (const detail of data.details) {\n const roleClass = detail.Role?.toLowerCase() || 'unknown';\n html += `\n <div class=\"message ${roleClass}\">\n <div class=\"role\">${this.capitalizeRole(detail.Role || 'Unknown')}</div>\n <div class=\"content\">${this.escapeHtml(detail.Message || '')}</div>`;\n\n if (options.includeMetadata) {\n html += `\n <div class=\"timestamp\">${this.formatDate(detail.__mj_CreatedAt)}</div>`;\n }\n\n html += `\n </div>`;\n }\n }\n\n if (options.includeCSS && trademark) {\n html += `\n <footer class=\"brand-trademark\">${this.escapeHtml(trademark)}</footer>`;\n }\n\n html += `\n</body>\n</html>`;\n\n return html;\n }\n\n private exportAsText(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions\n ): string {\n const name = this.resolveTitle(data, options) || 'Conversation';\n let text = `${name}\\n`;\n text += '='.repeat(name.length) + '\\n\\n';\n\n if (data.conversation.Description) {\n text += `${data.conversation.Description}\\n\\n`;\n }\n\n if (options.includeMetadata) {\n text += `Created: ${this.formatDate(data.conversation.__mj_CreatedAt)}\\n\\n`;\n }\n\n text += '-'.repeat(80) + '\\n\\n';\n\n if (options.includeMessages) {\n for (const detail of data.details) {\n text += `[${this.capitalizeRole(detail.Role || 'Unknown')}]\\n`;\n text += `${detail.Message}\\n`;\n\n if (options.includeMetadata) {\n text += `(${this.formatDate(detail.__mj_CreatedAt)})\\n`;\n }\n\n text += '\\n' + '-'.repeat(80) + '\\n\\n';\n }\n }\n\n const trademark = options.branding?.trademark?.trim();\n if (trademark) {\n text += `${trademark}\\n`;\n }\n\n return text;\n }\n\n private downloadFile(content: string, filename: string, mimeType: string): void {\n const blob = new Blob([content], { type: mimeType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n }\n\n private formatDate(date: Date | string): string {\n const d = new Date(date);\n return d.toLocaleString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit'\n });\n }\n\n private capitalizeRole(role: string): string {\n return role.charAt(0).toUpperCase() + role.slice(1).toLowerCase();\n }\n\n private escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n /** escapeHtml + quote escaping — for values interpolated into HTML attributes. */\n private escapeAttr(text: string): string {\n return this.escapeHtml(text).replace(/\"/g, '"');\n }\n\n private getTimestamp(): string {\n const now = new Date();\n return now.toISOString().replace(/[:.]/g, '-').slice(0, -5);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"export.service.js","sourceRoot":"","sources":["../../../src/lib/services/export.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAY,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;;AAsFtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,cAAc;IACd,mBAAmB;IACnB,qBAAqB;IACrB,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,0BAA0B;IAC1B,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;CACjB,CAAC;AAkBF,MAAM,OAAO,aAAa;IAChB,SAAS,GAA6B,IAAI,CAAC;IAEnD;;OAEG;IACH,IAAW,QAAQ,CAAC,KAA+B;QAC/C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAW,QA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AC;IACvD,CAAC;IAEO,YAAY;QAClB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;uGA1iBU,aAAa;gEAAb,aAAa,WAAb,aAAa,mBAFZ,MAAM;;iFAEP,aAAa;cAHzB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { MJConversationEntity, MJConversationDetailEntity } from '@memberjunction/core-entities';\nimport { RunView, UserInfo, Metadata, IMetadataProvider } from '@memberjunction/core';\n\nexport type ExportFormat = 'json' | 'markdown' | 'html' | 'text';\n\n/**\n * Branding applied to exported files, across EVERY format. HTML gets the full\n * treatment (theme colors, an inlined logo, the title, and a trademark footer);\n * JSON/markdown/text carry the title and trademark (markdown also references the\n * logo). Hosts supply this via `mj-conversation-chat-area`'s `exportBranding`\n * input. Color theming (`brandTokens`) is HTML-only — it has no meaning in the\n * data/plain-text formats.\n */\nexport interface ExportBranding {\n /**\n * CSS custom-property snapshot emitted as a `:root{}` block in the exported\n * document, so the export's stylesheet (which reads `var(--mj-…, fallback)`)\n * renders in the app's theme. HTML export only. Keys must be valid\n * custom-property names (`--like-this`). Entries are DROPPED when the key is\n * invalid or the value carries declaration-escape / network-call characters\n * (`<>{};@\\`, `url(`, `expression(`) — plain colors, `var()`, and\n * `color-mix()` pass. When omitted and `ExportOptions.includeTheme` is true,\n * the current theme is auto-snapshotted from `document.documentElement` (see\n * {@link DEFAULT_EXPORT_THEME_TOKENS}).\n */\n brandTokens?: Record<string, string>;\n /**\n * Logo URL. In HTML it is fetched and inlined as a data URI (so the file stays\n * self-contained) and rendered above the title — requires\n * `ExportOptions.includeCSS`, since it needs its stylesheet rule. In markdown it is\n * referenced by URL. JSON carries it as a string; plain text omits it.\n *\n * If the fetch fails, or the response isn't `content-type: image/*`, the raw URL is\n * emitted instead — so the exported file will reach out to that URL when opened.\n * There is no size or timeout guard on the fetch: a very large logo inflates the\n * export.\n */\n logoUrl?: string;\n /** Overrides the exported document's title (defaults to the conversation name). */\n title?: string;\n /**\n * A short trademark / attribution line (e.g. `© 2026 Acme Association ·\n * Powered by Betty`) rendered at the FOOT of the exported document: a styled HTML\n * footer, a markdown/text trailer, and a field in the JSON `branding` block.\n *\n * In HTML it needs its stylesheet rule, so — like the logo — it is emitted only when\n * `ExportOptions.includeCSS` is true. The markdown/text/JSON trailers have no such\n * dependency and always emit.\n *\n * NOT escaped for markdown: a value containing `_`, `]`, `)`, or a newline can break\n * the surrounding markdown. Supply plain text (HTML and JSON are escaped).\n */\n trademark?: string;\n}\n\nexport interface ExportOptions {\n includeMessages?: boolean;\n includeMetadata?: boolean;\n prettyPrint?: boolean;\n includeCSS?: boolean;\n /**\n * Emit the current app theme into the HTML export. When true and\n * `branding.brandTokens` is absent, the {@link DEFAULT_EXPORT_THEME_TOKENS}\n * are auto-snapshotted from the live document at export time. Default false —\n * an unthemed export renders exactly as before (the stylesheet's `var()`\n * fallbacks carry the legacy palette).\n *\n * Gates only the TOKEN auto-snapshot: a supplied `branding`'s `logoUrl`,\n * `title`, and `trademark` apply whenever `branding` is present — in HTML AND\n * in the JSON/markdown/text formats. (The export modal passes `branding`\n * through only while its \"Include branding\" checkbox is on, so in the UI flow\n * everything travels together.)\n */\n includeTheme?: boolean;\n /**\n * Which theme mode the snapshot captures — NOT whichever mode the app happens to be\n * in when the user clicks Export. Defaults to `'light'`: an export taken during a\n * dark session would otherwise bake dark text onto the page's white background and\n * come out unreadable. `'dark'` pairs the dark palette with the dark\n * `--mj-bg-page` the body rule applies, so the file is coherent either way.\n * HTML only — the data formats carry no colors.\n */\n themeMode?: 'light' | 'dark';\n /** Branding (tokens / logo / title) applied to the export — see {@link ExportBranding}. */\n branding?: ExportBranding;\n}\n\n/**\n * Tokens captured by the theme auto-snapshot — exactly the custom properties the\n * HTML export's stylesheet consumes. Hosts wanting more control supply their own\n * map via {@link ExportBranding.brandTokens} instead.\n */\nexport const DEFAULT_EXPORT_THEME_TOKENS: readonly string[] = [\n '--mj-bg-page',\n '--mj-text-primary',\n '--mj-text-secondary',\n '--mj-text-disabled',\n '--mj-border-default',\n '--mj-brand-primary',\n '--mj-brand-accent-subtle',\n '--mj-bg-surface-card',\n '--mj-font-family',\n '--mj-radius-md',\n];\n\n/** Internal: options with defaults applied (branding stays optional). */\ntype ResolvedExportOptions = Required<Omit<ExportOptions, 'branding'>> & Pick<ExportOptions, 'branding'>;\n\n/** Internal: the theme pieces resolved once per HTML export. */\ninterface ResolvedExportTheme {\n /** `<style>:root{…}</style>` block (empty string when no tokens resolved). */\n rootBlock: string;\n /** Inlined logo (data URI, or the raw URL on fetch failure); null = no logo. */\n logoDataUri: string | null;\n /** Document-title override; null = use the conversation name. */\n title: string | null;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ExportService {\n private _provider: IMetadataProvider | null = null;\n\n /**\n * Set the metadata provider this service should use. When unset, falls back to Metadata.Provider.\n */\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n async ExportConversation(\n conversationId: string,\n format: ExportFormat,\n currentUser: UserInfo,\n options: ExportOptions = {}\n ): Promise<void> {\n const conversation = await this.loadConversationData(conversationId, currentUser);\n const { content, filename, mimeType } = await this.BuildExportContent(conversation, format, options);\n this.downloadFile(content, filename, mimeType);\n }\n\n /** @deprecated Use {@link ExportConversation}. */\n async exportConversation(\n conversationId: string,\n format: ExportFormat,\n currentUser: UserInfo,\n options: ExportOptions = {}\n ): Promise<void> {\n return this.ExportConversation(conversationId, format, currentUser, options);\n }\n\n /**\n * Build the export document for already-loaded conversation data — the\n * download-free seam of {@link exportConversation}. Async because HTML-format\n * branding may inline a logo. Exposed publicly so hosts (and tests) can build\n * export content without triggering a browser download.\n */\n public async BuildExportContent(\n data: { conversation: MJConversationEntity; details: MJConversationDetailEntity[] },\n format: ExportFormat,\n options: ExportOptions = {}\n ): Promise<{ content: string; filename: string; mimeType: string }> {\n const exportOptions: ResolvedExportOptions = {\n includeMessages: options.includeMessages ?? true,\n includeMetadata: options.includeMetadata ?? true,\n prettyPrint: options.prettyPrint ?? true,\n includeCSS: options.includeCSS ?? true,\n includeTheme: options.includeTheme ?? false,\n themeMode: options.themeMode ?? 'light',\n branding: options.branding\n };\n const baseName = `conversation-${data.conversation.Name}-${this.getTimestamp()}`;\n\n switch (format) {\n case 'json':\n return { content: this.exportAsJSON(data, exportOptions), filename: `${baseName}.json`, mimeType: 'application/json' };\n case 'markdown':\n return { content: this.exportAsMarkdown(data, exportOptions), filename: `${baseName}.md`, mimeType: 'text/markdown' };\n case 'html':\n return {\n content: this.exportAsHTML(data, exportOptions, await this.resolveTheme(exportOptions)),\n filename: `${baseName}.html`,\n mimeType: 'text/html'\n };\n case 'text':\n return { content: this.exportAsText(data, exportOptions), filename: `${baseName}.txt`, mimeType: 'text/plain' };\n default:\n throw new Error(`Unsupported export format: ${format}`);\n }\n }\n\n /**\n * Snapshot the given theme tokens from the live document. Empty/unset tokens are\n * skipped.\n *\n * `mode` captures a SPECIFIC palette rather than whatever the app is rendering right\n * now. Without it, exporting from a dark session bakes dark text onto the export's\n * white page and the file is unreadable. When the requested mode isn't the active one,\n * `data-theme` is flipped on `documentElement`, read, and restored — all synchronous\n * within one task, so the browser never paints the intermediate state. Omit `mode`\n * to read the live values as-is.\n */\n public SnapshotBrandTokens(\n tokens: readonly string[] = DEFAULT_EXPORT_THEME_TOKENS,\n mode?: 'light' | 'dark'\n ): Record<string, string> {\n const root = document.documentElement;\n const previous = root.getAttribute('data-theme');\n // The app's two real states are `data-theme=\"dark\"` and NO attribute at all —\n // `MJExplorerAppComponent` removes it for light rather than writing \"light\"\n // (explorer-app.component.ts). Reproduce those exactly rather than inventing a\n // third state, so the transient DOM is one the stylesheet has actually seen.\n const wantDark = mode === 'dark';\n const isDark = previous === 'dark';\n const mustSwap = mode != null && wantDark !== isDark;\n\n if (mustSwap) {\n if (wantDark) {\n root.setAttribute('data-theme', 'dark');\n } else {\n root.removeAttribute('data-theme');\n }\n }\n try {\n const style = getComputedStyle(root);\n const out: Record<string, string> = {};\n for (const token of tokens) {\n const value = style.getPropertyValue(token).trim();\n if (value) {\n out[token] = value;\n }\n }\n return out;\n } finally {\n // Restore even if reading throws — never strand the app in the other theme.\n if (mustSwap) {\n if (previous === null) {\n root.removeAttribute('data-theme');\n } else {\n root.setAttribute('data-theme', previous);\n }\n }\n }\n }\n\n /** Resolve the HTML export's theme pieces once: tokens (explicit > snapshot), logo, title. */\n private async resolveTheme(options: ResolvedExportOptions): Promise<ResolvedExportTheme> {\n const tokens = this.resolveBrandTokens(options);\n const rootBlock = tokens ? this.buildRootBlock(tokens) : '';\n const logoUrl = options.branding?.logoUrl?.trim();\n return {\n rootBlock,\n // The logo needs its `.brand-logo` rule (as the trademark footer needs its own),\n // so both are gated on includeCSS — a CSS-less export must never carry a\n // full-size unstyled logo. The modal enforces this too, but the public\n // BuildExportContent seam has to hold the line on its own.\n logoDataUri: options.includeCSS && logoUrl ? await this.inlineLogo(logoUrl) : null,\n // The title is deliberately NOT includeCSS-gated: it lands in <title>/<h1>, needs\n // no stylesheet, and is the one branding field every format carries unconditionally.\n title: options.branding?.title?.trim() || null\n };\n }\n\n /** Explicit host tokens win; `includeTheme` falls back to a live snapshot; else no theme. */\n private resolveBrandTokens(options: ResolvedExportOptions): Record<string, string> | null {\n const explicit = options.branding?.brandTokens;\n if (explicit && Object.keys(explicit).length > 0) {\n return explicit;\n }\n return options.includeTheme ? this.SnapshotBrandTokens(DEFAULT_EXPORT_THEME_TOKENS, options.themeMode) : null;\n }\n\n /** Document title used by every format: branding override → conversation name → generic. */\n private resolveTitle(\n data: { conversation: MJConversationEntity; details: MJConversationDetailEntity[] },\n options: ResolvedExportOptions\n ): string {\n return options.branding?.title?.trim() || data.conversation.Name || 'Conversation';\n }\n\n /**\n * The JSON `branding` block — the data-format analogue of the HTML header +\n * trademark footer. Carries the title, trademark, and logo URL the host set;\n * null when no branding (or none of those fields) is present. Theme color\n * tokens are HTML-only and never included here.\n */\n private buildBrandingBlock(options: ResolvedExportOptions): Record<string, string> | null {\n const b = options.branding;\n if (!b) {\n return null;\n }\n const block: Record<string, string> = {};\n const title = b.title?.trim();\n const trademark = b.trademark?.trim();\n const logoUrl = b.logoUrl?.trim();\n if (title) block.title = title;\n if (trademark) block.trademark = trademark;\n if (logoUrl) block.logoUrl = logoUrl;\n return Object.keys(block).length > 0 ? block : null;\n }\n\n /**\n * CSS functions permitted inside an exported token value. This is an ALLOWLIST\n * (not a blocklist) so no network-capable function can slip through: blocking\n * only `url(`/`expression(` let `image-set()`, `-webkit-image-set()`,\n * `cross-fade()`, `image()`, and `src()` fetch a beacon URL without ever\n * writing the literal `url(`. Anything not on this list drops the whole entry.\n * The set is the safe value/color-math functions the export could legitimately\n * carry; extend it only with functions that CANNOT load an external resource.\n */\n private static readonly SAFE_CSS_FUNCTIONS = new Set([\n 'var', 'calc', 'min', 'max', 'clamp',\n 'rgb', 'rgba', 'hsl', 'hsla', 'hwb', 'lab', 'lch', 'oklab', 'oklch',\n 'color', 'color-mix',\n ]);\n\n /**\n * Emit the sanitized `:root{}` style block. Keys must be custom-property names.\n * A value is REJECTED (the entry is dropped, not stripped) when it carries any\n * declaration/tag-escape or network-reach vector: `<>{}` (tag/rule breakout),\n * `;` (declaration breakout — e.g. `; background: url(beacon)`), `\\` (CSS\n * escapes), `@` (at-rules), OR any CSS function not in\n * {@link SAFE_CSS_FUNCTIONS} (which excludes every resource-loading function —\n * url/image-set/cross-fade/image/src/expression/…). Plain colors, `var()`, and\n * `color-mix()` pass untouched.\n */\n private buildRootBlock(tokens: Record<string, string>): string {\n const rules: string[] = [];\n for (const [key, rawValue] of Object.entries(tokens)) {\n if (!/^--[A-Za-z0-9_-]+$/.test(key)) {\n continue;\n }\n const value = String(rawValue).trim();\n if (!value || /[<>{};@\\\\]/.test(value) || this.hasUnsafeCssFunction(value)) {\n continue;\n }\n rules.push(`${key}: ${value};`);\n }\n return rules.length > 0 ? `\n <style>:root { ${rules.join(' ')} }</style>` : '';\n }\n\n /** True if the value calls any CSS function outside {@link SAFE_CSS_FUNCTIONS}. */\n private hasUnsafeCssFunction(value: string): boolean {\n // Every `name(` occurrence — the identifier immediately before a '('.\n const calls = value.match(/([a-zA-Z][a-zA-Z-]*)\\s*\\(/g) ?? [];\n return calls.some((c) => {\n const name = c.replace(/\\s*\\($/, '').toLowerCase();\n return !ExportService.SAFE_CSS_FUNCTIONS.has(name);\n });\n }\n\n /** Fetch → data URI so the export stays self-contained; raw URL on any failure\n * (or when the response isn't actually an image — don't inline HTML/other as\n * a bogus `data:` image). */\n private async inlineLogo(url: string): Promise<string> {\n try {\n const response = await fetch(url);\n if (!response.ok) {\n return url;\n }\n const contentType = response.headers.get('content-type') ?? '';\n if (!/^image\\//i.test(contentType)) {\n return url;\n }\n const blob = await response.blob();\n return await new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(String(reader.result));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n } catch {\n return url;\n }\n }\n\n private async loadConversationData(\n conversationId: string,\n currentUser: UserInfo\n ): Promise<{ conversation: MJConversationEntity; details: MJConversationDetailEntity[] }> {\n const rv = RunView.FromMetadataProvider(this.Provider);\n\n // Load conversation and details in parallel\n const [conversationResult, detailsResult] = await rv.RunViews([\n {\n EntityName: 'MJ: Conversations',\n ExtraFilter: `ID='${conversationId}'`,\n ResultType: 'entity_object'\n },\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `ConversationID='${conversationId}'`,\n OrderBy: 'Sequence ASC',\n ResultType: 'entity_object'\n }\n ], currentUser);\n\n if (!conversationResult.Success || !conversationResult.Results?.length) {\n throw new Error('Conversation not found');\n }\n\n return {\n conversation: conversationResult.Results[0] as MJConversationEntity,\n details: (detailsResult.Results || []) as MJConversationDetailEntity[]\n };\n }\n\n private exportAsJSON(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions\n ): string {\n const exportData: Record<string, unknown> = {};\n\n // Add metadata if requested\n if (options.includeMetadata) {\n exportData.conversation = {\n id: data.conversation.ID,\n name: data.conversation.Name,\n description: data.conversation.Description,\n createdAt: data.conversation.__mj_CreatedAt,\n updatedAt: data.conversation.__mj_UpdatedAt\n };\n } else {\n exportData.conversation = {\n name: data.conversation.Name\n };\n }\n\n // Branding block (title / trademark / logo) when the host supplied branding —\n // the data-format analogue of the HTML header + trademark footer.\n const branding = this.buildBrandingBlock(options);\n if (branding) {\n exportData.branding = branding;\n }\n\n // Add messages if requested\n if (options.includeMessages) {\n exportData.messages = data.details.map((detail, index) => {\n const message: Record<string, unknown> = {\n role: detail.Role,\n message: detail.Message\n };\n\n if (options.includeMetadata) {\n message.id = detail.ID;\n message.sequence = index + 1;\n message.timestamp = detail.__mj_CreatedAt;\n }\n\n return message;\n });\n }\n\n // Use pretty print option\n return JSON.stringify(exportData, null, options.prettyPrint ? 2 : 0);\n }\n\n private exportAsMarkdown(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions\n ): string {\n const logoUrl = options.branding?.logoUrl?.trim();\n // Unbranded markdown must stay byte-identical to before (`# <Name>`), so DON'T\n // route through resolveTitle's 'Conversation' fallback here — only a supplied\n // branding title overrides the raw conversation name.\n const title = options.branding?.title?.trim() || data.conversation.Name;\n let md = '';\n if (logoUrl) {\n md += `\\n\\n`;\n }\n md += `# ${title}\\n\\n`;\n\n if (data.conversation.Description) {\n md += `${data.conversation.Description}\\n\\n`;\n }\n\n if (options.includeMetadata) {\n md += `**Created:** ${this.formatDate(data.conversation.__mj_CreatedAt)}\\n\\n`;\n }\n\n md += `---\\n\\n`;\n\n if (options.includeMessages) {\n for (const detail of data.details) {\n md += `## ${this.capitalizeRole(detail.Role || 'Unknown')}\\n\\n`;\n md += `${detail.Message}\\n\\n`;\n\n if (options.includeMetadata) {\n md += `*${this.formatDate(detail.__mj_CreatedAt)}*\\n\\n`;\n }\n\n md += `---\\n\\n`;\n }\n }\n\n const trademark = options.branding?.trademark?.trim();\n if (trademark) {\n md += `_${trademark}_\\n`;\n }\n\n return md;\n }\n\n private exportAsHTML(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions,\n theme: ResolvedExportTheme\n ): string {\n const trademark = options.branding?.trademark?.trim();\n // Every color reads a theme token with the legacy hex as its fallback, so an\n // unthemed export (no :root block emitted) renders exactly as it always has,\n // while a themed one follows the app's palette.\n const styles = options.includeCSS ? `\n <style>\n body { font-family: var(--mj-font-family, system-ui, -apple-system, sans-serif); background: var(--mj-bg-page, #fff); color: var(--mj-text-primary, #333); max-width: 800px; margin: 40px auto; padding: 0 20px; line-height: 1.6; }\n h1 { color: var(--mj-text-primary, #333); border-bottom: 2px solid var(--mj-brand-primary, #007bff); padding-bottom: 10px; }\n .meta { color: var(--mj-text-secondary, #666); font-size: 14px; margin-bottom: 30px; }\n .message { margin-bottom: 30px; padding: 20px; border-radius: var(--mj-radius-md, 8px); background: var(--mj-bg-surface-card, #f5f5f5); }\n .message.user { background: var(--mj-brand-accent-subtle, #e3f2fd); }\n .message.assistant { background: var(--mj-bg-surface-card, #f5f5f5); }\n .role { font-weight: 600; color: var(--mj-brand-primary, #007bff); margin-bottom: 10px; }\n .content { white-space: pre-wrap; }\n .timestamp { color: var(--mj-text-disabled, #999); font-size: 12px; margin-top: 10px; }${theme.logoDataUri ? `\n .brand-logo { display: block; max-height: 48px; margin-bottom: 12px; }` : ''}${trademark ? `\n .brand-trademark { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--mj-border-default, #ddd); color: var(--mj-text-secondary, #666); font-size: 12px; text-align: center; }` : ''}\n </style>${theme.rootBlock}` : '';\n\n const title = theme.title ?? (data.conversation.Name || 'Conversation');\n let html = `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${this.escapeHtml(title)}</title>${styles}\n</head>\n<body>\n ${theme.logoDataUri ? `<img class=\"brand-logo\" src=\"${this.escapeAttr(theme.logoDataUri)}\" alt=\"\" />\n ` : ''}<h1>${this.escapeHtml(title)}</h1>`;\n\n if (options.includeMetadata) {\n html += `\n <div class=\"meta\">\n ${data.conversation.Description ? `<p>${this.escapeHtml(data.conversation.Description)}</p>` : ''}\n <p>Created: ${this.formatDate(data.conversation.__mj_CreatedAt)}</p>\n </div>`;\n }\n\n if (options.includeMessages) {\n for (const detail of data.details) {\n const roleClass = detail.Role?.toLowerCase() || 'unknown';\n html += `\n <div class=\"message ${roleClass}\">\n <div class=\"role\">${this.capitalizeRole(detail.Role || 'Unknown')}</div>\n <div class=\"content\">${this.escapeHtml(detail.Message || '')}</div>`;\n\n if (options.includeMetadata) {\n html += `\n <div class=\"timestamp\">${this.formatDate(detail.__mj_CreatedAt)}</div>`;\n }\n\n html += `\n </div>`;\n }\n }\n\n if (options.includeCSS && trademark) {\n html += `\n <footer class=\"brand-trademark\">${this.escapeHtml(trademark)}</footer>`;\n }\n\n html += `\n</body>\n</html>`;\n\n return html;\n }\n\n private exportAsText(\n data: {\n conversation: MJConversationEntity;\n details: MJConversationDetailEntity[];\n },\n options: ResolvedExportOptions\n ): string {\n const name = this.resolveTitle(data, options) || 'Conversation';\n let text = `${name}\\n`;\n text += '='.repeat(name.length) + '\\n\\n';\n\n if (data.conversation.Description) {\n text += `${data.conversation.Description}\\n\\n`;\n }\n\n if (options.includeMetadata) {\n text += `Created: ${this.formatDate(data.conversation.__mj_CreatedAt)}\\n\\n`;\n }\n\n text += '-'.repeat(80) + '\\n\\n';\n\n if (options.includeMessages) {\n for (const detail of data.details) {\n text += `[${this.capitalizeRole(detail.Role || 'Unknown')}]\\n`;\n text += `${detail.Message}\\n`;\n\n if (options.includeMetadata) {\n text += `(${this.formatDate(detail.__mj_CreatedAt)})\\n`;\n }\n\n text += '\\n' + '-'.repeat(80) + '\\n\\n';\n }\n }\n\n const trademark = options.branding?.trademark?.trim();\n if (trademark) {\n text += `${trademark}\\n`;\n }\n\n return text;\n }\n\n private downloadFile(content: string, filename: string, mimeType: string): void {\n const blob = new Blob([content], { type: mimeType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n }\n\n private formatDate(date: Date | string): string {\n const d = new Date(date);\n return d.toLocaleString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit'\n });\n }\n\n private capitalizeRole(role: string): string {\n return role.charAt(0).toUpperCase() + role.slice(1).toLowerCase();\n }\n\n private escapeHtml(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n }\n\n /** escapeHtml + quote escaping — for values interpolated into HTML attributes. */\n private escapeAttr(text: string): string {\n return this.escapeHtml(text).replace(/\"/g, '"');\n }\n\n private getTimestamp(): string {\n const now = new Date();\n return now.toISOString().replace(/[:.]/g, '-').slice(0, -5);\n }\n}\n"]}
|
|
@@ -6,14 +6,24 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class MentionParserService {
|
|
7
7
|
constructor(_bootstrap: ConversationsRuntimeBootstrap);
|
|
8
8
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.parseMentions}. */
|
|
9
|
+
ParseMentions(text: string, availableAgents: MJAIAgentEntityExtended[], availableUsers?: UserInfo[]): MentionParseResult;
|
|
10
|
+
/** @deprecated Use {@link ParseMentions}. */
|
|
9
11
|
parseMentions(text: string, availableAgents: MJAIAgentEntityExtended[], availableUsers?: UserInfo[]): MentionParseResult;
|
|
10
12
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.validateMentions}. */
|
|
13
|
+
ValidateMentions(text: string, availableAgents: MJAIAgentEntityExtended[], availableUsers?: UserInfo[]): string[];
|
|
14
|
+
/** @deprecated Use {@link ValidateMentions}. */
|
|
11
15
|
validateMentions(text: string, availableAgents: MJAIAgentEntityExtended[], availableUsers?: UserInfo[]): string[];
|
|
12
16
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.extractMentionNames}. */
|
|
17
|
+
ExtractMentionNames(text: string): string[];
|
|
18
|
+
/** @deprecated Use {@link ExtractMentionNames}. */
|
|
13
19
|
extractMentionNames(text: string): string[];
|
|
14
20
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.formatMentions}. */
|
|
21
|
+
FormatMentions(text: string, mentions: Mention[]): string;
|
|
22
|
+
/** @deprecated Use {@link FormatMentions}. */
|
|
15
23
|
formatMentions(text: string, mentions: Mention[]): string;
|
|
16
24
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.toPlainText}. */
|
|
25
|
+
ToPlainText(text: string, agents?: MJAIAgentEntityExtended[], users?: UserInfo[]): string;
|
|
26
|
+
/** @deprecated Use {@link ToPlainText}. */
|
|
17
27
|
toPlainText(text: string, agents?: MJAIAgentEntityExtended[], users?: UserInfo[]): string;
|
|
18
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<MentionParserService, never>;
|
|
19
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<MentionParserService>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-parser.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/mention-parser.service.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA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BAAuB,EAAE,EAC1C,cAAc,CAAC,EAAE,QAAQ,EAAE,GAC5B,kBAAkB;IAIrB,uFAAuF;IACvF,gBAAgB,CACZ,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,uBAAuB,EAAE,EAC1C,cAAc,CAAC,EAAE,QAAQ,EAAE,GAC5B,MAAM,EAAE;IAQX,gDAAgD;IAChD,gBAAgB,CACZ,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,uBAAuB,EAAE,EAC1C,cAAc,CAAC,EAAE,QAAQ,EAAE,GAC5B,MAAM,EAAE;IAIX,0FAA0F;IAC1F,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAI3C,mDAAmD;IACnD,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAI3C,qFAAqF;IACrF,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM;IAIzD,8CAA8C;IAC9C,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM;IAIzD,kFAAkF;IAClF,WAAW,CACP,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,uBAAuB,EAAE,EAClC,KAAK,CAAC,EAAE,QAAQ,EAAE,GACnB,MAAM;IAIT,2CAA2C;IAC3C,WAAW,CACP,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,uBAAuB,EAAE,EAClC,KAAK,CAAC,EAAE,QAAQ,EAAE,GACnB,MAAM;yCAnFA,oBAAoB;6CAApB,oBAAoB;CAsFhC"}
|
|
@@ -21,25 +21,45 @@ export class MentionParserService {
|
|
|
21
21
|
// Injecting the bootstrap forces adapter registration on first construction.
|
|
22
22
|
}
|
|
23
23
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.parseMentions}. */
|
|
24
|
-
|
|
24
|
+
ParseMentions(text, availableAgents, availableUsers) {
|
|
25
25
|
return ConversationsRuntime.Instance.Mentions.parseMentions(text, availableAgents, availableUsers);
|
|
26
26
|
}
|
|
27
|
+
/** @deprecated Use {@link ParseMentions}. */
|
|
28
|
+
parseMentions(text, availableAgents, availableUsers) {
|
|
29
|
+
return this.ParseMentions(text, availableAgents, availableUsers);
|
|
30
|
+
}
|
|
27
31
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.validateMentions}. */
|
|
28
|
-
|
|
32
|
+
ValidateMentions(text, availableAgents, availableUsers) {
|
|
29
33
|
return ConversationsRuntime.Instance.Mentions.validateMentions(text, availableAgents, availableUsers);
|
|
30
34
|
}
|
|
35
|
+
/** @deprecated Use {@link ValidateMentions}. */
|
|
36
|
+
validateMentions(text, availableAgents, availableUsers) {
|
|
37
|
+
return this.ValidateMentions(text, availableAgents, availableUsers);
|
|
38
|
+
}
|
|
31
39
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.extractMentionNames}. */
|
|
32
|
-
|
|
40
|
+
ExtractMentionNames(text) {
|
|
33
41
|
return ConversationsRuntime.Instance.Mentions.extractMentionNames(text);
|
|
34
42
|
}
|
|
43
|
+
/** @deprecated Use {@link ExtractMentionNames}. */
|
|
44
|
+
extractMentionNames(text) {
|
|
45
|
+
return this.ExtractMentionNames(text);
|
|
46
|
+
}
|
|
35
47
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.formatMentions}. */
|
|
36
|
-
|
|
48
|
+
FormatMentions(text, mentions) {
|
|
37
49
|
return ConversationsRuntime.Instance.Mentions.formatMentions(text, mentions);
|
|
38
50
|
}
|
|
51
|
+
/** @deprecated Use {@link FormatMentions}. */
|
|
52
|
+
formatMentions(text, mentions) {
|
|
53
|
+
return this.FormatMentions(text, mentions);
|
|
54
|
+
}
|
|
39
55
|
/** Pass-through to {@link ConversationsRuntime.Instance.Mentions.toPlainText}. */
|
|
40
|
-
|
|
56
|
+
ToPlainText(text, agents, users) {
|
|
41
57
|
return ConversationsRuntime.Instance.Mentions.toPlainText(text, agents, users);
|
|
42
58
|
}
|
|
59
|
+
/** @deprecated Use {@link ToPlainText}. */
|
|
60
|
+
toPlainText(text, agents, users) {
|
|
61
|
+
return this.ToPlainText(text, agents, users);
|
|
62
|
+
}
|
|
43
63
|
static ɵfac = function MentionParserService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MentionParserService)(i0.ɵɵinject(i1.ConversationsRuntimeBootstrap)); };
|
|
44
64
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MentionParserService, factory: MentionParserService.ɵfac, providedIn: 'root' });
|
|
45
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-parser.service.js","sourceRoot":"","sources":["../../../src/lib/services/mention-parser.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;;;AAO7E,gFAAgF;AAChF,kFAAkF;AAClF,6EAA6E;AAC7E,8EAA8E;AAG9E,MAAM,OAAO,oBAAoB;IAC7B,YAAY,UAAyC;QACjD,6EAA6E;IACjF,CAAC;IAED,oFAAoF;IACpF,aAAa,CACT,IAAY,EACZ,eAA0C,EAC1C,cAA2B;QAE3B,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CACvD,IAAI,EACJ,eAAe,EACf,cAAc,CACjB,CAAC;IACN,CAAC;IAED,uFAAuF;IACvF,gBAAgB,CACZ,IAAY,EACZ,eAA0C,EAC1C,cAA2B;QAE3B,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAC1D,IAAI,EACJ,eAAe,EACf,cAAc,CACjB,CAAC;IACN,CAAC;IAED,0FAA0F;IAC1F,mBAAmB,CAAC,IAAY;QAC5B,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC5E,CAAC;IAED,qFAAqF;IACrF,cAAc,CAAC,IAAY,EAAE,QAAmB;QAC5C,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjF,CAAC;IAED,kFAAkF;IAClF,WAAW,CACP,IAAY,EACZ,MAAkC,EAClC,KAAkB;QAElB,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACnF,CAAC;
|
|
1
|
+
{"version":3,"file":"mention-parser.service.js","sourceRoot":"","sources":["../../../src/lib/services/mention-parser.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;;;AAO7E,gFAAgF;AAChF,kFAAkF;AAClF,6EAA6E;AAC7E,8EAA8E;AAG9E,MAAM,OAAO,oBAAoB;IAC7B,YAAY,UAAyC;QACjD,6EAA6E;IACjF,CAAC;IAED,oFAAoF;IACpF,aAAa,CACT,IAAY,EACZ,eAA0C,EAC1C,cAA2B;QAE3B,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CACvD,IAAI,EACJ,eAAe,EACf,cAAc,CACjB,CAAC;IACN,CAAC;IAED,6CAA6C;IAC7C,aAAa,CACT,IAAY,EACZ,eAA0C,EAC1C,cAA2B;QAE3B,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;IACrE,CAAC;IAED,uFAAuF;IACvF,gBAAgB,CACZ,IAAY,EACZ,eAA0C,EAC1C,cAA2B;QAE3B,OAAO,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAC1D,IAAI,EACJ,eAAe,EACf,cAAc,CACjB,CAAC;IACN,CAAC;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versations-runtime`.\n *\n * Previously this service owned the regex-based mention-parsing logic. That logic\n * moved into the runtime in PR 1; this file is now a thin pass-through so existing\n * `inject(MentionParserService)` call sites keep working without changes.\n *\n * **For new code:** prefer `ConversationsRuntime.Instance.Mentions` directly.\n */\n\nimport { Injectable } from '@angular/core';\nimport { ConversationsRuntime } from '@memberjunction/conversations-runtime';\nimport type { Mention, MentionParseResult } from '@memberjunction/conversations-runtime';\nimport { MJAIAgentEntityExtended } from '@memberjunction/ai-core-plus';\nimport { UserInfo } from '@memberjunction/core';\n\nimport { ConversationsRuntimeBootstrap } from './conversations-runtime-bootstrap.service';\n\n// NOTE: `Mention` and `MentionParseResult` are NOT re-exported from this file —\n// the model's `conversation-state.model.ts` already exports `MentionParseResult`,\n// and re-exporting here causes a public-api ambiguity. Consumers wanting the\n// runtime's types should import from `@memberjunction/conversations-runtime`.\n\n@Injectable({ providedIn: 'root' })\nexport class MentionParserService {\n constructor(_bootstrap: ConversationsRuntimeBootstrap) {\n // Injecting the bootstrap forces adapter registration on first construction.\n }\n\n /** Pass-through to {@link ConversationsRuntime.Instance.Mentions.parseMentions}. */\n ParseMentions(\n text: string,\n availableAgents: MJAIAgentEntityExtended[],\n availableUsers?: UserInfo[]\n ): MentionParseResult {\n return ConversationsRuntime.Instance.Mentions.parseMentions(\n text,\n availableAgents,\n availableUsers\n );\n }\n\n /** @deprecated Use {@link ParseMentions}. */\n parseMentions(\n text: string,\n availableAgents: MJAIAgentEntityExtended[],\n availableUsers?: UserInfo[]\n ): MentionParseResult {\n return this.ParseMentions(text, availableAgents, availableUsers);\n }\n\n /** Pass-through to {@link ConversationsRuntime.Instance.Mentions.validateMentions}. */\n ValidateMentions(\n text: string,\n availableAgents: MJAIAgentEntityExtended[],\n availableUsers?: UserInfo[]\n ): string[] {\n return ConversationsRuntime.Instance.Mentions.validateMentions(\n text,\n availableAgents,\n availableUsers\n );\n }\n\n /** @deprecated Use {@link ValidateMentions}. */\n validateMentions(\n text: string,\n availableAgents: MJAIAgentEntityExtended[],\n availableUsers?: UserInfo[]\n ): string[] {\n return this.ValidateMentions(text, availableAgents, availableUsers);\n }\n\n /** Pass-through to {@link ConversationsRuntime.Instance.Mentions.extractMentionNames}. */\n ExtractMentionNames(text: string): string[] {\n return ConversationsRuntime.Instance.Mentions.extractMentionNames(text);\n }\n\n /** @deprecated Use {@link ExtractMentionNames}. */\n extractMentionNames(text: string): string[] {\n return this.ExtractMentionNames(text);\n }\n\n /** Pass-through to {@link ConversationsRuntime.Instance.Mentions.formatMentions}. */\n FormatMentions(text: string, mentions: Mention[]): string {\n return ConversationsRuntime.Instance.Mentions.formatMentions(text, mentions);\n }\n\n /** @deprecated Use {@link FormatMentions}. */\n formatMentions(text: string, mentions: Mention[]): string {\n return this.FormatMentions(text, mentions);\n }\n\n /** Pass-through to {@link ConversationsRuntime.Instance.Mentions.toPlainText}. */\n ToPlainText(\n text: string,\n agents?: MJAIAgentEntityExtended[],\n users?: UserInfo[]\n ): string {\n return ConversationsRuntime.Instance.Mentions.toPlainText(text, agents, users);\n }\n\n /** @deprecated Use {@link ToPlainText}. */\n toPlainText(\n text: string,\n agents?: MJAIAgentEntityExtended[],\n users?: UserInfo[]\n ): string {\n return this.ToPlainText(text, agents, users);\n }\n}\n"]}
|
|
@@ -14,84 +14,132 @@ export declare class NotificationService {
|
|
|
14
14
|
private _preferences$;
|
|
15
15
|
private _notificationItems$;
|
|
16
16
|
private _changeEvents$;
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
readonly Notifications$: Observable<Record<string, ConversationNotification>>;
|
|
18
|
+
/** @deprecated Use {@link Notifications$}. */
|
|
19
|
+
get notifications$(): Observable<Record<string, ConversationNotification>>;
|
|
20
|
+
readonly Preferences$: Observable<NotificationPreferences>;
|
|
21
|
+
/** @deprecated Use {@link Preferences$}. */
|
|
22
|
+
get preferences$(): Observable<NotificationPreferences>;
|
|
23
|
+
readonly NotificationItems$: Observable<NotificationItem[]>;
|
|
24
|
+
/** @deprecated Use {@link NotificationItems$}. */
|
|
25
|
+
get notificationItems$(): Observable<NotificationItem[]>;
|
|
26
|
+
readonly ChangeEvents$: Observable<NotificationChangeEvent>;
|
|
27
|
+
/** @deprecated Use {@link ChangeEvents$}. */
|
|
28
|
+
get changeEvents$(): Observable<NotificationChangeEvent>;
|
|
29
|
+
readonly TotalUnreadCount$: Observable<number>;
|
|
30
|
+
/** @deprecated Use {@link TotalUnreadCount$}. */
|
|
31
|
+
get totalUnreadCount$(): Observable<number>;
|
|
32
|
+
readonly HasAnyNotifications$: Observable<boolean>;
|
|
33
|
+
/** @deprecated Use {@link HasAnyNotifications$}. */
|
|
34
|
+
get hasAnyNotifications$(): Observable<boolean>;
|
|
23
35
|
constructor(ngZone: NgZone);
|
|
24
36
|
/**
|
|
25
37
|
* Gets notification state for a specific conversation
|
|
26
38
|
*/
|
|
39
|
+
GetConversationNotification(conversationId: string): ConversationNotification | null;
|
|
40
|
+
/** @deprecated Use {@link GetConversationNotification}. */
|
|
27
41
|
getConversationNotification(conversationId: string): ConversationNotification | null;
|
|
28
42
|
/**
|
|
29
43
|
* Gets notification observable for a specific conversation
|
|
30
44
|
*/
|
|
45
|
+
GetConversationNotification$(conversationId: string): Observable<ConversationNotification | null>;
|
|
46
|
+
/** @deprecated Use {@link GetConversationNotification$}. */
|
|
31
47
|
getConversationNotification$(conversationId: string): Observable<ConversationNotification | null>;
|
|
32
48
|
/**
|
|
33
49
|
* Gets badge configuration for a conversation
|
|
34
50
|
*/
|
|
51
|
+
GetBadgeConfig(conversationId: string): BadgeConfig;
|
|
52
|
+
/** @deprecated Use {@link GetBadgeConfig}. */
|
|
35
53
|
getBadgeConfig(conversationId: string): BadgeConfig;
|
|
36
54
|
/**
|
|
37
55
|
* Gets badge configuration observable for a conversation
|
|
38
56
|
*/
|
|
57
|
+
GetBadgeConfig$(conversationId: string): Observable<BadgeConfig>;
|
|
58
|
+
/** @deprecated Use {@link GetBadgeConfig$}. */
|
|
39
59
|
getBadgeConfig$(conversationId: string): Observable<BadgeConfig>;
|
|
40
60
|
/**
|
|
41
61
|
* Tracks a new message in a conversation
|
|
42
62
|
*/
|
|
63
|
+
TrackNewMessage(conversationId: string, messageTimestamp: Date, priority?: NotificationPriority): void;
|
|
64
|
+
/** @deprecated Use {@link TrackNewMessage}. */
|
|
43
65
|
trackNewMessage(conversationId: string, messageTimestamp: Date, priority?: NotificationPriority): void;
|
|
44
66
|
/**
|
|
45
67
|
* Tracks multiple new messages at once (batch operation)
|
|
46
68
|
*/
|
|
69
|
+
TrackNewMessages(conversationId: string, count: number, latestTimestamp: Date, priority?: NotificationPriority): void;
|
|
70
|
+
/** @deprecated Use {@link TrackNewMessages}. */
|
|
47
71
|
trackNewMessages(conversationId: string, count: number, latestTimestamp: Date, priority?: NotificationPriority): void;
|
|
48
72
|
/**
|
|
49
73
|
* Tracks a new artifact notification
|
|
50
74
|
*/
|
|
75
|
+
TrackNewArtifact(conversationId: string): void;
|
|
76
|
+
/** @deprecated Use {@link TrackNewArtifact}. */
|
|
51
77
|
trackNewArtifact(conversationId: string): void;
|
|
52
78
|
/**
|
|
53
79
|
* Tracks an active agent process
|
|
54
80
|
*/
|
|
81
|
+
TrackAgentProcess(conversationId: string, isActive: boolean): void;
|
|
82
|
+
/** @deprecated Use {@link TrackAgentProcess}. */
|
|
55
83
|
trackAgentProcess(conversationId: string, isActive: boolean): void;
|
|
56
84
|
/**
|
|
57
85
|
* Marks a conversation as read (clears unread message count)
|
|
58
86
|
*/
|
|
87
|
+
MarkConversationAsRead(conversationId: string): void;
|
|
88
|
+
/** @deprecated Use {@link MarkConversationAsRead}. */
|
|
59
89
|
markConversationAsRead(conversationId: string): void;
|
|
60
90
|
/**
|
|
61
91
|
* Clears artifact notifications for a conversation
|
|
62
92
|
*/
|
|
93
|
+
ClearArtifactNotifications(conversationId: string): void;
|
|
94
|
+
/** @deprecated Use {@link ClearArtifactNotifications}. */
|
|
63
95
|
clearArtifactNotifications(conversationId: string): void;
|
|
64
96
|
/**
|
|
65
97
|
* Clears all notifications for a conversation
|
|
66
98
|
*/
|
|
99
|
+
ClearAllNotifications(conversationId: string): void;
|
|
100
|
+
/** @deprecated Use {@link ClearAllNotifications}. */
|
|
67
101
|
clearAllNotifications(conversationId: string): void;
|
|
68
102
|
/**
|
|
69
103
|
* Clears all notifications across all conversations
|
|
70
104
|
*/
|
|
105
|
+
ClearAllNotificationsGlobal(): void;
|
|
106
|
+
/** @deprecated Use {@link ClearAllNotificationsGlobal}. */
|
|
71
107
|
clearAllNotificationsGlobal(): void;
|
|
72
108
|
/**
|
|
73
109
|
* Updates notification preferences
|
|
74
110
|
*/
|
|
111
|
+
UpdatePreferences(preferences: Partial<NotificationPreferences>): void;
|
|
112
|
+
/** @deprecated Use {@link UpdatePreferences}. */
|
|
75
113
|
updatePreferences(preferences: Partial<NotificationPreferences>): void;
|
|
76
114
|
/**
|
|
77
115
|
* Mutes a conversation
|
|
78
116
|
*/
|
|
117
|
+
MuteConversation(conversationId: string): void;
|
|
118
|
+
/** @deprecated Use {@link MuteConversation}. */
|
|
79
119
|
muteConversation(conversationId: string): void;
|
|
80
120
|
/**
|
|
81
121
|
* Unmutes a conversation
|
|
82
122
|
*/
|
|
123
|
+
UnmuteConversation(conversationId: string): void;
|
|
124
|
+
/** @deprecated Use {@link UnmuteConversation}. */
|
|
83
125
|
unmuteConversation(conversationId: string): void;
|
|
84
126
|
/**
|
|
85
127
|
* Checks if a conversation is muted
|
|
86
128
|
*/
|
|
129
|
+
IsConversationMuted(conversationId: string): boolean;
|
|
130
|
+
/** @deprecated Use {@link IsConversationMuted}. */
|
|
87
131
|
isConversationMuted(conversationId: string): boolean;
|
|
88
132
|
/**
|
|
89
133
|
* Requests desktop notification permission
|
|
90
134
|
*/
|
|
135
|
+
RequestDesktopPermission(): Promise<boolean>;
|
|
136
|
+
/** @deprecated Use {@link RequestDesktopPermission}. */
|
|
91
137
|
requestDesktopPermission(): Promise<boolean>;
|
|
92
138
|
/**
|
|
93
139
|
* Shows a desktop notification
|
|
94
140
|
*/
|
|
141
|
+
ShowDesktopNotification(title: string, body: string, conversationId: string): void;
|
|
142
|
+
/** @deprecated Use {@link ShowDesktopNotification}. */
|
|
95
143
|
showDesktopNotification(title: string, body: string, conversationId: string): void;
|
|
96
144
|
private createNewNotification;
|
|
97
145
|
private updateNotifications;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/notification.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAmB,UAAU,EAAsB,MAAM,MAAM,CAAC;AAEvE,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EAGvB,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,EAEZ,MAAM,8BAA8B,CAAC;;AAEtC;;;GAGG;AACH,qBAGa,mBAAmB;
|
|
1
|
+
{"version":3,"file":"notification.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/notification.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAmB,UAAU,EAAsB,MAAM,MAAM,CAAC;AAEvE,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EAGvB,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,EAEZ,MAAM,8BAA8B,CAAC;;AAEtC;;;GAGG;AACH,qBAGa,mBAAmB;IA8DlB,OAAO,CAAC,MAAM;IA7D1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAG9D,OAAO,CAAC,eAAe,CAAqE;IAC5F,OAAO,CAAC,aAAa,CAAkF;IACvG,OAAO,CAAC,mBAAmB,CAA+C;IAC1E,OAAO,CAAC,cAAc,CAA0C;IAGh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