@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
|
@@ -6,21 +6,69 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class ImageViewerComponent implements OnInit, OnDestroy {
|
|
8
8
|
/** Image source URL (can be data URL or regular URL) */
|
|
9
|
-
|
|
9
|
+
ImageUrl: string;
|
|
10
|
+
/** @deprecated Use {@link ImageUrl}. */
|
|
11
|
+
set imageUrl(value: string);
|
|
12
|
+
/** @deprecated Use {@link ImageUrl}. */
|
|
13
|
+
get imageUrl(): string;
|
|
10
14
|
/** Image alt text */
|
|
11
|
-
|
|
15
|
+
Alt: string;
|
|
16
|
+
/** @deprecated Use {@link Alt}. */
|
|
17
|
+
set alt(value: string);
|
|
18
|
+
/** @deprecated Use {@link Alt}. */
|
|
19
|
+
get alt(): string;
|
|
12
20
|
/** Image filename for download */
|
|
13
|
-
|
|
21
|
+
FileName: string;
|
|
22
|
+
/** @deprecated Use {@link FileName}. */
|
|
23
|
+
set fileName(value: string);
|
|
24
|
+
/** @deprecated Use {@link FileName}. */
|
|
25
|
+
get fileName(): string;
|
|
14
26
|
/** Whether the viewer is visible */
|
|
15
|
-
|
|
27
|
+
Visible: boolean;
|
|
28
|
+
/** @deprecated Use {@link Visible}. */
|
|
29
|
+
set visible(value: boolean);
|
|
30
|
+
/** @deprecated Use {@link Visible}. */
|
|
31
|
+
get visible(): boolean;
|
|
16
32
|
/** Emits when the viewer should be closed */
|
|
33
|
+
Closed: EventEmitter<void>;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use {@link Closed}.
|
|
36
|
+
*
|
|
37
|
+
* The same emitter under the old binding name, so a template still binding
|
|
38
|
+
* (closed) keeps working. Must stay AFTER Closed: class fields
|
|
39
|
+
* initialise in order, and the other way round this captures undefined.
|
|
40
|
+
*/
|
|
17
41
|
closed: EventEmitter<void>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
42
|
+
ZoomLevel: number;
|
|
43
|
+
/** @deprecated Use {@link ZoomLevel}. */
|
|
44
|
+
get zoomLevel(): number;
|
|
45
|
+
/** @deprecated Use {@link ZoomLevel}. */
|
|
46
|
+
set zoomLevel(value: number);
|
|
47
|
+
MinZoom: number;
|
|
48
|
+
/** @deprecated Use {@link MinZoom}. */
|
|
49
|
+
get minZoom(): number;
|
|
50
|
+
/** @deprecated Use {@link MinZoom}. */
|
|
51
|
+
set minZoom(value: number);
|
|
52
|
+
MaxZoom: number;
|
|
53
|
+
/** @deprecated Use {@link MaxZoom}. */
|
|
54
|
+
get maxZoom(): number;
|
|
55
|
+
/** @deprecated Use {@link MaxZoom}. */
|
|
56
|
+
set maxZoom(value: number);
|
|
57
|
+
TranslateX: number;
|
|
58
|
+
/** @deprecated Use {@link TranslateX}. */
|
|
59
|
+
get translateX(): number;
|
|
60
|
+
/** @deprecated Use {@link TranslateX}. */
|
|
61
|
+
set translateX(value: number);
|
|
62
|
+
TranslateY: number;
|
|
63
|
+
/** @deprecated Use {@link TranslateY}. */
|
|
64
|
+
get translateY(): number;
|
|
65
|
+
/** @deprecated Use {@link TranslateY}. */
|
|
66
|
+
set translateY(value: number);
|
|
67
|
+
IsDragging: boolean;
|
|
68
|
+
/** @deprecated Use {@link IsDragging}. */
|
|
69
|
+
get isDragging(): boolean;
|
|
70
|
+
/** @deprecated Use {@link IsDragging}. */
|
|
71
|
+
set isDragging(value: boolean);
|
|
24
72
|
private lastMouseX;
|
|
25
73
|
private lastMouseY;
|
|
26
74
|
ngOnInit(): void;
|
|
@@ -40,22 +88,32 @@ export declare class ImageViewerComponent implements OnInit, OnDestroy {
|
|
|
40
88
|
/**
|
|
41
89
|
* Handle backdrop click
|
|
42
90
|
*/
|
|
91
|
+
OnBackdropClick(event: MouseEvent): void;
|
|
92
|
+
/** @deprecated Use {@link OnBackdropClick}. */
|
|
43
93
|
onBackdropClick(event: MouseEvent): void;
|
|
44
94
|
/**
|
|
45
95
|
* Zoom in
|
|
46
96
|
*/
|
|
97
|
+
ZoomIn(): void;
|
|
98
|
+
/** @deprecated Use {@link ZoomIn}. */
|
|
47
99
|
zoomIn(): void;
|
|
48
100
|
/**
|
|
49
101
|
* Zoom out
|
|
50
102
|
*/
|
|
103
|
+
ZoomOut(): void;
|
|
104
|
+
/** @deprecated Use {@link ZoomOut}. */
|
|
51
105
|
zoomOut(): void;
|
|
52
106
|
/**
|
|
53
107
|
* Reset to 100% zoom
|
|
54
108
|
*/
|
|
109
|
+
ResetZoom(): void;
|
|
110
|
+
/** @deprecated Use {@link ResetZoom}. */
|
|
55
111
|
resetZoom(): void;
|
|
56
112
|
/**
|
|
57
113
|
* Fit image to screen
|
|
58
114
|
*/
|
|
115
|
+
FitToScreen(): void;
|
|
116
|
+
/** @deprecated Use {@link FitToScreen}. */
|
|
59
117
|
fitToScreen(): void;
|
|
60
118
|
/**
|
|
61
119
|
* Reset view to initial state
|
|
@@ -68,6 +126,8 @@ export declare class ImageViewerComponent implements OnInit, OnDestroy {
|
|
|
68
126
|
/**
|
|
69
127
|
* Handle mouse down for dragging
|
|
70
128
|
*/
|
|
129
|
+
OnMouseDown(event: MouseEvent): void;
|
|
130
|
+
/** @deprecated Use {@link OnMouseDown}. */
|
|
71
131
|
onMouseDown(event: MouseEvent): void;
|
|
72
132
|
/**
|
|
73
133
|
* Handle mouse move for dragging
|
|
@@ -80,16 +140,22 @@ export declare class ImageViewerComponent implements OnInit, OnDestroy {
|
|
|
80
140
|
/**
|
|
81
141
|
* Download the image
|
|
82
142
|
*/
|
|
143
|
+
DownloadImage(): void;
|
|
144
|
+
/** @deprecated Use {@link DownloadImage}. */
|
|
83
145
|
downloadImage(): void;
|
|
84
146
|
/**
|
|
85
147
|
* Get current zoom percentage for display
|
|
86
148
|
*/
|
|
149
|
+
get ZoomPercentage(): string;
|
|
150
|
+
/** @deprecated Use {@link ZoomPercentage}. */
|
|
87
151
|
get zoomPercentage(): string;
|
|
88
152
|
/**
|
|
89
153
|
* Get transform style for image
|
|
90
154
|
*/
|
|
155
|
+
get ImageTransform(): string;
|
|
156
|
+
/** @deprecated Use {@link ImageTransform}. */
|
|
91
157
|
get imageTransform(): string;
|
|
92
158
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImageViewerComponent, never>;
|
|
93
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ImageViewerComponent, "mj-image-viewer", never, { "imageUrl": { "alias": "imageUrl"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, { "closed": "closed"; }, never, never, false, never>;
|
|
159
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageViewerComponent, "mj-image-viewer", never, { "ImageUrl": { "alias": "ImageUrl"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "Alt": { "alias": "Alt"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "FileName": { "alias": "FileName"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "Visible": { "alias": "Visible"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, { "Closed": "Closed"; "closed": "closed"; }, never, never, false, never>;
|
|
94
160
|
}
|
|
95
161
|
//# sourceMappingURL=image-viewer.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-viewer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/attachment/image-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,MAAM,EACN,SAAS,EACV,MAAM,eAAe,CAAC;;AAEvB;;;GAGG;AACH,qBAMa,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAC5D,wDAAwD;IAC/C,QAAQ,EAAE,MAAM,CAAM;IAE/B,qBAAqB;IACZ,GAAG,EAAE,MAAM,CAAW;IAE/B,kCAAkC;IACzB,QAAQ,EAAE,MAAM,CAAW;IAEpC,oCAAoC;IAC3B,OAAO,EAAE,OAAO,CAAS;IAElC,6CAA6C;IACnC,MAAM,qBAA4B;
|
|
1
|
+
{"version":3,"file":"image-viewer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/attachment/image-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,MAAM,EACN,SAAS,EACV,MAAM,eAAe,CAAC;;AAEvB;;;GAGG;AACH,qBAMa,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAC5D,wDAAwD;IAC/C,QAAQ,EAAE,MAAM,CAAM;IAE/B,wCAAwC;IACxC,IAAa,QAAQ,CAAC,KAAK,EAAE,MAAM,EAElC;IACD,wCAAwC;IACxC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,qBAAqB;IACZ,GAAG,EAAE,MAAM,CAAW;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,IAAI,MAAM,CAE3B;IAED,8CAA8C;IAC9C,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,8CAA8C;IAC9C,IAAI,cAAc,IAAI,MAAM,CAE3B;yCA7VU,oBAAoB;2CAApB,oBAAoB;CA8VhC"}
|
|
@@ -81,28 +81,116 @@ function ImageViewerComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
81
81
|
*/
|
|
82
82
|
export class ImageViewerComponent {
|
|
83
83
|
/** Image source URL (can be data URL or regular URL) */
|
|
84
|
-
|
|
84
|
+
ImageUrl = '';
|
|
85
|
+
/** @deprecated Use {@link ImageUrl}. */
|
|
86
|
+
set imageUrl(value) {
|
|
87
|
+
this.ImageUrl = value;
|
|
88
|
+
}
|
|
89
|
+
/** @deprecated Use {@link ImageUrl}. */
|
|
90
|
+
get imageUrl() {
|
|
91
|
+
return this.ImageUrl;
|
|
92
|
+
}
|
|
85
93
|
/** Image alt text */
|
|
86
|
-
|
|
94
|
+
Alt = 'Image';
|
|
95
|
+
/** @deprecated Use {@link Alt}. */
|
|
96
|
+
set alt(value) {
|
|
97
|
+
this.Alt = value;
|
|
98
|
+
}
|
|
99
|
+
/** @deprecated Use {@link Alt}. */
|
|
100
|
+
get alt() {
|
|
101
|
+
return this.Alt;
|
|
102
|
+
}
|
|
87
103
|
/** Image filename for download */
|
|
88
|
-
|
|
104
|
+
FileName = 'image';
|
|
105
|
+
/** @deprecated Use {@link FileName}. */
|
|
106
|
+
set fileName(value) {
|
|
107
|
+
this.FileName = value;
|
|
108
|
+
}
|
|
109
|
+
/** @deprecated Use {@link FileName}. */
|
|
110
|
+
get fileName() {
|
|
111
|
+
return this.FileName;
|
|
112
|
+
}
|
|
89
113
|
/** Whether the viewer is visible */
|
|
90
|
-
|
|
114
|
+
Visible = false;
|
|
115
|
+
/** @deprecated Use {@link Visible}. */
|
|
116
|
+
set visible(value) {
|
|
117
|
+
this.Visible = value;
|
|
118
|
+
}
|
|
119
|
+
/** @deprecated Use {@link Visible}. */
|
|
120
|
+
get visible() {
|
|
121
|
+
return this.Visible;
|
|
122
|
+
}
|
|
91
123
|
/** Emits when the viewer should be closed */
|
|
92
|
-
|
|
124
|
+
Closed = new EventEmitter();
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated Use {@link Closed}.
|
|
127
|
+
*
|
|
128
|
+
* The same emitter under the old binding name, so a template still binding
|
|
129
|
+
* (closed) keeps working. Must stay AFTER Closed: class fields
|
|
130
|
+
* initialise in order, and the other way round this captures undefined.
|
|
131
|
+
*/
|
|
132
|
+
closed = this.Closed;
|
|
93
133
|
// Zoom and pan state
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
134
|
+
ZoomLevel = 1;
|
|
135
|
+
/** @deprecated Use {@link ZoomLevel}. */
|
|
136
|
+
get zoomLevel() {
|
|
137
|
+
return this.ZoomLevel;
|
|
138
|
+
}
|
|
139
|
+
/** @deprecated Use {@link ZoomLevel}. */
|
|
140
|
+
set zoomLevel(value) {
|
|
141
|
+
this.ZoomLevel = value;
|
|
142
|
+
}
|
|
143
|
+
MinZoom = 0.1;
|
|
144
|
+
/** @deprecated Use {@link MinZoom}. */
|
|
145
|
+
get minZoom() {
|
|
146
|
+
return this.MinZoom;
|
|
147
|
+
}
|
|
148
|
+
/** @deprecated Use {@link MinZoom}. */
|
|
149
|
+
set minZoom(value) {
|
|
150
|
+
this.MinZoom = value;
|
|
151
|
+
}
|
|
152
|
+
MaxZoom = 5;
|
|
153
|
+
/** @deprecated Use {@link MaxZoom}. */
|
|
154
|
+
get maxZoom() {
|
|
155
|
+
return this.MaxZoom;
|
|
156
|
+
}
|
|
157
|
+
/** @deprecated Use {@link MaxZoom}. */
|
|
158
|
+
set maxZoom(value) {
|
|
159
|
+
this.MaxZoom = value;
|
|
160
|
+
}
|
|
161
|
+
TranslateX = 0;
|
|
162
|
+
/** @deprecated Use {@link TranslateX}. */
|
|
163
|
+
get translateX() {
|
|
164
|
+
return this.TranslateX;
|
|
165
|
+
}
|
|
166
|
+
/** @deprecated Use {@link TranslateX}. */
|
|
167
|
+
set translateX(value) {
|
|
168
|
+
this.TranslateX = value;
|
|
169
|
+
}
|
|
170
|
+
TranslateY = 0;
|
|
171
|
+
/** @deprecated Use {@link TranslateY}. */
|
|
172
|
+
get translateY() {
|
|
173
|
+
return this.TranslateY;
|
|
174
|
+
}
|
|
175
|
+
/** @deprecated Use {@link TranslateY}. */
|
|
176
|
+
set translateY(value) {
|
|
177
|
+
this.TranslateY = value;
|
|
178
|
+
}
|
|
99
179
|
// Drag state
|
|
100
|
-
|
|
180
|
+
IsDragging = false;
|
|
181
|
+
/** @deprecated Use {@link IsDragging}. */
|
|
182
|
+
get isDragging() {
|
|
183
|
+
return this.IsDragging;
|
|
184
|
+
}
|
|
185
|
+
/** @deprecated Use {@link IsDragging}. */
|
|
186
|
+
set isDragging(value) {
|
|
187
|
+
this.IsDragging = value;
|
|
188
|
+
}
|
|
101
189
|
lastMouseX = 0;
|
|
102
190
|
lastMouseY = 0;
|
|
103
191
|
ngOnInit() {
|
|
104
192
|
// Lock body scroll when viewer is open
|
|
105
|
-
if (this.
|
|
193
|
+
if (this.Visible) {
|
|
106
194
|
document.body.style.overflow = 'hidden';
|
|
107
195
|
}
|
|
108
196
|
}
|
|
@@ -114,7 +202,7 @@ export class ImageViewerComponent {
|
|
|
114
202
|
* Handle escape key to close
|
|
115
203
|
*/
|
|
116
204
|
onEscapeKey() {
|
|
117
|
-
if (this.
|
|
205
|
+
if (this.Visible) {
|
|
118
206
|
this.close();
|
|
119
207
|
}
|
|
120
208
|
}
|
|
@@ -122,7 +210,7 @@ export class ImageViewerComponent {
|
|
|
122
210
|
* Handle mouse wheel for zoom
|
|
123
211
|
*/
|
|
124
212
|
onWheel(event) {
|
|
125
|
-
if (!this.
|
|
213
|
+
if (!this.Visible)
|
|
126
214
|
return;
|
|
127
215
|
event.preventDefault();
|
|
128
216
|
const delta = event.deltaY > 0 ? -0.1 : 0.1;
|
|
@@ -134,95 +222,119 @@ export class ImageViewerComponent {
|
|
|
134
222
|
close() {
|
|
135
223
|
this.resetView();
|
|
136
224
|
document.body.style.overflow = '';
|
|
137
|
-
this.
|
|
225
|
+
this.Closed.emit();
|
|
138
226
|
}
|
|
139
227
|
/**
|
|
140
228
|
* Handle backdrop click
|
|
141
229
|
*/
|
|
142
|
-
|
|
230
|
+
OnBackdropClick(event) {
|
|
143
231
|
// Only close if clicking directly on backdrop
|
|
144
232
|
const target = event.target;
|
|
145
233
|
if (target.classList.contains('image-viewer-backdrop')) {
|
|
146
234
|
this.close();
|
|
147
235
|
}
|
|
148
236
|
}
|
|
237
|
+
/** @deprecated Use {@link OnBackdropClick}. */
|
|
238
|
+
onBackdropClick(event) {
|
|
239
|
+
return this.OnBackdropClick(event);
|
|
240
|
+
}
|
|
149
241
|
/**
|
|
150
242
|
* Zoom in
|
|
151
243
|
*/
|
|
152
|
-
|
|
244
|
+
ZoomIn() {
|
|
153
245
|
this.adjustZoom(0.25);
|
|
154
246
|
}
|
|
247
|
+
/** @deprecated Use {@link ZoomIn}. */
|
|
248
|
+
zoomIn() {
|
|
249
|
+
return this.ZoomIn();
|
|
250
|
+
}
|
|
155
251
|
/**
|
|
156
252
|
* Zoom out
|
|
157
253
|
*/
|
|
158
|
-
|
|
254
|
+
ZoomOut() {
|
|
159
255
|
this.adjustZoom(-0.25);
|
|
160
256
|
}
|
|
257
|
+
/** @deprecated Use {@link ZoomOut}. */
|
|
258
|
+
zoomOut() {
|
|
259
|
+
return this.ZoomOut();
|
|
260
|
+
}
|
|
161
261
|
/**
|
|
162
262
|
* Reset to 100% zoom
|
|
163
263
|
*/
|
|
264
|
+
ResetZoom() {
|
|
265
|
+
this.ZoomLevel = 1;
|
|
266
|
+
this.TranslateX = 0;
|
|
267
|
+
this.TranslateY = 0;
|
|
268
|
+
}
|
|
269
|
+
/** @deprecated Use {@link ResetZoom}. */
|
|
164
270
|
resetZoom() {
|
|
165
|
-
this.
|
|
166
|
-
this.translateX = 0;
|
|
167
|
-
this.translateY = 0;
|
|
271
|
+
return this.ResetZoom();
|
|
168
272
|
}
|
|
169
273
|
/**
|
|
170
274
|
* Fit image to screen
|
|
171
275
|
*/
|
|
172
|
-
|
|
276
|
+
FitToScreen() {
|
|
173
277
|
// Reset position and set zoom to 1 (CSS will handle fitting)
|
|
174
278
|
this.resetView();
|
|
175
279
|
}
|
|
280
|
+
/** @deprecated Use {@link FitToScreen}. */
|
|
281
|
+
fitToScreen() {
|
|
282
|
+
return this.FitToScreen();
|
|
283
|
+
}
|
|
176
284
|
/**
|
|
177
285
|
* Reset view to initial state
|
|
178
286
|
*/
|
|
179
287
|
resetView() {
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
182
|
-
this.
|
|
288
|
+
this.ZoomLevel = 1;
|
|
289
|
+
this.TranslateX = 0;
|
|
290
|
+
this.TranslateY = 0;
|
|
183
291
|
}
|
|
184
292
|
/**
|
|
185
293
|
* Adjust zoom level
|
|
186
294
|
*/
|
|
187
295
|
adjustZoom(delta, centerX, centerY) {
|
|
188
|
-
const newZoom = Math.max(this.
|
|
189
|
-
if (centerX !== undefined && centerY !== undefined && newZoom !== this.
|
|
296
|
+
const newZoom = Math.max(this.MinZoom, Math.min(this.MaxZoom, this.ZoomLevel + delta));
|
|
297
|
+
if (centerX !== undefined && centerY !== undefined && newZoom !== this.ZoomLevel) {
|
|
190
298
|
// Zoom towards mouse position
|
|
191
|
-
const factor = newZoom / this.
|
|
299
|
+
const factor = newZoom / this.ZoomLevel;
|
|
192
300
|
const imageContainer = document.querySelector('.image-container');
|
|
193
301
|
if (imageContainer) {
|
|
194
302
|
const rect = imageContainer.getBoundingClientRect();
|
|
195
|
-
const offsetX = centerX - rect.left - rect.width / 2 - this.
|
|
196
|
-
const offsetY = centerY - rect.top - rect.height / 2 - this.
|
|
197
|
-
this.
|
|
198
|
-
this.
|
|
303
|
+
const offsetX = centerX - rect.left - rect.width / 2 - this.TranslateX;
|
|
304
|
+
const offsetY = centerY - rect.top - rect.height / 2 - this.TranslateY;
|
|
305
|
+
this.TranslateX = this.TranslateX - offsetX * (factor - 1);
|
|
306
|
+
this.TranslateY = this.TranslateY - offsetY * (factor - 1);
|
|
199
307
|
}
|
|
200
308
|
}
|
|
201
|
-
this.
|
|
309
|
+
this.ZoomLevel = newZoom;
|
|
202
310
|
}
|
|
203
311
|
/**
|
|
204
312
|
* Handle mouse down for dragging
|
|
205
313
|
*/
|
|
206
|
-
|
|
314
|
+
OnMouseDown(event) {
|
|
207
315
|
if (event.button !== 0)
|
|
208
316
|
return; // Only left click
|
|
209
|
-
if (this.
|
|
317
|
+
if (this.ZoomLevel <= 1)
|
|
210
318
|
return; // Only allow pan when zoomed in
|
|
211
|
-
this.
|
|
319
|
+
this.IsDragging = true;
|
|
212
320
|
this.lastMouseX = event.clientX;
|
|
213
321
|
this.lastMouseY = event.clientY;
|
|
214
322
|
event.preventDefault();
|
|
215
323
|
}
|
|
324
|
+
/** @deprecated Use {@link OnMouseDown}. */
|
|
325
|
+
onMouseDown(event) {
|
|
326
|
+
return this.OnMouseDown(event);
|
|
327
|
+
}
|
|
216
328
|
/**
|
|
217
329
|
* Handle mouse move for dragging
|
|
218
330
|
*/
|
|
219
331
|
onMouseMove(event) {
|
|
220
|
-
if (!this.
|
|
332
|
+
if (!this.IsDragging)
|
|
221
333
|
return;
|
|
222
334
|
const deltaX = event.clientX - this.lastMouseX;
|
|
223
335
|
const deltaY = event.clientY - this.lastMouseY;
|
|
224
|
-
this.
|
|
225
|
-
this.
|
|
336
|
+
this.TranslateX += deltaX;
|
|
337
|
+
this.TranslateY += deltaY;
|
|
226
338
|
this.lastMouseX = event.clientX;
|
|
227
339
|
this.lastMouseY = event.clientY;
|
|
228
340
|
}
|
|
@@ -230,33 +342,45 @@ export class ImageViewerComponent {
|
|
|
230
342
|
* Handle mouse up to stop dragging
|
|
231
343
|
*/
|
|
232
344
|
onMouseUp() {
|
|
233
|
-
this.
|
|
345
|
+
this.IsDragging = false;
|
|
234
346
|
}
|
|
235
347
|
/**
|
|
236
348
|
* Download the image
|
|
237
349
|
*/
|
|
238
|
-
|
|
350
|
+
DownloadImage() {
|
|
239
351
|
const link = document.createElement('a');
|
|
240
|
-
link.href = this.
|
|
241
|
-
link.download = this.
|
|
352
|
+
link.href = this.ImageUrl;
|
|
353
|
+
link.download = this.FileName;
|
|
242
354
|
link.click();
|
|
243
355
|
}
|
|
356
|
+
/** @deprecated Use {@link DownloadImage}. */
|
|
357
|
+
downloadImage() {
|
|
358
|
+
return this.DownloadImage();
|
|
359
|
+
}
|
|
244
360
|
/**
|
|
245
361
|
* Get current zoom percentage for display
|
|
246
362
|
*/
|
|
363
|
+
get ZoomPercentage() {
|
|
364
|
+
return Math.round(this.ZoomLevel * 100) + '%';
|
|
365
|
+
}
|
|
366
|
+
/** @deprecated Use {@link ZoomPercentage}. */
|
|
247
367
|
get zoomPercentage() {
|
|
248
|
-
return
|
|
368
|
+
return this.ZoomPercentage;
|
|
249
369
|
}
|
|
250
370
|
/**
|
|
251
371
|
* Get transform style for image
|
|
252
372
|
*/
|
|
373
|
+
get ImageTransform() {
|
|
374
|
+
return `translate(${this.TranslateX}px, ${this.TranslateY}px) scale(${this.ZoomLevel})`;
|
|
375
|
+
}
|
|
376
|
+
/** @deprecated Use {@link ImageTransform}. */
|
|
253
377
|
get imageTransform() {
|
|
254
|
-
return
|
|
378
|
+
return this.ImageTransform;
|
|
255
379
|
}
|
|
256
380
|
static ɵfac = function ImageViewerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ImageViewerComponent)(); };
|
|
257
381
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ImageViewerComponent, selectors: [["mj-image-viewer"]], hostBindings: function ImageViewerComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
258
382
|
i0.ɵɵlistener("keydown.escape", function ImageViewerComponent_keydown_escape_HostBindingHandler() { return ctx.onEscapeKey(); }, i0.ɵɵresolveDocument)("wheel", function ImageViewerComponent_wheel_HostBindingHandler($event) { return ctx.onWheel($event); })("mousemove", function ImageViewerComponent_mousemove_HostBindingHandler($event) { return ctx.onMouseMove($event); }, i0.ɵɵresolveDocument)("mouseup", function ImageViewerComponent_mouseup_HostBindingHandler() { return ctx.onMouseUp(); }, i0.ɵɵresolveDocument);
|
|
259
|
-
} }, inputs: { imageUrl: "imageUrl", alt: "alt", fileName: "fileName", visible: "visible" }, outputs: { closed: "closed" }, standalone: false, decls: 1, vars: 1, consts: [[1, "image-viewer-backdrop"], [1, "image-viewer-backdrop", 3, "click"], [1, "viewer-toolbar"], [1, "toolbar-left"], [1, "file-name"], [1, "toolbar-center"], ["title", "Zoom Out", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-minus"], [1, "zoom-display"], ["title", "Zoom In", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "toolbar-separator"], ["title", "Reset Zoom (100%)", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-expand"], ["title", "Fit to Screen", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-compress"], [1, "toolbar-right"], ["title", "Download", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-download"], ["title", "Close (Esc)", 1, "toolbar-btn", "close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "image-container", 3, "mousedown"], ["draggable", "false", 1, "viewer-image", 3, "src", "alt"], [1, "viewer-instructions"], [1, "separator"]], template: function ImageViewerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
383
|
+
} }, inputs: { ImageUrl: "ImageUrl", imageUrl: "imageUrl", Alt: "Alt", alt: "alt", FileName: "FileName", fileName: "fileName", Visible: "Visible", visible: "visible" }, outputs: { Closed: "Closed", closed: "closed" }, standalone: false, decls: 1, vars: 1, consts: [[1, "image-viewer-backdrop"], [1, "image-viewer-backdrop", 3, "click"], [1, "viewer-toolbar"], [1, "toolbar-left"], [1, "file-name"], [1, "toolbar-center"], ["title", "Zoom Out", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-minus"], [1, "zoom-display"], ["title", "Zoom In", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "toolbar-separator"], ["title", "Reset Zoom (100%)", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-expand"], ["title", "Fit to Screen", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-compress"], [1, "toolbar-right"], ["title", "Download", 1, "toolbar-btn", 3, "click"], [1, "fa-solid", "fa-download"], ["title", "Close (Esc)", 1, "toolbar-btn", "close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "image-container", 3, "mousedown"], ["draggable", "false", 1, "viewer-image", 3, "src", "alt"], [1, "viewer-instructions"], [1, "separator"]], template: function ImageViewerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
260
384
|
i0.ɵɵconditionalCreate(0, ImageViewerComponent_Conditional_0_Template, 34, 8, "div", 0);
|
|
261
385
|
} if (rf & 2) {
|
|
262
386
|
i0.ɵɵconditional(ctx.visible ? 0 : -1);
|
|
@@ -265,14 +389,24 @@ export class ImageViewerComponent {
|
|
|
265
389
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ImageViewerComponent, [{
|
|
266
390
|
type: Component,
|
|
267
391
|
args: [{ standalone: false, selector: 'mj-image-viewer', template: "@if (visible) {\n <div class=\"image-viewer-backdrop\"\n (click)=\"onBackdropClick($event)\">\n <!-- Toolbar -->\n <div class=\"viewer-toolbar\">\n <div class=\"toolbar-left\">\n @if (fileName) {\n <span class=\"file-name\">{{ fileName }}</span>\n }\n </div>\n <div class=\"toolbar-center\">\n <button class=\"toolbar-btn\" (click)=\"zoomOut()\" title=\"Zoom Out\">\n <i class=\"fa-solid fa-minus\"></i>\n </button>\n <span class=\"zoom-display\">{{ zoomPercentage }}</span>\n <button class=\"toolbar-btn\" (click)=\"zoomIn()\" title=\"Zoom In\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n <div class=\"toolbar-separator\"></div>\n <button class=\"toolbar-btn\" (click)=\"resetZoom()\" title=\"Reset Zoom (100%)\">\n <i class=\"fa-solid fa-expand\"></i>\n </button>\n <button class=\"toolbar-btn\" (click)=\"fitToScreen()\" title=\"Fit to Screen\">\n <i class=\"fa-solid fa-compress\"></i>\n </button>\n </div>\n <div class=\"toolbar-right\">\n <button class=\"toolbar-btn\" (click)=\"downloadImage()\" title=\"Download\">\n <i class=\"fa-solid fa-download\"></i>\n </button>\n <button class=\"toolbar-btn close-btn\" (click)=\"close()\" title=\"Close (Esc)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n <!-- Image Container -->\n <div class=\"image-container\"\n (mousedown)=\"onMouseDown($event)\"\n [style.cursor]=\"zoomLevel > 1 ? (isDragging ? 'grabbing' : 'grab') : 'default'\">\n <img [src]=\"imageUrl\"\n [alt]=\"alt\"\n class=\"viewer-image\"\n [style.transform]=\"imageTransform\"\n draggable=\"false\">\n </div>\n <!-- Instructions -->\n <div class=\"viewer-instructions\">\n <span>Scroll to zoom</span>\n <span class=\"separator\">|</span>\n <span>Drag to pan when zoomed</span>\n <span class=\"separator\">|</span>\n <span>Esc to close</span>\n </div>\n </div>\n}\n", styles: [".image-viewer-backdrop {\n position: fixed;\n inset: 0;\n z-index: 10000;\n background: rgba(0, 0, 0, 0.92);\n display: flex;\n flex-direction: column;\n animation: fadeIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Toolbar */\n.viewer-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(10px);\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.toolbar-left,\n.toolbar-center,\n.toolbar-right {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.toolbar-left {\n flex: 1;\n min-width: 0;\n}\n\n.toolbar-right {\n flex: 1;\n justify-content: flex-end;\n}\n\n.file-name {\n color: rgba(255, 255, 255, 0.9);\n font-size: 14px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n\n.toolbar-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n cursor: pointer;\n transition: background 0.2s, transform 0.15s;\n}\n\n.toolbar-btn:hover {\n background: rgba(255, 255, 255, 0.2);\n transform: scale(1.05);\n}\n\n.toolbar-btn:active {\n transform: scale(0.95);\n}\n\n.toolbar-btn.close-btn {\n background: color-mix(in srgb, var(--mj-status-error) 20%, transparent);\n}\n\n.toolbar-btn.close-btn:hover {\n background: color-mix(in srgb, var(--mj-status-error) 40%, transparent);\n}\n\n.toolbar-btn i {\n font-size: 14px;\n}\n\n.zoom-display {\n color: rgba(255, 255, 255, 0.9);\n font-size: 13px;\n font-weight: 500;\n min-width: 50px;\n text-align: center;\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;\n}\n\n.toolbar-separator {\n width: 1px;\n height: 20px;\n background: rgba(255, 255, 255, 0.2);\n margin: 0 4px;\n}\n\n/* Image Container */\n.image-container {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n padding: 20px;\n}\n\n.viewer-image {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n transition: transform 0.1s ease-out;\n user-select: none;\n pointer-events: none;\n border-radius: 4px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);\n}\n\n/* Instructions */\n.viewer-instructions {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 10px;\n color: rgba(255, 255, 255, 0.5);\n font-size: 12px;\n}\n\n.viewer-instructions .separator {\n opacity: 0.3;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .viewer-toolbar {\n padding: 8px 12px;\n }\n\n .toolbar-btn {\n width: 32px;\n height: 32px;\n }\n\n .file-name {\n max-width: 150px;\n font-size: 12px;\n }\n\n .zoom-display {\n min-width: 40px;\n font-size: 11px;\n }\n\n .viewer-instructions {\n font-size: 10px;\n padding: 8px;\n }\n\n .image-container {\n padding: 10px;\n }\n}\n\n/* Touch support */\n@media (hover: none) {\n .toolbar-btn:hover {\n background: rgba(255, 255, 255, 0.1);\n transform: none;\n }\n\n .toolbar-btn.close-btn:hover {\n background: color-mix(in srgb, var(--mj-status-error) 20%, transparent);\n }\n\n .viewer-instructions {\n display: none;\n }\n}\n"] }]
|
|
268
|
-
}], null, {
|
|
392
|
+
}], null, { ImageUrl: [{
|
|
393
|
+
type: Input
|
|
394
|
+
}], imageUrl: [{
|
|
395
|
+
type: Input
|
|
396
|
+
}], Alt: [{
|
|
269
397
|
type: Input
|
|
270
398
|
}], alt: [{
|
|
271
399
|
type: Input
|
|
400
|
+
}], FileName: [{
|
|
401
|
+
type: Input
|
|
272
402
|
}], fileName: [{
|
|
273
403
|
type: Input
|
|
404
|
+
}], Visible: [{
|
|
405
|
+
type: Input
|
|
274
406
|
}], visible: [{
|
|
275
407
|
type: Input
|
|
408
|
+
}], Closed: [{
|
|
409
|
+
type: Output
|
|
276
410
|
}], closed: [{
|
|
277
411
|
type: Output
|
|
278
412
|
}], onEscapeKey: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-viewer.component.js","sourceRoot":"","sources":["../../../../src/lib/components/attachment/image-viewer.component.ts","../../../../src/lib/components/attachment/image-viewer.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EAGb,MAAM,eAAe,CAAC;;;ICDb,+BAAwB;IAAA,YAAc;IAAA,iBAAO;;;IAArB,cAAc;IAAd,qCAAc;;;;IAN9C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BAGL,MAAM;;kBA6BN,YAAY;mBAAC,yBAAyB;;kBAUtC,YAAY;mBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;kBA4GhC,YAAY;mBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;kBAiB7C,YAAY;mBAAC,kBAAkB;;kFAlLrB,oBAAoB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n HostListener,\n OnInit,\n OnDestroy\n} from '@angular/core';\n\n/**\n * Full-screen image viewer modal with zoom and pan capabilities.\n * Provides a lightbox-style experience for viewing attachment images.\n */\n@Component({\n standalone: false,\n selector: 'mj-image-viewer',\n templateUrl: './image-viewer.component.html',\n styleUrls: ['./image-viewer.component.css']\n})\nexport class ImageViewerComponent implements OnInit, OnDestroy {\n /** Image source URL (can be data URL or regular URL) */\n @Input() imageUrl: string = '';\n\n /** Image alt text */\n @Input() alt: string = 'Image';\n\n /** Image filename for download */\n @Input() fileName: string = 'image';\n\n /** Whether the viewer is visible */\n @Input() visible: boolean = false;\n\n /** Emits when the viewer should be closed */\n @Output() closed = new EventEmitter<void>();\n\n // Zoom and pan state\n public zoomLevel: number = 1;\n public minZoom: number = 0.1;\n public maxZoom: number = 5;\n public translateX: number = 0;\n public translateY: number = 0;\n\n // Drag state\n public isDragging: boolean = false;\n private lastMouseX: number = 0;\n private lastMouseY: number = 0;\n\n ngOnInit(): void {\n // Lock body scroll when viewer is open\n if (this.visible) {\n document.body.style.overflow = 'hidden';\n }\n }\n\n ngOnDestroy(): void {\n // Restore body scroll\n document.body.style.overflow = '';\n }\n\n /**\n * Handle escape key to close\n */\n @HostListener('document:keydown.escape')\n onEscapeKey(): void {\n if (this.visible) {\n this.close();\n }\n }\n\n /**\n * Handle mouse wheel for zoom\n */\n @HostListener('wheel', ['$event'])\n onWheel(event: WheelEvent): void {\n if (!this.visible) return;\n event.preventDefault();\n\n const delta = event.deltaY > 0 ? -0.1 : 0.1;\n this.adjustZoom(delta, event.clientX, event.clientY);\n }\n\n /**\n * Close the viewer\n */\n close(): void {\n this.resetView();\n document.body.style.overflow = '';\n this.closed.emit();\n }\n\n /**\n * Handle backdrop click\n */\n onBackdropClick(event: MouseEvent): void {\n // Only close if clicking directly on backdrop\n const target = event.target as HTMLElement;\n if (target.classList.contains('image-viewer-backdrop')) {\n this.close();\n }\n }\n\n /**\n * Zoom in\n */\n zoomIn(): void {\n this.adjustZoom(0.25);\n }\n\n /**\n * Zoom out\n */\n zoomOut(): void {\n this.adjustZoom(-0.25);\n }\n\n /**\n * Reset to 100% zoom\n */\n resetZoom(): void {\n this.zoomLevel = 1;\n this.translateX = 0;\n this.translateY = 0;\n }\n\n /**\n * Fit image to screen\n */\n fitToScreen(): void {\n // Reset position and set zoom to 1 (CSS will handle fitting)\n this.resetView();\n }\n\n /**\n * Reset view to initial state\n */\n private resetView(): void {\n this.zoomLevel = 1;\n this.translateX = 0;\n this.translateY = 0;\n }\n\n /**\n * Adjust zoom level\n */\n private adjustZoom(delta: number, centerX?: number, centerY?: number): void {\n const newZoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.zoomLevel + delta));\n\n if (centerX !== undefined && centerY !== undefined && newZoom !== this.zoomLevel) {\n // Zoom towards mouse position\n const factor = newZoom / this.zoomLevel;\n const imageContainer = document.querySelector('.image-container') as HTMLElement;\n if (imageContainer) {\n const rect = imageContainer.getBoundingClientRect();\n const offsetX = centerX - rect.left - rect.width / 2 - this.translateX;\n const offsetY = centerY - rect.top - rect.height / 2 - this.translateY;\n\n this.translateX = this.translateX - offsetX * (factor - 1);\n this.translateY = this.translateY - offsetY * (factor - 1);\n }\n }\n\n this.zoomLevel = newZoom;\n }\n\n /**\n * Handle mouse down for dragging\n */\n onMouseDown(event: MouseEvent): void {\n if (event.button !== 0) return; // Only left click\n if (this.zoomLevel <= 1) return; // Only allow pan when zoomed in\n\n this.isDragging = true;\n this.lastMouseX = event.clientX;\n this.lastMouseY = event.clientY;\n event.preventDefault();\n }\n\n /**\n * Handle mouse move for dragging\n */\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isDragging) return;\n\n const deltaX = event.clientX - this.lastMouseX;\n const deltaY = event.clientY - this.lastMouseY;\n\n this.translateX += deltaX;\n this.translateY += deltaY;\n\n this.lastMouseX = event.clientX;\n this.lastMouseY = event.clientY;\n }\n\n /**\n * Handle mouse up to stop dragging\n */\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.isDragging = false;\n }\n\n /**\n * Download the image\n */\n downloadImage(): void {\n const link = document.createElement('a');\n link.href = this.imageUrl;\n link.download = this.fileName;\n link.click();\n }\n\n /**\n * Get current zoom percentage for display\n */\n get zoomPercentage(): string {\n return Math.round(this.zoomLevel * 100) + '%';\n }\n\n /**\n * Get transform style for image\n */\n get imageTransform(): string {\n return `translate(${this.translateX}px, ${this.translateY}px) scale(${this.zoomLevel})`;\n }\n}\n","@if (visible) {\n <div class=\"image-viewer-backdrop\"\n (click)=\"onBackdropClick($event)\">\n <!-- Toolbar -->\n <div class=\"viewer-toolbar\">\n <div class=\"toolbar-left\">\n @if (fileName) {\n <span class=\"file-name\">{{ fileName }}</span>\n }\n </div>\n <div class=\"toolbar-center\">\n <button class=\"toolbar-btn\" (click)=\"zoomOut()\" title=\"Zoom Out\">\n <i class=\"fa-solid fa-minus\"></i>\n </button>\n <span class=\"zoom-display\">{{ zoomPercentage }}</span>\n <button class=\"toolbar-btn\" (click)=\"zoomIn()\" title=\"Zoom In\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n <div class=\"toolbar-separator\"></div>\n <button class=\"toolbar-btn\" (click)=\"resetZoom()\" title=\"Reset Zoom (100%)\">\n <i class=\"fa-solid fa-expand\"></i>\n </button>\n <button class=\"toolbar-btn\" (click)=\"fitToScreen()\" title=\"Fit to Screen\">\n <i class=\"fa-solid fa-compress\"></i>\n </button>\n </div>\n <div class=\"toolbar-right\">\n <button class=\"toolbar-btn\" (click)=\"downloadImage()\" title=\"Download\">\n <i class=\"fa-solid fa-download\"></i>\n </button>\n <button class=\"toolbar-btn close-btn\" (click)=\"close()\" title=\"Close (Esc)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n <!-- Image Container -->\n <div class=\"image-container\"\n (mousedown)=\"onMouseDown($event)\"\n [style.cursor]=\"zoomLevel > 1 ? (isDragging ? 'grabbing' : 'grab') : 'default'\">\n <img [src]=\"imageUrl\"\n [alt]=\"alt\"\n class=\"viewer-image\"\n [style.transform]=\"imageTransform\"\n draggable=\"false\">\n </div>\n <!-- Instructions -->\n <div class=\"viewer-instructions\">\n <span>Scroll to zoom</span>\n <span class=\"separator\">|</span>\n <span>Drag to pan when zoomed</span>\n <span class=\"separator\">|</span>\n <span>Esc to close</span>\n </div>\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"image-viewer.component.js","sourceRoot":"","sources":["../../../../src/lib/components/attachment/image-viewer.component.ts","../../../../src/lib/components/attachment/image-viewer.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EAGb,MAAM,eAAe,CAAC;;;ICDb,+BAAwB;IAAA,YAAc;IAAA,iBAAO;;;IAArB,cAAc;IAAd,qCAAc;;;;IAN9C,8BACoC;IAAlC,2LAAS,8BAAuB,KAAC;IAG/B,AADF,8BAA4B,aACA;IACxB,qGAAgB;IAGlB,iBAAM;IAEJ,AADF,8BAA4B,gBACuC;IAArC,wLAAS,gBAAS,KAAC;IAC7C,uBAAiC;IACnC,iBAAS;IACT,+BAA2B;IAAA,YAAoB;IAAA,iBAAO;IACtD,iCAA+D;IAAnC,wLAAS,eAAQ,KAAC;IAC5C,yBAAgC;IAClC,iBAAS;IACT,2BAAqC;IACrC,mCAA4E;IAAhD,yLAAS,kBAAW,KAAC;IAC/C,yBAAkC;IACpC,iBAAS;IACT,mCAA0E;IAA9C,yLAAS,oBAAa,KAAC;IACjD,yBAAoC;IAExC,AADE,iBAAS,EACL;IAEJ,AADF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Input,\n Output,\n EventEmitter,\n HostListener,\n OnInit,\n OnDestroy\n} from '@angular/core';\n\n/**\n * Full-screen image viewer modal with zoom and pan capabilities.\n * Provides a lightbox-style experience for viewing attachment images.\n */\n@Component({\n standalone: false,\n selector: 'mj-image-viewer',\n templateUrl: './image-viewer.component.html',\n styleUrls: ['./image-viewer.component.css']\n})\nexport class ImageViewerComponent implements OnInit, OnDestroy {\n /** Image source URL (can be data URL or regular URL) */\n @Input() ImageUrl: string = '';\n\n /** @deprecated Use {@link ImageUrl}. */\n @Input() set imageUrl(value: string) {\n this.ImageUrl = value;\n }\n /** @deprecated Use {@link ImageUrl}. */\n get imageUrl(): string {\n return this.ImageUrl;\n }\n\n /** Image alt text */\n @Input() Alt: string = 'Image';\n\n /** @deprecated Use {@link Alt}. */\n @Input() set alt(value: string) {\n this.Alt = value;\n }\n /** @deprecated Use {@link Alt}. */\n get alt(): string {\n return this.Alt;\n }\n\n /** Image filename for download */\n @Input() FileName: string = 'image';\n\n /** @deprecated Use {@link FileName}. */\n @Input() set fileName(value: string) {\n this.FileName = value;\n }\n /** @deprecated Use {@link FileName}. */\n get fileName(): string {\n return this.FileName;\n }\n\n /** Whether the viewer is visible */\n @Input() Visible: boolean = false;\n\n /** @deprecated Use {@link Visible}. */\n @Input() set visible(value: boolean) {\n this.Visible = value;\n }\n /** @deprecated Use {@link Visible}. */\n get visible(): boolean {\n return this.Visible;\n }\n\n /** Emits when the viewer should be closed */\n @Output() Closed = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Closed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (closed) keeps working. Must stay AFTER Closed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() closed = this.Closed;\n\n // Zoom and pan state\n public ZoomLevel: number = 1;\n\n /** @deprecated Use {@link ZoomLevel}. */\n public get zoomLevel(): number {\n return this.ZoomLevel;\n }\n /** @deprecated Use {@link ZoomLevel}. */\n public set zoomLevel(value: number) {\n this.ZoomLevel = value;\n }\n public MinZoom: number = 0.1;\n\n /** @deprecated Use {@link MinZoom}. */\n public get minZoom(): number {\n return this.MinZoom;\n }\n /** @deprecated Use {@link MinZoom}. */\n public set minZoom(value: number) {\n this.MinZoom = value;\n }\n public MaxZoom: number = 5;\n\n /** @deprecated Use {@link MaxZoom}. */\n public get maxZoom(): number {\n return this.MaxZoom;\n }\n /** @deprecated Use {@link MaxZoom}. */\n public set maxZoom(value: number) {\n this.MaxZoom = value;\n }\n public TranslateX: number = 0;\n\n /** @deprecated Use {@link TranslateX}. */\n public get translateX(): number {\n return this.TranslateX;\n }\n /** @deprecated Use {@link TranslateX}. */\n public set translateX(value: number) {\n this.TranslateX = value;\n }\n public TranslateY: number = 0;\n\n /** @deprecated Use {@link TranslateY}. */\n public get translateY(): number {\n return this.TranslateY;\n }\n /** @deprecated Use {@link TranslateY}. */\n public set translateY(value: number) {\n this.TranslateY = value;\n }\n\n // Drag state\n public IsDragging: boolean = false;\n\n /** @deprecated Use {@link IsDragging}. */\n public get isDragging(): boolean {\n return this.IsDragging;\n }\n /** @deprecated Use {@link IsDragging}. */\n public set isDragging(value: boolean) {\n this.IsDragging = value;\n }\n private lastMouseX: number = 0;\n private lastMouseY: number = 0;\n\n ngOnInit(): void {\n // Lock body scroll when viewer is open\n if (this.Visible) {\n document.body.style.overflow = 'hidden';\n }\n }\n\n ngOnDestroy(): void {\n // Restore body scroll\n document.body.style.overflow = '';\n }\n\n /**\n * Handle escape key to close\n */\n @HostListener('document:keydown.escape')\n onEscapeKey(): void {\n if (this.Visible) {\n this.close();\n }\n }\n\n /**\n * Handle mouse wheel for zoom\n */\n @HostListener('wheel', ['$event'])\n onWheel(event: WheelEvent): void {\n if (!this.Visible) return;\n event.preventDefault();\n\n const delta = event.deltaY > 0 ? -0.1 : 0.1;\n this.adjustZoom(delta, event.clientX, event.clientY);\n }\n\n /**\n * Close the viewer\n */\n close(): void {\n this.resetView();\n document.body.style.overflow = '';\n this.Closed.emit();\n }\n\n /**\n * Handle backdrop click\n */\n OnBackdropClick(event: MouseEvent): void {\n // Only close if clicking directly on backdrop\n const target = event.target as HTMLElement;\n if (target.classList.contains('image-viewer-backdrop')) {\n this.close();\n }\n }\n\n /** @deprecated Use {@link OnBackdropClick}. */\n onBackdropClick(event: MouseEvent): void {\n return this.OnBackdropClick(event);\n }\n\n /**\n * Zoom in\n */\n ZoomIn(): void {\n this.adjustZoom(0.25);\n }\n\n /** @deprecated Use {@link ZoomIn}. */\n zoomIn(): void {\n return this.ZoomIn();\n }\n\n /**\n * Zoom out\n */\n ZoomOut(): void {\n this.adjustZoom(-0.25);\n }\n\n /** @deprecated Use {@link ZoomOut}. */\n zoomOut(): void {\n return this.ZoomOut();\n }\n\n /**\n * Reset to 100% zoom\n */\n ResetZoom(): void {\n this.ZoomLevel = 1;\n this.TranslateX = 0;\n this.TranslateY = 0;\n }\n\n /** @deprecated Use {@link ResetZoom}. */\n resetZoom(): void {\n return this.ResetZoom();\n }\n\n /**\n * Fit image to screen\n */\n FitToScreen(): void {\n // Reset position and set zoom to 1 (CSS will handle fitting)\n this.resetView();\n }\n\n /** @deprecated Use {@link FitToScreen}. */\n fitToScreen(): void {\n return this.FitToScreen();\n }\n\n /**\n * Reset view to initial state\n */\n private resetView(): void {\n this.ZoomLevel = 1;\n this.TranslateX = 0;\n this.TranslateY = 0;\n }\n\n /**\n * Adjust zoom level\n */\n private adjustZoom(delta: number, centerX?: number, centerY?: number): void {\n const newZoom = Math.max(this.MinZoom, Math.min(this.MaxZoom, this.ZoomLevel + delta));\n\n if (centerX !== undefined && centerY !== undefined && newZoom !== this.ZoomLevel) {\n // Zoom towards mouse position\n const factor = newZoom / this.ZoomLevel;\n const imageContainer = document.querySelector('.image-container') as HTMLElement;\n if (imageContainer) {\n const rect = imageContainer.getBoundingClientRect();\n const offsetX = centerX - rect.left - rect.width / 2 - this.TranslateX;\n const offsetY = centerY - rect.top - rect.height / 2 - this.TranslateY;\n\n this.TranslateX = this.TranslateX - offsetX * (factor - 1);\n this.TranslateY = this.TranslateY - offsetY * (factor - 1);\n }\n }\n\n this.ZoomLevel = newZoom;\n }\n\n /**\n * Handle mouse down for dragging\n */\n OnMouseDown(event: MouseEvent): void {\n if (event.button !== 0) return; // Only left click\n if (this.ZoomLevel <= 1) return; // Only allow pan when zoomed in\n\n this.IsDragging = true;\n this.lastMouseX = event.clientX;\n this.lastMouseY = event.clientY;\n event.preventDefault();\n }\n\n /** @deprecated Use {@link OnMouseDown}. */\n onMouseDown(event: MouseEvent): void {\n return this.OnMouseDown(event);\n }\n\n /**\n * Handle mouse move for dragging\n */\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.IsDragging) return;\n\n const deltaX = event.clientX - this.lastMouseX;\n const deltaY = event.clientY - this.lastMouseY;\n\n this.TranslateX += deltaX;\n this.TranslateY += deltaY;\n\n this.lastMouseX = event.clientX;\n this.lastMouseY = event.clientY;\n }\n\n /**\n * Handle mouse up to stop dragging\n */\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.IsDragging = false;\n }\n\n /**\n * Download the image\n */\n DownloadImage(): void {\n const link = document.createElement('a');\n link.href = this.ImageUrl;\n link.download = this.FileName;\n link.click();\n }\n\n /** @deprecated Use {@link DownloadImage}. */\n downloadImage(): void {\n return this.DownloadImage();\n }\n\n /**\n * Get current zoom percentage for display\n */\n get ZoomPercentage(): string {\n return Math.round(this.ZoomLevel * 100) + '%';\n }\n\n /** @deprecated Use {@link ZoomPercentage}. */\n get zoomPercentage(): string {\n return this.ZoomPercentage;\n }\n\n /**\n * Get transform style for image\n */\n get ImageTransform(): string {\n return `translate(${this.TranslateX}px, ${this.TranslateY}px) scale(${this.ZoomLevel})`;\n }\n\n /** @deprecated Use {@link ImageTransform}. */\n get imageTransform(): string {\n return this.ImageTransform;\n }\n}\n","@if (visible) {\n <div class=\"image-viewer-backdrop\"\n (click)=\"onBackdropClick($event)\">\n <!-- Toolbar -->\n <div class=\"viewer-toolbar\">\n <div class=\"toolbar-left\">\n @if (fileName) {\n <span class=\"file-name\">{{ fileName }}</span>\n }\n </div>\n <div class=\"toolbar-center\">\n <button class=\"toolbar-btn\" (click)=\"zoomOut()\" title=\"Zoom Out\">\n <i class=\"fa-solid fa-minus\"></i>\n </button>\n <span class=\"zoom-display\">{{ zoomPercentage }}</span>\n <button class=\"toolbar-btn\" (click)=\"zoomIn()\" title=\"Zoom In\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n <div class=\"toolbar-separator\"></div>\n <button class=\"toolbar-btn\" (click)=\"resetZoom()\" title=\"Reset Zoom (100%)\">\n <i class=\"fa-solid fa-expand\"></i>\n </button>\n <button class=\"toolbar-btn\" (click)=\"fitToScreen()\" title=\"Fit to Screen\">\n <i class=\"fa-solid fa-compress\"></i>\n </button>\n </div>\n <div class=\"toolbar-right\">\n <button class=\"toolbar-btn\" (click)=\"downloadImage()\" title=\"Download\">\n <i class=\"fa-solid fa-download\"></i>\n </button>\n <button class=\"toolbar-btn close-btn\" (click)=\"close()\" title=\"Close (Esc)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n <!-- Image Container -->\n <div class=\"image-container\"\n (mousedown)=\"onMouseDown($event)\"\n [style.cursor]=\"zoomLevel > 1 ? (isDragging ? 'grabbing' : 'grab') : 'default'\">\n <img [src]=\"imageUrl\"\n [alt]=\"alt\"\n class=\"viewer-image\"\n [style.transform]=\"imageTransform\"\n draggable=\"false\">\n </div>\n <!-- Instructions -->\n <div class=\"viewer-instructions\">\n <span>Scroll to zoom</span>\n <span class=\"separator\">|</span>\n <span>Drag to pan when zoomed</span>\n <span class=\"separator\">|</span>\n <span>Esc to close</span>\n </div>\n </div>\n}\n"]}
|