@memberjunction/ng-conversations 6.1.4 → 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 +36 -3
- 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 +2407 -731
- 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/channels/channel-onboarding-panel.component.d.ts +1 -1
- package/dist/lib/components/realtime/channels/channel-onboarding-panel.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/channel-onboarding-panel.component.js.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js +3 -0
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts +2 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +1 -1
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts.map +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-agent-banner.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts +3 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +26 -8
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts.map +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 +4 -4
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +19 -19
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.d.ts +2 -3
- package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js +3 -2
- package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts +17 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js +122 -45
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts +47 -31
- 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 +138 -124
- 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 +4 -4
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
- 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 +2 -2
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +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/remote-browser/remote-browser-channel.d.ts +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +4 -2
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +7 -3
- 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/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.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/browser-realtime-media-host.d.ts +24 -0
- package/dist/lib/services/browser-realtime-media-host.d.ts.map +1 -0
- package/dist/lib/services/browser-realtime-media-host.js +95 -0
- package/dist/lib/services/browser-realtime-media-host.js.map +1 -0
- 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 +41 -2
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-attachment.service.js +80 -13
- 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/graphql-attachment-blob-store.d.ts +44 -0
- package/dist/lib/services/graphql-attachment-blob-store.d.ts.map +1 -0
- package/dist/lib/services/graphql-attachment-blob-store.js +113 -0
- package/dist/lib/services/graphql-attachment-blob-store.js.map +1 -0
- package/dist/lib/services/mention-autocomplete.service.d.ts +17 -141
- package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.js +15 -460
- package/dist/lib/services/mention-autocomplete.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/realtime-session-review.service.d.ts +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js +1 -1
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts +16 -1150
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +28 -2430
- package/dist/lib/services/realtime-session.service.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/lib/utils/realtime-session-timeline.d.ts +8 -79
- package/dist/lib/utils/realtime-session-timeline.d.ts.map +1 -1
- package/dist/lib/utils/realtime-session-timeline.js +8 -89
- package/dist/lib/utils/realtime-session-timeline.js.map +1 -1
- package/dist/public-api.d.ts +5 -2
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +9 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +33 -32
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts +0 -384
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts.map +0 -1
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.js +0 -231
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.js.map +0 -1
- package/dist/lib/services/delegation-result-parser.d.ts +0 -50
- package/dist/lib/services/delegation-result-parser.d.ts.map +0 -1
- package/dist/lib/services/delegation-result-parser.js +0 -60
- package/dist/lib/services/delegation-result-parser.js.map +0 -1
- package/dist/lib/services/narration-template.d.ts +0 -42
- package/dist/lib/services/narration-template.d.ts.map +0 -1
- package/dist/lib/services/narration-template.js +0 -73
- package/dist/lib/services/narration-template.js.map +0 -1
- package/dist/lib/services/skill-picker-narrowing.d.ts +0 -13
- package/dist/lib/services/skill-picker-narrowing.d.ts.map +0 -1
- package/dist/lib/services/skill-picker-narrowing.js +0 -13
- package/dist/lib/services/skill-picker-narrowing.js.map +0 -1
|
@@ -58,14 +58,70 @@ export class CollectionArtifactCardComponent {
|
|
|
58
58
|
artifactPermissionService;
|
|
59
59
|
artifactIconService;
|
|
60
60
|
cdr;
|
|
61
|
-
|
|
61
|
+
Artifact;
|
|
62
|
+
/** @deprecated Use {@link Artifact}. */
|
|
63
|
+
set artifact(value) {
|
|
64
|
+
this.Artifact = value;
|
|
65
|
+
}
|
|
66
|
+
/** @deprecated Use {@link Artifact}. */
|
|
67
|
+
get artifact() {
|
|
68
|
+
return this.Artifact;
|
|
69
|
+
}
|
|
62
70
|
version; // Optional version info
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
CurrentUser;
|
|
72
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
73
|
+
set currentUser(value) {
|
|
74
|
+
this.CurrentUser = value;
|
|
75
|
+
}
|
|
76
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
77
|
+
get currentUser() {
|
|
78
|
+
return this.CurrentUser;
|
|
79
|
+
}
|
|
80
|
+
Selected = new EventEmitter();
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated Use {@link Selected}.
|
|
83
|
+
*
|
|
84
|
+
* The same emitter under the old binding name, so a template still binding
|
|
85
|
+
* (selected) keeps working. Must stay AFTER Selected: class fields
|
|
86
|
+
* initialise in order, and the other way round this captures undefined.
|
|
87
|
+
*/
|
|
88
|
+
selected = this.Selected;
|
|
89
|
+
Viewed = new EventEmitter();
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated Use {@link Viewed}.
|
|
92
|
+
*
|
|
93
|
+
* The same emitter under the old binding name, so a template still binding
|
|
94
|
+
* (viewed) keeps working. Must stay AFTER Viewed: class fields
|
|
95
|
+
* initialise in order, and the other way round this captures undefined.
|
|
96
|
+
*/
|
|
97
|
+
viewed = this.Viewed;
|
|
98
|
+
Shared = new EventEmitter();
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Use {@link Shared}.
|
|
101
|
+
*
|
|
102
|
+
* The same emitter under the old binding name, so a template still binding
|
|
103
|
+
* (shared) keeps working. Must stay AFTER Shared: class fields
|
|
104
|
+
* initialise in order, and the other way round this captures undefined.
|
|
105
|
+
*/
|
|
106
|
+
shared = this.Shared;
|
|
107
|
+
Edited = new EventEmitter();
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated Use {@link Edited}.
|
|
110
|
+
*
|
|
111
|
+
* The same emitter under the old binding name, so a template still binding
|
|
112
|
+
* (edited) keeps working. Must stay AFTER Edited: class fields
|
|
113
|
+
* initialise in order, and the other way round this captures undefined.
|
|
114
|
+
*/
|
|
115
|
+
edited = this.Edited;
|
|
116
|
+
Removed = new EventEmitter();
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated Use {@link Removed}.
|
|
119
|
+
*
|
|
120
|
+
* The same emitter under the old binding name, so a template still binding
|
|
121
|
+
* (removed) keeps working. Must stay AFTER Removed: class fields
|
|
122
|
+
* initialise in order, and the other way round this captures undefined.
|
|
123
|
+
*/
|
|
124
|
+
removed = this.Removed;
|
|
69
125
|
canShare = false;
|
|
70
126
|
canEdit = false;
|
|
71
127
|
constructor(artifactPermissionService, artifactIconService, cdr) {
|
|
@@ -82,11 +138,11 @@ export class CollectionArtifactCardComponent {
|
|
|
82
138
|
}
|
|
83
139
|
}
|
|
84
140
|
async loadPermissions() {
|
|
85
|
-
if (!this.
|
|
141
|
+
if (!this.Artifact || !this.CurrentUser)
|
|
86
142
|
return;
|
|
87
143
|
try {
|
|
88
|
-
this.canShare = await this.artifactPermissionService.checkPermission(this.
|
|
89
|
-
this.canEdit = await this.artifactPermissionService.checkPermission(this.
|
|
144
|
+
this.canShare = await this.artifactPermissionService.checkPermission(this.Artifact.ID, this.CurrentUser.ID, 'share', this.CurrentUser);
|
|
145
|
+
this.canEdit = await this.artifactPermissionService.checkPermission(this.Artifact.ID, this.CurrentUser.ID, 'edit', this.CurrentUser);
|
|
90
146
|
}
|
|
91
147
|
catch (err) {
|
|
92
148
|
console.error('Error loading artifact permissions:', err);
|
|
@@ -99,30 +155,54 @@ export class CollectionArtifactCardComponent {
|
|
|
99
155
|
* Get the icon for this artifact using the centralized icon service.
|
|
100
156
|
* Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon
|
|
101
157
|
*/
|
|
158
|
+
GetIconClass() {
|
|
159
|
+
return this.artifactIconService.getArtifactIcon(this.Artifact);
|
|
160
|
+
}
|
|
161
|
+
/** @deprecated Use {@link GetIconClass}. */
|
|
102
162
|
getIconClass() {
|
|
103
|
-
return this.
|
|
163
|
+
return this.GetIconClass();
|
|
104
164
|
}
|
|
165
|
+
OnSelect() {
|
|
166
|
+
this.Selected.emit(this.Artifact);
|
|
167
|
+
}
|
|
168
|
+
/** @deprecated Use {@link OnSelect}. */
|
|
105
169
|
onSelect() {
|
|
106
|
-
this.
|
|
170
|
+
return this.OnSelect();
|
|
171
|
+
}
|
|
172
|
+
OnView(event) {
|
|
173
|
+
event.stopPropagation();
|
|
174
|
+
this.Viewed.emit(this.Artifact);
|
|
107
175
|
}
|
|
176
|
+
/** @deprecated Use {@link OnView}. */
|
|
108
177
|
onView(event) {
|
|
178
|
+
return this.OnView(event);
|
|
179
|
+
}
|
|
180
|
+
OnShare(event) {
|
|
109
181
|
event.stopPropagation();
|
|
110
|
-
this.
|
|
182
|
+
this.Shared.emit(this.Artifact);
|
|
111
183
|
}
|
|
184
|
+
/** @deprecated Use {@link OnShare}. */
|
|
112
185
|
onShare(event) {
|
|
186
|
+
return this.OnShare(event);
|
|
187
|
+
}
|
|
188
|
+
OnEdit(event) {
|
|
113
189
|
event.stopPropagation();
|
|
114
|
-
this.
|
|
190
|
+
this.Edited.emit(this.Artifact);
|
|
115
191
|
}
|
|
192
|
+
/** @deprecated Use {@link OnEdit}. */
|
|
116
193
|
onEdit(event) {
|
|
194
|
+
return this.OnEdit(event);
|
|
195
|
+
}
|
|
196
|
+
OnRemove(event) {
|
|
117
197
|
event.stopPropagation();
|
|
118
|
-
this.
|
|
198
|
+
this.Removed.emit(this.Artifact);
|
|
119
199
|
}
|
|
200
|
+
/** @deprecated Use {@link OnRemove}. */
|
|
120
201
|
onRemove(event) {
|
|
121
|
-
|
|
122
|
-
this.removed.emit(this.artifact);
|
|
202
|
+
return this.OnRemove(event);
|
|
123
203
|
}
|
|
124
204
|
static ɵfac = function CollectionArtifactCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CollectionArtifactCardComponent)(i0.ɵɵdirectiveInject(i1.ArtifactPermissionService), i0.ɵɵdirectiveInject(i2.ArtifactIconService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
125
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionArtifactCardComponent, selectors: [["mj-collection-artifact-card"]], inputs: { artifact: "artifact", version: "version", currentUser: "currentUser" }, outputs: { selected: "selected", viewed: "viewed", shared: "shared", edited: "edited", removed: "removed" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 19, vars: 9, consts: [[1, "artifact-card", 3, "click"], [1, "card-icon"], [1, "fas", 3, "ngClass"], [1, "card-content"], [1, "card-header"], [1, "artifact-name"], [1, "version-badge"], [1, "artifact-type"], [1, "artifact-description"], [1, "artifact-meta"], [1, "meta-item"], [1, "card-actions"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "View", 3, "click"], [1, "fas", "fa-eye"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Share"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Edit"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove from collection"], [1, "fas", "fa-clock"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Share", 3, "click"], [1, "fas", "fa-share-nodes"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Edit", 3, "click"], [1, "fas", "fa-edit"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove from collection", 3, "click"], [1, "fas", "fa-times"]], template: function CollectionArtifactCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
205
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionArtifactCardComponent, selectors: [["mj-collection-artifact-card"]], inputs: { Artifact: "Artifact", artifact: "artifact", version: "version", CurrentUser: "CurrentUser", currentUser: "currentUser" }, outputs: { Selected: "Selected", selected: "selected", Viewed: "Viewed", viewed: "viewed", Shared: "Shared", shared: "shared", Edited: "Edited", edited: "edited", Removed: "Removed", removed: "removed" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 19, vars: 9, consts: [[1, "artifact-card", 3, "click"], [1, "card-icon"], [1, "fas", 3, "ngClass"], [1, "card-content"], [1, "card-header"], [1, "artifact-name"], [1, "version-badge"], [1, "artifact-type"], [1, "artifact-description"], [1, "artifact-meta"], [1, "meta-item"], [1, "card-actions"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "View", 3, "click"], [1, "fas", "fa-eye"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Share"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Edit"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove from collection"], [1, "fas", "fa-clock"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Share", 3, "click"], [1, "fas", "fa-share-nodes"], ["mjButton", "", "variant", "flat", "size", "sm", "title", "Edit", 3, "click"], [1, "fas", "fa-edit"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove from collection", 3, "click"], [1, "fas", "fa-times"]], template: function CollectionArtifactCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
126
206
|
i0.ɵɵelementStart(0, "div", 0);
|
|
127
207
|
i0.ɵɵlistener("click", function CollectionArtifactCardComponent_Template_div_click_0_listener() { return ctx.onSelect(); });
|
|
128
208
|
i0.ɵɵelementStart(1, "div", 1);
|
|
@@ -218,20 +298,34 @@ export class CollectionArtifactCardComponent {
|
|
|
218
298
|
</div>
|
|
219
299
|
</div>
|
|
220
300
|
`, styles: ["\n .artifact-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--mj-border-default); border-radius: 8px; cursor: pointer; transition: all 150ms ease; background: var(--mj-bg-surface); }\n .artifact-card:hover { border-color: var(--mj-brand-primary); box-shadow: var(--mj-shadow-sm); }\n\n .card-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface)); color: var(--mj-brand-primary); font-size: 20px; }\n\n .card-content { flex: 1; min-width: 0; }\n .card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }\n .artifact-name { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .version-badge { padding: 2px 8px; background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)); color: var(--mj-status-warning); border-radius: 3px; font-size: 11px; font-weight: 600; font-family: monospace; }\n .artifact-type { padding: 2px 8px; background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface)); color: var(--mj-brand-primary); border-radius: 3px; font-size: 11px; font-weight: 500; text-transform: uppercase; }\n\n .artifact-description { font-size: 13px; color: var(--mj-text-muted); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n\n .artifact-meta { display: flex; gap: 16px; font-size: 12px; color: var(--mj-text-disabled); }\n .meta-item { display: flex; align-items: center; gap: 4px; }\n\n .card-actions { display: none; align-items: center; gap: 4px; }\n .artifact-card:hover .card-actions { display: flex; }\n .action-btn { padding: 8px; background: transparent; border: none; cursor: pointer; border-radius: 4px; color: var(--mj-text-muted); transition: all 150ms ease; }\n .action-btn:hover { background: var(--mj-bg-surface-sunken); color: var(--mj-brand-primary); }\n "] }]
|
|
221
|
-
}], () => [{ type: i1.ArtifactPermissionService }, { type: i2.ArtifactIconService }, { type: i0.ChangeDetectorRef }], {
|
|
301
|
+
}], () => [{ type: i1.ArtifactPermissionService }, { type: i2.ArtifactIconService }, { type: i0.ChangeDetectorRef }], { Artifact: [{
|
|
302
|
+
type: Input
|
|
303
|
+
}], artifact: [{
|
|
222
304
|
type: Input
|
|
223
305
|
}], version: [{
|
|
224
306
|
type: Input
|
|
307
|
+
}], CurrentUser: [{
|
|
308
|
+
type: Input
|
|
225
309
|
}], currentUser: [{
|
|
226
310
|
type: Input
|
|
311
|
+
}], Selected: [{
|
|
312
|
+
type: Output
|
|
227
313
|
}], selected: [{
|
|
228
314
|
type: Output
|
|
315
|
+
}], Viewed: [{
|
|
316
|
+
type: Output
|
|
229
317
|
}], viewed: [{
|
|
230
318
|
type: Output
|
|
319
|
+
}], Shared: [{
|
|
320
|
+
type: Output
|
|
231
321
|
}], shared: [{
|
|
232
322
|
type: Output
|
|
323
|
+
}], Edited: [{
|
|
324
|
+
type: Output
|
|
233
325
|
}], edited: [{
|
|
234
326
|
type: Output
|
|
327
|
+
}], Removed: [{
|
|
328
|
+
type: Output
|
|
235
329
|
}], removed: [{
|
|
236
330
|
type: Output
|
|
237
331
|
}] }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-artifact-card.component.js","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-artifact-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAuD,MAAM,eAAe,CAAC;;;;;;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EL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFATI,+BAA+B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';\nimport { MJArtifactEntity, MJArtifactVersionEntity } from '@memberjunction/core-entities';\nimport { UserInfo } from '@memberjunction/core';\nimport { ArtifactPermissionService } from '../../services/artifact-permission.service';\nimport { ArtifactIconService } from '@memberjunction/ng-artifacts';\n\n@Component({\n standalone: false,\n selector: 'mj-collection-artifact-card',\n template: `\n <div class=\"artifact-card\" (click)=\"onSelect()\">\n <div class=\"card-icon\">\n <i class=\"fas\" [ngClass]=\"getIconClass()\"></i>\n </div>\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h4 class=\"artifact-name\">{{ artifact.Name }}</h4>\n @if (version) {\n <span class=\"version-badge\">v{{ version.VersionNumber }}</span>\n }\n <span class=\"artifact-type\">{{ artifact.Type }}</span>\n </div>\n @if (artifact.Description) {\n <div class=\"artifact-description\">\n {{ artifact.Description }}\n </div>\n }\n <div class=\"artifact-meta\">\n @if (version && version.__mj_UpdatedAt) {\n <span class=\"meta-item\">\n <i class=\"fas fa-clock\"></i> {{ version.__mj_UpdatedAt | date:'short' }}\n </span>\n }\n </div>\n </div>\n <div class=\"card-actions\">\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"onView($event)\" title=\"View\">\n <i class=\"fas fa-eye\"></i>\n </button>\n @if (canShare) {\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"onShare($event)\" title=\"Share\">\n <i class=\"fas fa-share-nodes\"></i>\n </button>\n }\n @if (canEdit) {\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"onEdit($event)\" title=\"Edit\">\n <i class=\"fas fa-edit\"></i>\n </button>\n }\n @if (canEdit) {\n <button mjButton variant=\"danger\" size=\"sm\" (click)=\"onRemove($event)\" title=\"Remove from collection\">\n <i class=\"fas fa-times\"></i>\n </button>\n }\n </div>\n </div>\n `,\n styles: [`\n .artifact-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--mj-border-default); border-radius: 8px; cursor: pointer; transition: all 150ms ease; background: var(--mj-bg-surface); }\n .artifact-card:hover { border-color: var(--mj-brand-primary); box-shadow: var(--mj-shadow-sm); }\n\n .card-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface)); color: var(--mj-brand-primary); font-size: 20px; }\n\n .card-content { flex: 1; min-width: 0; }\n .card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }\n .artifact-name { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .version-badge { padding: 2px 8px; background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)); color: var(--mj-status-warning); border-radius: 3px; font-size: 11px; font-weight: 600; font-family: monospace; }\n .artifact-type { padding: 2px 8px; background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface)); color: var(--mj-brand-primary); border-radius: 3px; font-size: 11px; font-weight: 500; text-transform: uppercase; }\n\n .artifact-description { font-size: 13px; color: var(--mj-text-muted); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n\n .artifact-meta { display: flex; gap: 16px; font-size: 12px; color: var(--mj-text-disabled); }\n .meta-item { display: flex; align-items: center; gap: 4px; }\n\n .card-actions { display: none; align-items: center; gap: 4px; }\n .artifact-card:hover .card-actions { display: flex; }\n .action-btn { padding: 8px; background: transparent; border: none; cursor: pointer; border-radius: 4px; color: var(--mj-text-muted); transition: all 150ms ease; }\n .action-btn:hover { background: var(--mj-bg-surface-sunken); color: var(--mj-brand-primary); }\n `]\n})\nexport class CollectionArtifactCardComponent implements OnInit, OnChanges {\n @Input() artifact!: MJArtifactEntity;\n @Input() version?: MJArtifactVersionEntity; // Optional version info\n @Input() currentUser!: UserInfo;\n\n @Output() selected = new EventEmitter<any>();\n @Output() viewed = new EventEmitter<any>();\n @Output() shared = new EventEmitter<any>();\n @Output() edited = new EventEmitter<any>();\n @Output() removed = new EventEmitter<any>();\n\n canShare: boolean = false;\n canEdit: boolean = false;\n\n constructor(\n private artifactPermissionService: ArtifactPermissionService,\n private artifactIconService: ArtifactIconService,\n private cdr: ChangeDetectorRef\n ) {}\n\n async ngOnInit(): Promise<void> {\n await this.loadPermissions();\n }\n\n async ngOnChanges(changes: SimpleChanges): Promise<void> {\n if (changes['artifact'] && !changes['artifact'].isFirstChange()) {\n await this.loadPermissions();\n }\n }\n\n private async loadPermissions(): Promise<void> {\n if (!this.artifact || !this.currentUser) return;\n\n try {\n this.canShare = await this.artifactPermissionService.checkPermission(\n this.artifact.ID,\n this.currentUser.ID,\n 'share',\n this.currentUser\n );\n\n this.canEdit = await this.artifactPermissionService.checkPermission(\n this.artifact.ID,\n this.currentUser.ID,\n 'edit',\n this.currentUser\n );\n } catch (err) {\n console.error('Error loading artifact permissions:', err);\n } finally {\n this.cdr.detectChanges(); // zone.js 0.15: async permission checks don't trigger CD\n }\n }\n\n /**\n * Get the icon for this artifact using the centralized icon service.\n * Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon\n */\n getIconClass(): string {\n return this.artifactIconService.getArtifactIcon(this.artifact);\n }\n\n onSelect(): void {\n this.selected.emit(this.artifact);\n }\n\n onView(event: Event): void {\n event.stopPropagation();\n this.viewed.emit(this.artifact);\n }\n\n onShare(event: Event): void {\n event.stopPropagation();\n this.shared.emit(this.artifact);\n }\n\n onEdit(event: Event): void {\n event.stopPropagation();\n this.edited.emit(this.artifact);\n }\n\n onRemove(event: Event): void {\n event.stopPropagation();\n this.removed.emit(this.artifact);\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"collection-artifact-card.component.js","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-artifact-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+CP;;kBAyBF,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kFAxEI,+BAA+B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';\nimport { MJArtifactEntity, MJArtifactVersionEntity } from '@memberjunction/core-entities';\nimport { UserInfo } from '@memberjunction/core';\nimport { ArtifactPermissionService } from '../../services/artifact-permission.service';\nimport { ArtifactIconService } from '@memberjunction/ng-artifacts';\n\n@Component({\n standalone: false,\n selector: 'mj-collection-artifact-card',\n template: `\n <div class=\"artifact-card\" (click)=\"onSelect()\">\n <div class=\"card-icon\">\n <i class=\"fas\" [ngClass]=\"getIconClass()\"></i>\n </div>\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h4 class=\"artifact-name\">{{ artifact.Name }}</h4>\n @if (version) {\n <span class=\"version-badge\">v{{ version.VersionNumber }}</span>\n }\n <span class=\"artifact-type\">{{ artifact.Type }}</span>\n </div>\n @if (artifact.Description) {\n <div class=\"artifact-description\">\n {{ artifact.Description }}\n </div>\n }\n <div class=\"artifact-meta\">\n @if (version && version.__mj_UpdatedAt) {\n <span class=\"meta-item\">\n <i class=\"fas fa-clock\"></i> {{ version.__mj_UpdatedAt | date:'short' }}\n </span>\n }\n </div>\n </div>\n <div class=\"card-actions\">\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"onView($event)\" title=\"View\">\n <i class=\"fas fa-eye\"></i>\n </button>\n @if (canShare) {\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"onShare($event)\" title=\"Share\">\n <i class=\"fas fa-share-nodes\"></i>\n </button>\n }\n @if (canEdit) {\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"onEdit($event)\" title=\"Edit\">\n <i class=\"fas fa-edit\"></i>\n </button>\n }\n @if (canEdit) {\n <button mjButton variant=\"danger\" size=\"sm\" (click)=\"onRemove($event)\" title=\"Remove from collection\">\n <i class=\"fas fa-times\"></i>\n </button>\n }\n </div>\n </div>\n `,\n styles: [`\n .artifact-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--mj-border-default); border-radius: 8px; cursor: pointer; transition: all 150ms ease; background: var(--mj-bg-surface); }\n .artifact-card:hover { border-color: var(--mj-brand-primary); box-shadow: var(--mj-shadow-sm); }\n\n .card-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface)); color: var(--mj-brand-primary); font-size: 20px; }\n\n .card-content { flex: 1; min-width: 0; }\n .card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }\n .artifact-name { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .version-badge { padding: 2px 8px; background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)); color: var(--mj-status-warning); border-radius: 3px; font-size: 11px; font-weight: 600; font-family: monospace; }\n .artifact-type { padding: 2px 8px; background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface)); color: var(--mj-brand-primary); border-radius: 3px; font-size: 11px; font-weight: 500; text-transform: uppercase; }\n\n .artifact-description { font-size: 13px; color: var(--mj-text-muted); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n\n .artifact-meta { display: flex; gap: 16px; font-size: 12px; color: var(--mj-text-disabled); }\n .meta-item { display: flex; align-items: center; gap: 4px; }\n\n .card-actions { display: none; align-items: center; gap: 4px; }\n .artifact-card:hover .card-actions { display: flex; }\n .action-btn { padding: 8px; background: transparent; border: none; cursor: pointer; border-radius: 4px; color: var(--mj-text-muted); transition: all 150ms ease; }\n .action-btn:hover { background: var(--mj-bg-surface-sunken); color: var(--mj-brand-primary); }\n `]\n})\nexport class CollectionArtifactCardComponent implements OnInit, OnChanges {\n @Input() Artifact!: MJArtifactEntity;\n\n /** @deprecated Use {@link Artifact}. */\n @Input() set artifact(value: MJArtifactEntity) {\n this.Artifact = value;\n }\n /** @deprecated Use {@link Artifact}. */\n get artifact(): MJArtifactEntity {\n return this.Artifact;\n }\n @Input() version?: MJArtifactVersionEntity; // Optional version info\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n\n @Output() Selected = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link Selected}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (selected) keeps working. Must stay AFTER Selected: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() selected = this.Selected;\n @Output() Viewed = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link Viewed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (viewed) keeps working. Must stay AFTER Viewed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() viewed = this.Viewed;\n @Output() Shared = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link Shared}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (shared) keeps working. Must stay AFTER Shared: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() shared = this.Shared;\n @Output() Edited = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link Edited}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (edited) keeps working. Must stay AFTER Edited: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() edited = this.Edited;\n @Output() Removed = new EventEmitter<any>();\n\n /**\n * @deprecated Use {@link Removed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (removed) keeps working. Must stay AFTER Removed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() removed = this.Removed;\n\n canShare: boolean = false;\n canEdit: boolean = false;\n\n constructor(\n private artifactPermissionService: ArtifactPermissionService,\n private artifactIconService: ArtifactIconService,\n private cdr: ChangeDetectorRef\n ) {}\n\n async ngOnInit(): Promise<void> {\n await this.loadPermissions();\n }\n\n async ngOnChanges(changes: SimpleChanges): Promise<void> {\n if (changes['artifact'] && !changes['artifact'].isFirstChange()) {\n await this.loadPermissions();\n }\n }\n\n private async loadPermissions(): Promise<void> {\n if (!this.Artifact || !this.CurrentUser) return;\n\n try {\n this.canShare = await this.artifactPermissionService.checkPermission(\n this.Artifact.ID,\n this.CurrentUser.ID,\n 'share',\n this.CurrentUser\n );\n\n this.canEdit = await this.artifactPermissionService.checkPermission(\n this.Artifact.ID,\n this.CurrentUser.ID,\n 'edit',\n this.CurrentUser\n );\n } catch (err) {\n console.error('Error loading artifact permissions:', err);\n } finally {\n this.cdr.detectChanges(); // zone.js 0.15: async permission checks don't trigger CD\n }\n }\n\n /**\n * Get the icon for this artifact using the centralized icon service.\n * Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon\n */\n GetIconClass(): string {\n return this.artifactIconService.getArtifactIcon(this.Artifact);\n }\n\n /** @deprecated Use {@link GetIconClass}. */\n getIconClass(): string {\n return this.GetIconClass();\n }\n\n OnSelect(): void {\n this.Selected.emit(this.Artifact);\n }\n\n /** @deprecated Use {@link OnSelect}. */\n onSelect(): void {\n return this.OnSelect();\n }\n\n OnView(event: Event): void {\n event.stopPropagation();\n this.Viewed.emit(this.Artifact);\n }\n\n /** @deprecated Use {@link OnView}. */\n onView(event: Event): void {\n return this.OnView(event);\n }\n\n OnShare(event: Event): void {\n event.stopPropagation();\n this.Shared.emit(this.Artifact);\n }\n\n /** @deprecated Use {@link OnShare}. */\n onShare(event: Event): void {\n return this.OnShare(event);\n }\n\n OnEdit(event: Event): void {\n event.stopPropagation();\n this.Edited.emit(this.Artifact);\n }\n\n /** @deprecated Use {@link OnEdit}. */\n onEdit(event: Event): void {\n return this.OnEdit(event);\n }\n\n OnRemove(event: Event): void {\n event.stopPropagation();\n this.Removed.emit(this.Artifact);\n }\n\n /** @deprecated Use {@link OnRemove}. */\n onRemove(event: Event): void {\n return this.OnRemove(event);\n }\n}"]}
|
|
@@ -11,26 +11,72 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export declare class CollectionFormModalComponent extends BaseAngularComponent implements OnChanges {
|
|
12
12
|
private toastService;
|
|
13
13
|
private permissionService;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
IsOpen: boolean;
|
|
15
|
+
/** @deprecated Use {@link IsOpen}. */
|
|
16
|
+
set isOpen(value: boolean);
|
|
17
|
+
/** @deprecated Use {@link IsOpen}. */
|
|
18
|
+
get isOpen(): boolean;
|
|
19
|
+
Collection?: MJCollectionEntity;
|
|
20
|
+
/** @deprecated Use {@link Collection}. */
|
|
21
|
+
set collection(value: MJCollectionEntity | undefined);
|
|
22
|
+
/** @deprecated Use {@link Collection}. */
|
|
23
|
+
get collection(): MJCollectionEntity | undefined;
|
|
24
|
+
ParentCollection?: MJCollectionEntity;
|
|
25
|
+
/** @deprecated Use {@link ParentCollection}. */
|
|
26
|
+
set parentCollection(value: MJCollectionEntity | undefined);
|
|
27
|
+
/** @deprecated Use {@link ParentCollection}. */
|
|
28
|
+
get parentCollection(): MJCollectionEntity | undefined;
|
|
29
|
+
EnvironmentId: string;
|
|
30
|
+
/** @deprecated Use {@link EnvironmentId}. */
|
|
31
|
+
set environmentId(value: string);
|
|
32
|
+
/** @deprecated Use {@link EnvironmentId}. */
|
|
33
|
+
get environmentId(): string;
|
|
34
|
+
CurrentUser: UserInfo;
|
|
35
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
36
|
+
set currentUser(value: UserInfo);
|
|
37
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
38
|
+
get currentUser(): UserInfo;
|
|
39
|
+
Saved: EventEmitter<MJCollectionEntity>;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use {@link Saved}.
|
|
42
|
+
*
|
|
43
|
+
* The same emitter under the old binding name, so a template still binding
|
|
44
|
+
* (saved) keeps working. Must stay AFTER Saved: class fields
|
|
45
|
+
* initialise in order, and the other way round this captures undefined.
|
|
46
|
+
*/
|
|
19
47
|
saved: EventEmitter<MJCollectionEntity>;
|
|
20
48
|
cancelled: EventEmitter<void>;
|
|
21
|
-
|
|
49
|
+
FormData: {
|
|
22
50
|
name: string;
|
|
23
51
|
description: string;
|
|
24
52
|
};
|
|
25
|
-
|
|
53
|
+
/** @deprecated Use {@link FormData}. */
|
|
54
|
+
get formData(): {
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
/** @deprecated Use {@link FormData}. */
|
|
59
|
+
set formData(value: {
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
});
|
|
63
|
+
IsSaving: boolean;
|
|
64
|
+
/** @deprecated Use {@link IsSaving}. */
|
|
65
|
+
get isSaving(): boolean;
|
|
66
|
+
/** @deprecated Use {@link IsSaving}. */
|
|
67
|
+
set isSaving(value: boolean);
|
|
26
68
|
errorMessage: string;
|
|
27
69
|
constructor(toastService: ToastService, permissionService: CollectionPermissionService);
|
|
28
70
|
ngOnChanges(changes: SimpleChanges): void;
|
|
71
|
+
get CanSave(): boolean;
|
|
72
|
+
/** @deprecated Use {@link CanSave}. */
|
|
29
73
|
get canSave(): boolean;
|
|
74
|
+
OnSave(): Promise<void>;
|
|
75
|
+
/** @deprecated Use {@link OnSave}. */
|
|
30
76
|
onSave(): Promise<void>;
|
|
31
77
|
onCancel(): void;
|
|
32
78
|
private resetForm;
|
|
33
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionFormModalComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CollectionFormModalComponent, "mj-collection-form-modal", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "collection": { "alias": "collection"; "required": false; }; "parentCollection": { "alias": "parentCollection"; "required": false; }; "environmentId": { "alias": "environmentId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; }, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, false, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CollectionFormModalComponent, "mj-collection-form-modal", never, { "IsOpen": { "alias": "IsOpen"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "Collection": { "alias": "Collection"; "required": false; }; "collection": { "alias": "collection"; "required": false; }; "ParentCollection": { "alias": "ParentCollection"; "required": false; }; "parentCollection": { "alias": "parentCollection"; "required": false; }; "EnvironmentId": { "alias": "EnvironmentId"; "required": false; }; "environmentId": { "alias": "environmentId"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; }, { "Saved": "Saved"; "saved": "saved"; "cancelled": "cancelled"; }, never, never, false, never>;
|
|
35
81
|
}
|
|
36
82
|
//# sourceMappingURL=collection-form-modal.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-form-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-form-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;;AAG3F;;GAEG;AACH,qBAoGa,4BAA6B,SAAQ,oBAAqB,YAAW,SAAS;
|
|
1
|
+
{"version":3,"file":"collection-form-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-form-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;;AAG3F;;GAEG;AACH,qBAoGa,4BAA6B,SAAQ,oBAAqB,YAAW,SAAS;IA2FvF,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,iBAAiB;IA3FlB,MAAM,EAAE,OAAO,CAAS;IAEjC,sCAAsC;IACtC,IAAa,MAAM,CAAC,KAAK,EAAE,OAAO,EAEjC;IACD,sCAAsC;IACtC,IAAI,MAAM,IAAI,OAAO,CAEpB;IACQ,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAEzC,0CAA0C;IAC1C,IAAa,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,EAE5D;IACD,0CAA0C;IAC1C,IAAI,UAAU,IAAI,kBAAkB,GAAG,SAAS,CAE/C;IACQ,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IAE/C,gDAAgD;IAChD,IAAa,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,EAElE;IACD,gDAAgD;IAChD,IAAI,gBAAgB,IAAI,kBAAkB,GAAG,SAAS,CAErD;IACQ,aAAa,EAAG,MAAM,CAAC;IAEhC,6CAA6C;IAC7C,IAAa,aAAa,CAAC,KAAK,EAAE,MAAM,EAEvC;IACD,6CAA6C;IAC7C,IAAI,aAAa,IAAI,MAAM,CAE1B;IACQ,WAAW,EAAG,QAAQ,CAAC;IAEhC,2CAA2C;IAC3C,IAAa,WAAW,CAAC,KAAK,EAAE,QAAQ,EAEvC;IACD,2CAA2C;IAC3C,IAAI,WAAW,IAAI,QAAQ,CAE1B;IAES,KAAK,mCAA0C;IAEzD;;;;;;OAMG;IACO,KAAK,mCAAc;IACnB,SAAS,qBAA4B;IAExC,QAAQ;;;MAGb;IAEF,wCAAwC;IACxC,IAAW,QAAQ;;;MAElB;IACD,wCAAwC;IACxC,IAAW,QAAQ,CAAC,KAAK;;;KAAA,EAExB;IAEM,QAAQ,EAAE,OAAO,CAAS;IAEjC,wCAAwC;IACxC,IAAW,QAAQ,IAAI,OAAO,CAE7B;IACD,wCAAwC;IACxC,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAEjC;IACM,YAAY,EAAE,MAAM,CAAM;gBAGvB,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,2BAA2B;IAIxD,WAAW,CAAC,OAAO,EAAE,aAAa;IAclC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,uCAAuC;IACvC,IAAI,OAAO,IAAI,OAAO,CAErB;IAEK,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAmG7B,sCAAsC;IAChC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,QAAQ,IAAI,IAAI;IAKhB,OAAO,CAAC,SAAS;yCApON,4BAA4B;2CAA5B,4BAA4B;CA2OxC"}
|
|
@@ -84,18 +84,82 @@ function CollectionFormModalComponent_Conditional_0_Template(rf, ctx) { if (rf &
|
|
|
84
84
|
export class CollectionFormModalComponent extends BaseAngularComponent {
|
|
85
85
|
toastService;
|
|
86
86
|
permissionService;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
IsOpen = false;
|
|
88
|
+
/** @deprecated Use {@link IsOpen}. */
|
|
89
|
+
set isOpen(value) {
|
|
90
|
+
this.IsOpen = value;
|
|
91
|
+
}
|
|
92
|
+
/** @deprecated Use {@link IsOpen}. */
|
|
93
|
+
get isOpen() {
|
|
94
|
+
return this.IsOpen;
|
|
95
|
+
}
|
|
96
|
+
Collection;
|
|
97
|
+
/** @deprecated Use {@link Collection}. */
|
|
98
|
+
set collection(value) {
|
|
99
|
+
this.Collection = value;
|
|
100
|
+
}
|
|
101
|
+
/** @deprecated Use {@link Collection}. */
|
|
102
|
+
get collection() {
|
|
103
|
+
return this.Collection;
|
|
104
|
+
}
|
|
105
|
+
ParentCollection;
|
|
106
|
+
/** @deprecated Use {@link ParentCollection}. */
|
|
107
|
+
set parentCollection(value) {
|
|
108
|
+
this.ParentCollection = value;
|
|
109
|
+
}
|
|
110
|
+
/** @deprecated Use {@link ParentCollection}. */
|
|
111
|
+
get parentCollection() {
|
|
112
|
+
return this.ParentCollection;
|
|
113
|
+
}
|
|
114
|
+
EnvironmentId;
|
|
115
|
+
/** @deprecated Use {@link EnvironmentId}. */
|
|
116
|
+
set environmentId(value) {
|
|
117
|
+
this.EnvironmentId = value;
|
|
118
|
+
}
|
|
119
|
+
/** @deprecated Use {@link EnvironmentId}. */
|
|
120
|
+
get environmentId() {
|
|
121
|
+
return this.EnvironmentId;
|
|
122
|
+
}
|
|
123
|
+
CurrentUser;
|
|
124
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
125
|
+
set currentUser(value) {
|
|
126
|
+
this.CurrentUser = value;
|
|
127
|
+
}
|
|
128
|
+
/** @deprecated Use {@link CurrentUser}. */
|
|
129
|
+
get currentUser() {
|
|
130
|
+
return this.CurrentUser;
|
|
131
|
+
}
|
|
132
|
+
Saved = new EventEmitter();
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated Use {@link Saved}.
|
|
135
|
+
*
|
|
136
|
+
* The same emitter under the old binding name, so a template still binding
|
|
137
|
+
* (saved) keeps working. Must stay AFTER Saved: class fields
|
|
138
|
+
* initialise in order, and the other way round this captures undefined.
|
|
139
|
+
*/
|
|
140
|
+
saved = this.Saved;
|
|
93
141
|
cancelled = new EventEmitter();
|
|
94
|
-
|
|
142
|
+
FormData = {
|
|
95
143
|
name: '',
|
|
96
144
|
description: ''
|
|
97
145
|
};
|
|
98
|
-
|
|
146
|
+
/** @deprecated Use {@link FormData}. */
|
|
147
|
+
get formData() {
|
|
148
|
+
return this.FormData;
|
|
149
|
+
}
|
|
150
|
+
/** @deprecated Use {@link FormData}. */
|
|
151
|
+
set formData(value) {
|
|
152
|
+
this.FormData = value;
|
|
153
|
+
}
|
|
154
|
+
IsSaving = false;
|
|
155
|
+
/** @deprecated Use {@link IsSaving}. */
|
|
156
|
+
get isSaving() {
|
|
157
|
+
return this.IsSaving;
|
|
158
|
+
}
|
|
159
|
+
/** @deprecated Use {@link IsSaving}. */
|
|
160
|
+
set isSaving(value) {
|
|
161
|
+
this.IsSaving = value;
|
|
162
|
+
}
|
|
99
163
|
errorMessage = '';
|
|
100
164
|
constructor(toastService, permissionService) {
|
|
101
165
|
super();
|
|
@@ -106,84 +170,88 @@ export class CollectionFormModalComponent extends BaseAngularComponent {
|
|
|
106
170
|
// Bind provider-aware service to this component's provider on every input change pass.
|
|
107
171
|
this.permissionService.Provider = this.ProviderToUse;
|
|
108
172
|
if (changes['collection'] || changes['isOpen']) {
|
|
109
|
-
if (this.
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
173
|
+
if (this.IsOpen && this.Collection) {
|
|
174
|
+
this.FormData.name = this.Collection.Name || '';
|
|
175
|
+
this.FormData.description = this.Collection.Description || '';
|
|
112
176
|
}
|
|
113
|
-
else if (this.
|
|
114
|
-
this.
|
|
177
|
+
else if (this.IsOpen && !this.Collection) {
|
|
178
|
+
this.FormData = { name: '', description: '' };
|
|
115
179
|
}
|
|
116
180
|
}
|
|
117
181
|
}
|
|
182
|
+
get CanSave() {
|
|
183
|
+
return this.FormData.name.trim().length > 0;
|
|
184
|
+
}
|
|
185
|
+
/** @deprecated Use {@link CanSave}. */
|
|
118
186
|
get canSave() {
|
|
119
|
-
return this.
|
|
187
|
+
return this.CanSave;
|
|
120
188
|
}
|
|
121
|
-
async
|
|
122
|
-
if (!this.
|
|
189
|
+
async OnSave() {
|
|
190
|
+
if (!this.CanSave)
|
|
123
191
|
return;
|
|
124
|
-
this.
|
|
192
|
+
this.IsSaving = true;
|
|
125
193
|
this.errorMessage = '';
|
|
126
194
|
try {
|
|
127
195
|
// Validate permissions before saving
|
|
128
|
-
if (this.
|
|
196
|
+
if (this.Collection) {
|
|
129
197
|
// Editing existing collection - need Edit permission
|
|
130
|
-
if (this.
|
|
131
|
-
const permission = await this.permissionService.checkPermission(this.
|
|
198
|
+
if (this.Collection.OwnerID && !UUIDsEqual(this.Collection.OwnerID, this.CurrentUser.ID)) {
|
|
199
|
+
const permission = await this.permissionService.checkPermission(this.Collection.ID, this.CurrentUser.ID, this.CurrentUser);
|
|
132
200
|
if (!permission?.canEdit) {
|
|
133
201
|
this.errorMessage = 'You do not have Edit permission for this collection.';
|
|
134
|
-
this.
|
|
202
|
+
this.IsSaving = false;
|
|
135
203
|
return;
|
|
136
204
|
}
|
|
137
205
|
}
|
|
138
206
|
}
|
|
139
|
-
else if (this.
|
|
207
|
+
else if (this.ParentCollection) {
|
|
140
208
|
// Creating child collection - need Edit permission on parent
|
|
141
|
-
if (this.
|
|
142
|
-
const permission = await this.permissionService.checkPermission(this.
|
|
209
|
+
if (this.ParentCollection.OwnerID && !UUIDsEqual(this.ParentCollection.OwnerID, this.CurrentUser.ID)) {
|
|
210
|
+
const permission = await this.permissionService.checkPermission(this.ParentCollection.ID, this.CurrentUser.ID, this.CurrentUser);
|
|
143
211
|
if (!permission?.canEdit) {
|
|
144
212
|
this.errorMessage = 'You do not have Edit permission for the parent collection.';
|
|
145
|
-
this.
|
|
213
|
+
this.IsSaving = false;
|
|
146
214
|
return;
|
|
147
215
|
}
|
|
148
216
|
}
|
|
149
217
|
}
|
|
150
218
|
const md = this.ProviderToUse;
|
|
151
|
-
const collection = this.
|
|
152
|
-
await md.GetEntityObject('MJ: Collections', this.
|
|
153
|
-
collection.Name = this.
|
|
154
|
-
collection.Description = this.
|
|
155
|
-
collection.EnvironmentID = this.
|
|
219
|
+
const collection = this.Collection ||
|
|
220
|
+
await md.GetEntityObject('MJ: Collections', this.CurrentUser);
|
|
221
|
+
collection.Name = this.FormData.name.trim();
|
|
222
|
+
collection.Description = this.FormData.description.trim() || null;
|
|
223
|
+
collection.EnvironmentID = this.EnvironmentId;
|
|
156
224
|
// Set owner and parent relationship if creating new collection
|
|
157
|
-
if (!this.
|
|
158
|
-
if (this.
|
|
225
|
+
if (!this.Collection) {
|
|
226
|
+
if (this.ParentCollection) {
|
|
159
227
|
// Child collection inherits parent's owner to maintain permission hierarchy
|
|
160
|
-
collection.ParentID = this.
|
|
161
|
-
collection.OwnerID = this.
|
|
228
|
+
collection.ParentID = this.ParentCollection.ID;
|
|
229
|
+
collection.OwnerID = this.ParentCollection.OwnerID || this.CurrentUser.ID;
|
|
162
230
|
}
|
|
163
231
|
else {
|
|
164
232
|
// Root collection - current user becomes owner
|
|
165
|
-
collection.OwnerID = this.
|
|
233
|
+
collection.OwnerID = this.CurrentUser.ID;
|
|
166
234
|
}
|
|
167
235
|
}
|
|
168
|
-
else if (this.
|
|
236
|
+
else if (this.ParentCollection) {
|
|
169
237
|
// Updating existing collection's parent
|
|
170
|
-
collection.ParentID = this.
|
|
238
|
+
collection.ParentID = this.ParentCollection.ID;
|
|
171
239
|
}
|
|
172
240
|
const saved = await collection.Save();
|
|
173
241
|
if (saved) {
|
|
174
242
|
// If creating new collection, set up permissions
|
|
175
|
-
if (!this.
|
|
176
|
-
if (this.
|
|
243
|
+
if (!this.Collection) {
|
|
244
|
+
if (this.ParentCollection) {
|
|
177
245
|
// Child collection - copy non-owner permissions from parent.
|
|
178
246
|
// (The owner gets implicit full access via OwnerID; no self-share row is written.)
|
|
179
|
-
await this.permissionService.copyParentPermissions(this.
|
|
247
|
+
await this.permissionService.copyParentPermissions(this.ParentCollection.ID, collection.ID, this.CurrentUser);
|
|
180
248
|
}
|
|
181
249
|
// Root collection: nothing to do. CollectionPermissionProvider treats OwnerID as
|
|
182
250
|
// an implicit full-access grant — writing a self-share row was redundant and was
|
|
183
251
|
// failing server-side auth on freshly-created collections.
|
|
184
252
|
}
|
|
185
|
-
this.toastService.success(this.
|
|
186
|
-
this.
|
|
253
|
+
this.toastService.success(this.Collection ? 'Collection updated successfully' : 'Collection created successfully');
|
|
254
|
+
this.Saved.emit(collection);
|
|
187
255
|
this.resetForm();
|
|
188
256
|
}
|
|
189
257
|
else {
|
|
@@ -197,22 +265,26 @@ export class CollectionFormModalComponent extends BaseAngularComponent {
|
|
|
197
265
|
this.toastService.error(this.errorMessage);
|
|
198
266
|
}
|
|
199
267
|
finally {
|
|
200
|
-
this.
|
|
268
|
+
this.IsSaving = false;
|
|
201
269
|
}
|
|
202
270
|
}
|
|
271
|
+
/** @deprecated Use {@link OnSave}. */
|
|
272
|
+
async onSave() {
|
|
273
|
+
return this.OnSave();
|
|
274
|
+
}
|
|
203
275
|
onCancel() {
|
|
204
276
|
this.resetForm();
|
|
205
277
|
this.cancelled.emit();
|
|
206
278
|
}
|
|
207
279
|
resetForm() {
|
|
208
|
-
this.
|
|
280
|
+
this.FormData = {
|
|
209
281
|
name: '',
|
|
210
282
|
description: ''
|
|
211
283
|
};
|
|
212
284
|
this.errorMessage = '';
|
|
213
285
|
}
|
|
214
286
|
static ɵfac = function CollectionFormModalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CollectionFormModalComponent)(i0.ɵɵdirectiveInject(i1.ToastService), i0.ɵɵdirectiveInject(i2.CollectionPermissionService)); };
|
|
215
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionFormModalComponent, selectors: [["mj-collection-form-modal"]], inputs: { isOpen: "isOpen", collection: "collection", parentCollection: "parentCollection", environmentId: "environmentId", currentUser: "currentUser" }, outputs: { saved: "saved", cancelled: "cancelled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["nameInput", ""], [3, "Title", "Width", "MinWidth", "Visible"], [3, "Close", "Title", "Width", "MinWidth", "Visible"], [1, "collection-form"], [1, "form-group"], [1, "form-label"], [1, "required"], ["type", "text", "placeholder", "Collection name", 1, "k-textbox", "form-control", 3, "ngModelChange", "keydown.enter", "ngModel"], ["placeholder", "Optional description", "rows", "3", 1, "k-textarea", "form-control", 3, "ngModelChange", "ngModel"], ["Variant", "error"], ["mjButton", "", 3, "click", "disabled"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "parent-info"], [1, "fas", "fa-folder"]], template: function CollectionFormModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
287
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionFormModalComponent, selectors: [["mj-collection-form-modal"]], inputs: { IsOpen: "IsOpen", isOpen: "isOpen", Collection: "Collection", collection: "collection", ParentCollection: "ParentCollection", parentCollection: "parentCollection", EnvironmentId: "EnvironmentId", environmentId: "environmentId", CurrentUser: "CurrentUser", currentUser: "currentUser" }, outputs: { Saved: "Saved", saved: "saved", cancelled: "cancelled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["nameInput", ""], [3, "Title", "Width", "MinWidth", "Visible"], [3, "Close", "Title", "Width", "MinWidth", "Visible"], [1, "collection-form"], [1, "form-group"], [1, "form-label"], [1, "required"], ["type", "text", "placeholder", "Collection name", 1, "k-textbox", "form-control", 3, "ngModelChange", "keydown.enter", "ngModel"], ["placeholder", "Optional description", "rows", "3", 1, "k-textarea", "form-control", 3, "ngModelChange", "ngModel"], ["Variant", "error"], ["mjButton", "", 3, "click", "disabled"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "parent-info"], [1, "fas", "fa-folder"]], template: function CollectionFormModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
216
288
|
i0.ɵɵconditionalCreate(0, CollectionFormModalComponent_Conditional_0_Template, 21, 11, "mj-dialog", 1);
|
|
217
289
|
} if (rf & 2) {
|
|
218
290
|
i0.ɵɵconditional(ctx.isOpen ? 0 : -1);
|
|
@@ -277,16 +349,28 @@ export class CollectionFormModalComponent extends BaseAngularComponent {
|
|
|
277
349
|
</mj-dialog>
|
|
278
350
|
}
|
|
279
351
|
`, styles: ["\n .collection-form {\n padding: 20px 0;\n }\n\n .form-group {\n margin-bottom: 20px;\n }\n\n .form-label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .required {\n color: var(--mj-status-error);\n }\n\n .form-control {\n width: 100%;\n }\n\n .parent-info {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n color: var(--mj-text-muted);\n }\n\n .parent-info i {\n color: var(--mj-brand-primary);\n }\n "] }]
|
|
280
|
-
}], () => [{ type: i1.ToastService }, { type: i2.CollectionPermissionService }], {
|
|
352
|
+
}], () => [{ type: i1.ToastService }, { type: i2.CollectionPermissionService }], { IsOpen: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], isOpen: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], Collection: [{
|
|
281
357
|
type: Input
|
|
282
358
|
}], collection: [{
|
|
283
359
|
type: Input
|
|
360
|
+
}], ParentCollection: [{
|
|
361
|
+
type: Input
|
|
284
362
|
}], parentCollection: [{
|
|
285
363
|
type: Input
|
|
364
|
+
}], EnvironmentId: [{
|
|
365
|
+
type: Input
|
|
286
366
|
}], environmentId: [{
|
|
287
367
|
type: Input
|
|
368
|
+
}], CurrentUser: [{
|
|
369
|
+
type: Input
|
|
288
370
|
}], currentUser: [{
|
|
289
371
|
type: Input
|
|
372
|
+
}], Saved: [{
|
|
373
|
+
type: Output
|
|
290
374
|
}], saved: [{
|
|
291
375
|
type: Output
|
|
292
376
|
}], cancelled: [{
|