@memberjunction/ng-conversations 6.2.0-edge.3 → 6.2.0-edge.4
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 +4 -7
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +1 -0
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +14 -2
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +35 -4
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +588 -51
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +2654 -665
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/forks-popover.component.d.ts +37 -0
- package/dist/lib/components/conversation/forks-popover.component.d.ts.map +1 -0
- package/dist/lib/components/conversation/forks-popover.component.js +164 -0
- package/dist/lib/components/conversation/forks-popover.component.js.map +1 -0
- package/dist/lib/components/export/export-modal.component.d.ts +7 -2
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +16 -3
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +11 -9
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +96 -11
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +244 -103
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +171 -4
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +899 -298
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +82 -21
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +299 -52
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.d.ts +34 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.js +75 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.js.map +1 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.d.ts +80 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.js +202 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.d.ts +45 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.js +123 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +90 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js +223 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.d.ts +98 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.js +161 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.d.ts +48 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.js +205 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts +19 -2
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +83 -9
- 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 +30 -9
- 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 +78 -14
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js.map +1 -1
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.d.ts +71 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.js +259 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.js.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.d.ts +129 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.d.ts.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.js +373 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.js.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.d.ts +77 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.js +420 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.d.ts +83 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.js +292 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.d.ts +39 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.js +152 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.d.ts +109 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.js +146 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.d.ts +19 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.js +39 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +183 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +761 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.d.ts +25 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.js +57 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.d.ts +40 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.js +97 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.d.ts +144 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.js +57 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.d.ts +36 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.js +55 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.d.ts +55 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.js +210 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.d.ts +32 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js +90 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js.map +1 -0
- package/dist/lib/components/realtime/media/media-channel.d.ts +7 -0
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +28 -1
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +8 -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 +89 -71
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-orb.component.d.ts +21 -0
- package/dist/lib/components/realtime/realtime-agent-orb.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-agent-orb.component.js +49 -0
- package/dist/lib/components/realtime/realtime-agent-orb.component.js.map +1 -0
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts +44 -11
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.js +162 -50
- package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-audio-visuals.d.ts +8 -2
- package/dist/lib/components/realtime/realtime-audio-visuals.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-audio-visuals.js +14 -18
- package/dist/lib/components/realtime/realtime-audio-visuals.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts +42 -2
- package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +137 -102
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-perception-chip.component.d.ts +71 -0
- package/dist/lib/components/realtime/realtime-perception-chip.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-perception-chip.component.js +221 -0
- package/dist/lib/components/realtime/realtime-perception-chip.component.js.map +1 -0
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +264 -22
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +851 -135
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.d.ts +14 -0
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.js +14 -0
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.js.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts +74 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.js +171 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +71 -13
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js +232 -73
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +5 -0
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +8 -0
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +12 -2
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +5 -1
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +10 -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 +42 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts +20 -3
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js +44 -10
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +28 -44
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +76 -162
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +2 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +25 -12
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +22 -31
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +50 -63
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +30 -29
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +27 -5
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +25 -0
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +36 -0
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +5 -0
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
- package/dist/lib/models/agent-turn.model.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +34 -8
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +82 -29
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +0 -9
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +1 -32
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/browser-realtime-media-host.d.ts +12 -0
- package/dist/lib/services/browser-realtime-media-host.d.ts.map +1 -1
- package/dist/lib/services/browser-realtime-media-host.js +19 -0
- package/dist/lib/services/browser-realtime-media-host.js.map +1 -1
- package/dist/lib/services/browser-recording-unload-guard.d.ts +30 -0
- package/dist/lib/services/browser-recording-unload-guard.d.ts.map +1 -0
- package/dist/lib/services/browser-recording-unload-guard.js +43 -0
- package/dist/lib/services/browser-recording-unload-guard.js.map +1 -0
- package/dist/lib/services/conversation-agent.service.d.ts +35 -11
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +65 -20
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-detail-window.store.d.ts +22 -4
- package/dist/lib/services/conversation-detail-window.store.d.ts.map +1 -1
- package/dist/lib/services/conversation-detail-window.store.js +50 -9
- package/dist/lib/services/conversation-detail-window.store.js.map +1 -1
- package/dist/lib/services/conversation-naming.d.ts +72 -22
- package/dist/lib/services/conversation-naming.d.ts.map +1 -1
- package/dist/lib/services/conversation-naming.js +84 -10
- package/dist/lib/services/conversation-naming.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +13 -5
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +39 -19
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +26 -9
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +61 -18
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.d.ts +33 -5
- package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.js +71 -11
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- package/dist/lib/services/realtime-pairing.d.ts +10 -5
- package/dist/lib/services/realtime-pairing.d.ts.map +1 -1
- package/dist/lib/services/realtime-pairing.js +15 -6
- package/dist/lib/services/realtime-pairing.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts +3 -2
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +7 -2
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +7 -2
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +13 -4
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/utils/conversation-branching.d.ts +4 -0
- package/dist/lib/utils/conversation-branching.d.ts.map +1 -0
- package/dist/lib/utils/conversation-branching.js +5 -0
- package/dist/lib/utils/conversation-branching.js.map +1 -0
- package/dist/lib/utils/conversation-forks.d.ts +315 -0
- package/dist/lib/utils/conversation-forks.d.ts.map +1 -0
- package/dist/lib/utils/conversation-forks.js +456 -0
- package/dist/lib/utils/conversation-forks.js.map +1 -0
- package/dist/public-api.d.ts +23 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +30 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +37 -33
- package/dist/lib/components/thread/thread-panel.component.d.ts +0 -126
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +0 -1
- package/dist/lib/components/thread/thread-panel.component.js +0 -440
- package/dist/lib/components/thread/thread-panel.component.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import type { ForkSummary } from '@memberjunction/core-entities';
|
|
3
|
+
import { type ForkListFilter, type ForkListRow } from '../../utils/conversation-forks';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* The forks of a conversation, as a popover list with All / Mine filters. A row opens its fork.
|
|
7
|
+
* Takes focus when it opens; Escape closes it.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ForksPopoverComponent implements AfterViewInit {
|
|
10
|
+
private _summaries;
|
|
11
|
+
private _currentUserId;
|
|
12
|
+
private panel?;
|
|
13
|
+
/** The fork summaries of the conversation. */
|
|
14
|
+
set Summaries(value: ReadonlyArray<ForkSummary>);
|
|
15
|
+
get Summaries(): ReadonlyArray<ForkSummary>;
|
|
16
|
+
/** The person looking, for the Mine filter. */
|
|
17
|
+
set CurrentUserID(value: string);
|
|
18
|
+
get CurrentUserID(): string;
|
|
19
|
+
/** The id of the popover element, for the opener's aria-controls. */
|
|
20
|
+
PanelID: string;
|
|
21
|
+
/** A row was chosen: the id of its fork. */
|
|
22
|
+
ForkSelected: EventEmitter<string>;
|
|
23
|
+
/** The close button or Escape was pressed. */
|
|
24
|
+
Closed: EventEmitter<void>;
|
|
25
|
+
Filter: ForkListFilter;
|
|
26
|
+
Rows: ForkListRow[];
|
|
27
|
+
ngAfterViewInit(): void;
|
|
28
|
+
SetFilter(filter: ForkListFilter): void;
|
|
29
|
+
SelectRow(row: ForkListRow): void;
|
|
30
|
+
Close(): void;
|
|
31
|
+
/** Escape inside the popover closes it; the key goes no further up the page. */
|
|
32
|
+
OnEscape(event: Event): void;
|
|
33
|
+
private rebuild;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ForksPopoverComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ForksPopoverComponent, "mj-conversation-forks-popover", never, { "Summaries": { "alias": "Summaries"; "required": false; }; "CurrentUserID": { "alias": "CurrentUserID"; "required": false; }; "PanelID": { "alias": "PanelID"; "required": false; }; }, { "ForkSelected": "ForkSelected"; "Closed": "Closed"; }, never, never, false, never>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=forks-popover.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forks-popover.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/conversation/forks-popover.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAyB,YAAY,EAA0C,MAAM,eAAe,CAAC;AAC3H,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;;AAE1G;;;GAGG;AACH,qBAMa,qBAAsB,YAAW,aAAa;IACzD,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,cAAc,CAAM;IAER,OAAO,CAAC,KAAK,CAAC,CAA0B;IAE5D,8CAA8C;IAC9C,IACW,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,EAGrD;IACD,IAAW,SAAS,IAAI,aAAa,CAAC,WAAW,CAAC,CAEjD;IAED,+CAA+C;IAC/C,IACW,aAAa,CAAC,KAAK,EAAE,MAAM,EAGrC;IACD,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED,qEAAqE;IACrD,OAAO,SAAM;IAE7B,4CAA4C;IAC3B,YAAY,uBAA8B;IAC3D,8CAA8C;IAC7B,MAAM,qBAA4B;IAE5C,MAAM,EAAE,cAAc,CAAS;IAC/B,IAAI,EAAE,WAAW,EAAE,CAAM;IAEzB,eAAe,IAAI,IAAI;IAIvB,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAKvC,SAAS,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;IAIjC,KAAK,IAAI,IAAI;IAIpB,gFAAgF;IAEzE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMnC,OAAO,CAAC,OAAO;yCA9DJ,qBAAqB;2CAArB,qBAAqB;CAiEjC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Component, EventEmitter, HostListener, Input, Output, ViewChild } from '@angular/core';
|
|
2
|
+
import { BuildForkListRows } from '../../utils/conversation-forks';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@memberjunction/ng-ui-components";
|
|
5
|
+
const _c0 = ["panel"];
|
|
6
|
+
const _forTrack0 = ($index, $item) => $item.Summary.Branch.ID;
|
|
7
|
+
function ForksPopoverComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
i0.ɵɵelement(0, "mj-empty-state", 10);
|
|
9
|
+
} if (rf & 2) {
|
|
10
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
11
|
+
i0.ɵɵproperty("Title", ctx_r0.Filter === "All" ? "No forks yet" : "No forks you started or wrote in");
|
|
12
|
+
} }
|
|
13
|
+
function ForksPopoverComponent_For_13_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
15
|
+
i0.ɵɵtext(1);
|
|
16
|
+
i0.ɵɵelementEnd();
|
|
17
|
+
} if (rf & 2) {
|
|
18
|
+
const row_r3 = i0.ɵɵnextContext().$implicit;
|
|
19
|
+
i0.ɵɵadvance();
|
|
20
|
+
i0.ɵɵtextInterpolate(row_r3.PreviewText);
|
|
21
|
+
} }
|
|
22
|
+
function ForksPopoverComponent_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
24
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
25
|
+
i0.ɵɵlistener("click", function ForksPopoverComponent_For_13_Template_div_click_0_listener() { const row_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.SelectRow(row_r3)); });
|
|
26
|
+
i0.ɵɵelementStart(1, "span", 13);
|
|
27
|
+
i0.ɵɵelement(2, "i");
|
|
28
|
+
i0.ɵɵelementEnd();
|
|
29
|
+
i0.ɵɵelementStart(3, "span", 14)(4, "span", 15);
|
|
30
|
+
i0.ɵɵtext(5);
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
32
|
+
i0.ɵɵconditionalCreate(6, ForksPopoverComponent_For_13_Conditional_6_Template, 2, 1, "span", 16);
|
|
33
|
+
i0.ɵɵelementStart(7, "span", 17);
|
|
34
|
+
i0.ɵɵtext(8);
|
|
35
|
+
i0.ɵɵelementEnd()()();
|
|
36
|
+
} if (rf & 2) {
|
|
37
|
+
const row_r3 = ctx.$implicit;
|
|
38
|
+
i0.ɵɵstyleProp("margin-left", row_r3.Depth * 24, "px");
|
|
39
|
+
i0.ɵɵclassProp("nested", row_r3.Depth > 0);
|
|
40
|
+
i0.ɵɵproperty("mjClickable", "Open fork " + row_r3.Summary.DisplayName + ", " + row_r3.MetaText);
|
|
41
|
+
i0.ɵɵattribute("data-kind", row_r3.Summary.Kind);
|
|
42
|
+
i0.ɵɵadvance(2);
|
|
43
|
+
i0.ɵɵclassMap(row_r3.Icon);
|
|
44
|
+
i0.ɵɵadvance(3);
|
|
45
|
+
i0.ɵɵtextInterpolate(row_r3.Summary.DisplayName);
|
|
46
|
+
i0.ɵɵadvance();
|
|
47
|
+
i0.ɵɵconditional(row_r3.PreviewText ? 6 : -1);
|
|
48
|
+
i0.ɵɵadvance(2);
|
|
49
|
+
i0.ɵɵtextInterpolate(row_r3.MetaText);
|
|
50
|
+
} }
|
|
51
|
+
/**
|
|
52
|
+
* The forks of a conversation, as a popover list with All / Mine filters. A row opens its fork.
|
|
53
|
+
* Takes focus when it opens; Escape closes it.
|
|
54
|
+
*/
|
|
55
|
+
export class ForksPopoverComponent {
|
|
56
|
+
_summaries = [];
|
|
57
|
+
_currentUserId = '';
|
|
58
|
+
panel;
|
|
59
|
+
/** The fork summaries of the conversation. */
|
|
60
|
+
set Summaries(value) {
|
|
61
|
+
this._summaries = value ?? [];
|
|
62
|
+
this.rebuild();
|
|
63
|
+
}
|
|
64
|
+
get Summaries() {
|
|
65
|
+
return this._summaries;
|
|
66
|
+
}
|
|
67
|
+
/** The person looking, for the Mine filter. */
|
|
68
|
+
set CurrentUserID(value) {
|
|
69
|
+
this._currentUserId = value ?? '';
|
|
70
|
+
this.rebuild();
|
|
71
|
+
}
|
|
72
|
+
get CurrentUserID() {
|
|
73
|
+
return this._currentUserId;
|
|
74
|
+
}
|
|
75
|
+
/** The id of the popover element, for the opener's aria-controls. */
|
|
76
|
+
PanelID = '';
|
|
77
|
+
/** A row was chosen: the id of its fork. */
|
|
78
|
+
ForkSelected = new EventEmitter();
|
|
79
|
+
/** The close button or Escape was pressed. */
|
|
80
|
+
Closed = new EventEmitter();
|
|
81
|
+
Filter = 'All';
|
|
82
|
+
Rows = [];
|
|
83
|
+
ngAfterViewInit() {
|
|
84
|
+
this.panel?.nativeElement.focus({ preventScroll: true });
|
|
85
|
+
}
|
|
86
|
+
SetFilter(filter) {
|
|
87
|
+
this.Filter = filter;
|
|
88
|
+
this.rebuild();
|
|
89
|
+
}
|
|
90
|
+
SelectRow(row) {
|
|
91
|
+
this.ForkSelected.emit(row.Summary.Branch.ID);
|
|
92
|
+
}
|
|
93
|
+
Close() {
|
|
94
|
+
this.Closed.emit();
|
|
95
|
+
}
|
|
96
|
+
/** Escape inside the popover closes it; the key goes no further up the page. */
|
|
97
|
+
OnEscape(event) {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
event.stopPropagation();
|
|
100
|
+
this.Close();
|
|
101
|
+
}
|
|
102
|
+
rebuild() {
|
|
103
|
+
this.Rows = BuildForkListRows(this._summaries, this.Filter ?? 'All', this._currentUserId, new Date());
|
|
104
|
+
}
|
|
105
|
+
static ɵfac = function ForksPopoverComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ForksPopoverComponent)(); };
|
|
106
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ForksPopoverComponent, selectors: [["mj-conversation-forks-popover"]], viewQuery: function ForksPopoverComponent_Query(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
108
|
+
} if (rf & 2) {
|
|
109
|
+
let _t;
|
|
110
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panel = _t.first);
|
|
111
|
+
} }, hostBindings: function ForksPopoverComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
112
|
+
i0.ɵɵlistener("keydown.escape", function ForksPopoverComponent_keydown_escape_HostBindingHandler($event) { return ctx.OnEscape($event); });
|
|
113
|
+
} }, inputs: { Summaries: "Summaries", CurrentUserID: "CurrentUserID", PanelID: "PanelID" }, outputs: { ForkSelected: "ForkSelected", Closed: "Closed" }, standalone: false, decls: 14, vars: 4, consts: [["panel", ""], ["role", "dialog", "tabindex", "-1", "aria-label", "Forks in this conversation", 1, "forks-popover"], [1, "forks-popover-header"], [1, "forks-popover-title"], ["mjButton", "", "Variant", "icon", "Size", "sm", "aria-label", "Close", "title", "Close", 1, "forks-popover-close", 3, "click"], [1, "fa-solid", "fa-xmark"], ["role", "group", "aria-label", "Filter forks", 1, "forks-popover-filters"], ["Label", "All", 3, "Clicked", "Active"], ["Label", "Mine", 3, "Clicked", "Active"], [1, "forks-popover-body"], ["Size", "compact", "Icon", "fa-solid fa-code-branch", 3, "Title"], [1, "forks-popover-row", 3, "nested", "margin-left", "mjClickable"], [1, "forks-popover-row", 3, "click", "mjClickable"], ["aria-hidden", "true", 1, "forks-popover-icon"], [1, "forks-popover-text"], [1, "forks-popover-name"], [1, "forks-popover-preview"], [1, "forks-popover-meta"]], template: function ForksPopoverComponent_Template(rf, ctx) { if (rf & 1) {
|
|
114
|
+
i0.ɵɵelementStart(0, "section", 1, 0)(2, "div", 2)(3, "h2", 3);
|
|
115
|
+
i0.ɵɵtext(4, "Forks");
|
|
116
|
+
i0.ɵɵelementEnd();
|
|
117
|
+
i0.ɵɵelementStart(5, "button", 4);
|
|
118
|
+
i0.ɵɵlistener("click", function ForksPopoverComponent_Template_button_click_5_listener() { return ctx.Close(); });
|
|
119
|
+
i0.ɵɵelement(6, "i", 5);
|
|
120
|
+
i0.ɵɵelementEnd()();
|
|
121
|
+
i0.ɵɵelementStart(7, "div", 6)(8, "mj-filter-chip", 7);
|
|
122
|
+
i0.ɵɵlistener("Clicked", function ForksPopoverComponent_Template_mj_filter_chip_Clicked_8_listener() { return ctx.SetFilter("All"); });
|
|
123
|
+
i0.ɵɵelementEnd();
|
|
124
|
+
i0.ɵɵelementStart(9, "mj-filter-chip", 8);
|
|
125
|
+
i0.ɵɵlistener("Clicked", function ForksPopoverComponent_Template_mj_filter_chip_Clicked_9_listener() { return ctx.SetFilter("Mine"); });
|
|
126
|
+
i0.ɵɵelementEnd()();
|
|
127
|
+
i0.ɵɵelementStart(10, "div", 9);
|
|
128
|
+
i0.ɵɵconditionalCreate(11, ForksPopoverComponent_Conditional_11_Template, 1, 1, "mj-empty-state", 10);
|
|
129
|
+
i0.ɵɵrepeaterCreate(12, ForksPopoverComponent_For_13_Template, 9, 11, "div", 11, _forTrack0);
|
|
130
|
+
i0.ɵɵelementEnd()();
|
|
131
|
+
} if (rf & 2) {
|
|
132
|
+
i0.ɵɵattribute("id", ctx.PanelID || null);
|
|
133
|
+
i0.ɵɵadvance(8);
|
|
134
|
+
i0.ɵɵproperty("Active", ctx.Filter === "All");
|
|
135
|
+
i0.ɵɵadvance();
|
|
136
|
+
i0.ɵɵproperty("Active", ctx.Filter === "Mine");
|
|
137
|
+
i0.ɵɵadvance(2);
|
|
138
|
+
i0.ɵɵconditional(ctx.Rows.length === 0 ? 11 : -1);
|
|
139
|
+
i0.ɵɵadvance();
|
|
140
|
+
i0.ɵɵrepeater(ctx.Rows);
|
|
141
|
+
} }, dependencies: [i1.MJButtonDirective, i1.MJClickableDirective, i1.MJEmptyStateComponent, i1.MJFilterChipComponent], styles: ["\n[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: var(--mj-space-2);\n right: var(--mj-space-4);\n width: 420px;\n max-width: calc(100% - var(--mj-space-8));\n max-height: min(70vh, calc(100% - var(--mj-space-4)));\n z-index: 50;\n}\n.forks-popover[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n min-height: 0;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-lg);\n}\n\n.forks-popover[_ngcontent-%COMP%]:focus {\n outline: none;\n}\n.forks-popover-header[_ngcontent-%COMP%] {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-3) var(--mj-space-4) var(--mj-space-2);\n}\n.forks-popover-title[_ngcontent-%COMP%] {\n flex: 1;\n margin: 0;\n font-size: var(--mj-text-base);\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.forks-popover-filters[_ngcontent-%COMP%] {\n flex-shrink: 0;\n display: flex;\n gap: var(--mj-space-1);\n padding: 0 var(--mj-space-4) var(--mj-space-3);\n border-bottom: 1px solid var(--mj-border-default);\n}\n.forks-popover-body[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: var(--mj-space-2);\n}\n.forks-popover-row[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-3);\n padding: var(--mj-space-2) var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n}\n.forks-popover-row[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n.forks-popover-row[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n.forks-popover-row.nested[_ngcontent-%COMP%] {\n border-left: 2px solid var(--mj-border-default);\n}\n.forks-popover-icon[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--mj-radius-md);\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info);\n}\n.forks-popover-row[data-kind='Edit'][_ngcontent-%COMP%] .forks-popover-icon[_ngcontent-%COMP%] {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n.forks-popover-row[data-kind='Regenerate'][_ngcontent-%COMP%] .forks-popover-icon[_ngcontent-%COMP%] {\n background: var(--mj-brand-tertiary-subtle);\n color: var(--mj-brand-tertiary);\n}\n.forks-popover-text[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.forks-popover-name[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n}\n.forks-popover-preview[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.forks-popover-meta[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}"] });
|
|
142
|
+
}
|
|
143
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ForksPopoverComponent, [{
|
|
144
|
+
type: Component,
|
|
145
|
+
args: [{ standalone: false, selector: 'mj-conversation-forks-popover', template: "<section #panel class=\"forks-popover\" role=\"dialog\" tabindex=\"-1\" [attr.id]=\"PanelID || null\" aria-label=\"Forks in this conversation\">\n <div class=\"forks-popover-header\">\n <h2 class=\"forks-popover-title\">Forks</h2>\n <button mjButton Variant=\"icon\" Size=\"sm\" class=\"forks-popover-close\" (click)=\"Close()\" aria-label=\"Close\" title=\"Close\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"forks-popover-filters\" role=\"group\" aria-label=\"Filter forks\">\n <mj-filter-chip Label=\"All\" [Active]=\"Filter === 'All'\" (Clicked)=\"SetFilter('All')\" />\n <mj-filter-chip Label=\"Mine\" [Active]=\"Filter === 'Mine'\" (Clicked)=\"SetFilter('Mine')\" />\n </div>\n <div class=\"forks-popover-body\">\n @if (Rows.length === 0) {\n <mj-empty-state Size=\"compact\" Icon=\"fa-solid fa-code-branch\" [Title]=\"Filter === 'All' ? 'No forks yet' : 'No forks you started or wrote in'\" />\n }\n @for (row of Rows; track row.Summary.Branch.ID) {\n <div class=\"forks-popover-row\" [class.nested]=\"row.Depth > 0\" [style.margin-left.px]=\"row.Depth * 24\"\n [attr.data-kind]=\"row.Summary.Kind\"\n [mjClickable]=\"'Open fork ' + row.Summary.DisplayName + ', ' + row.MetaText\" (click)=\"SelectRow(row)\">\n <span class=\"forks-popover-icon\" aria-hidden=\"true\"><i [class]=\"row.Icon\"></i></span>\n <span class=\"forks-popover-text\">\n <span class=\"forks-popover-name\">{{ row.Summary.DisplayName }}</span>\n @if (row.PreviewText) {\n <span class=\"forks-popover-preview\">{{ row.PreviewText }}</span>\n }\n <span class=\"forks-popover-meta\">{{ row.MetaText }}</span>\n </span>\n </div>\n }\n </div>\n</section>\n", styles: ["/* The popover never grows past its container (the chat content area clips overflow); the row list scrolls. */\n:host {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: var(--mj-space-2);\n right: var(--mj-space-4);\n width: 420px;\n max-width: calc(100% - var(--mj-space-8));\n max-height: min(70vh, calc(100% - var(--mj-space-4)));\n z-index: 50;\n}\n.forks-popover {\n display: flex;\n flex-direction: column;\n min-height: 0;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-lg);\n}\n/* The panel takes focus only so Tab and Escape start inside it; its controls show the focus ring. */\n.forks-popover:focus {\n outline: none;\n}\n.forks-popover-header {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-3) var(--mj-space-4) var(--mj-space-2);\n}\n.forks-popover-title {\n flex: 1;\n margin: 0;\n font-size: var(--mj-text-base);\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.forks-popover-filters {\n flex-shrink: 0;\n display: flex;\n gap: var(--mj-space-1);\n padding: 0 var(--mj-space-4) var(--mj-space-3);\n border-bottom: 1px solid var(--mj-border-default);\n}\n.forks-popover-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: var(--mj-space-2);\n}\n.forks-popover-row {\n display: flex;\n gap: var(--mj-space-3);\n padding: var(--mj-space-2) var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n}\n.forks-popover-row:hover {\n background: var(--mj-bg-surface-hover);\n}\n.forks-popover-row:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n.forks-popover-row.nested {\n border-left: 2px solid var(--mj-border-default);\n}\n.forks-popover-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--mj-radius-md);\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info);\n}\n.forks-popover-row[data-kind='Edit'] .forks-popover-icon {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n.forks-popover-row[data-kind='Regenerate'] .forks-popover-icon {\n background: var(--mj-brand-tertiary-subtle);\n color: var(--mj-brand-tertiary);\n}\n.forks-popover-text {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.forks-popover-name {\n font-weight: 600;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-primary);\n}\n.forks-popover-preview {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.forks-popover-meta {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n"] }]
|
|
146
|
+
}], null, { panel: [{
|
|
147
|
+
type: ViewChild,
|
|
148
|
+
args: ['panel']
|
|
149
|
+
}], Summaries: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], CurrentUserID: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}], PanelID: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}], ForkSelected: [{
|
|
156
|
+
type: Output
|
|
157
|
+
}], Closed: [{
|
|
158
|
+
type: Output
|
|
159
|
+
}], OnEscape: [{
|
|
160
|
+
type: HostListener,
|
|
161
|
+
args: ['keydown.escape', ['$event']]
|
|
162
|
+
}] }); })();
|
|
163
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ForksPopoverComponent, { className: "ForksPopoverComponent", filePath: "src/lib/components/conversation/forks-popover.component.ts", lineNumber: 15 }); })();
|
|
164
|
+
//# sourceMappingURL=forks-popover.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forks-popover.component.js","sourceRoot":"","sources":["../../../../src/lib/components/conversation/forks-popover.component.ts","../../../../src/lib/components/conversation/forks-popover.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAc,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3H,OAAO,EAAE,iBAAiB,EAAyC,MAAM,gCAAgC,CAAC;;;;;;ICWpG,qCAAiJ;;;IAAnF,qGAAgF;;;IAUxI,gCAAoC;IAAA,YAAqB;IAAA,iBAAO;;;IAA5B,cAAqB;IAArB,wCAAqB;;;;IAP/D,+BAE2G;IAAzB,wMAAS,wBAAc,KAAC;IACxG,gCAAoD;IAAA,oBAA0B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AK,YACP,+BAA+B;;kBAQxC,SAAS;mBAAC,OAAO;;kBAGjB,KAAK;;kBAUL,KAAK;;kBAUL,KAAK;;kBAGL,MAAM;;kBAEN,MAAM;;kBAuBN,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kFAvD/B,qBAAqB","sourcesContent":["import { AfterViewInit, Component, ElementRef, EventEmitter, HostListener, Input, Output, ViewChild } from '@angular/core';\nimport type { ForkSummary } from '@memberjunction/core-entities';\nimport { BuildForkListRows, type ForkListFilter, type ForkListRow } from '../../utils/conversation-forks';\n\n/**\n * The forks of a conversation, as a popover list with All / Mine filters. A row opens its fork.\n * Takes focus when it opens; Escape closes it.\n */\n@Component({\n standalone: false,\n selector: 'mj-conversation-forks-popover',\n templateUrl: './forks-popover.component.html',\n styleUrls: ['./forks-popover.component.css'],\n})\nexport class ForksPopoverComponent implements AfterViewInit {\n private _summaries: ReadonlyArray<ForkSummary> = [];\n private _currentUserId = '';\n\n @ViewChild('panel') private panel?: ElementRef<HTMLElement>;\n\n /** The fork summaries of the conversation. */\n @Input()\n public set Summaries(value: ReadonlyArray<ForkSummary>) {\n this._summaries = value ?? [];\n this.rebuild();\n }\n public get Summaries(): ReadonlyArray<ForkSummary> {\n return this._summaries;\n }\n\n /** The person looking, for the Mine filter. */\n @Input()\n public set CurrentUserID(value: string) {\n this._currentUserId = value ?? '';\n this.rebuild();\n }\n public get CurrentUserID(): string {\n return this._currentUserId;\n }\n\n /** The id of the popover element, for the opener's aria-controls. */\n @Input() public PanelID = '';\n\n /** A row was chosen: the id of its fork. */\n @Output() public ForkSelected = new EventEmitter<string>();\n /** The close button or Escape was pressed. */\n @Output() public Closed = new EventEmitter<void>();\n\n public Filter: ForkListFilter = 'All';\n public Rows: ForkListRow[] = [];\n\n public ngAfterViewInit(): void {\n this.panel?.nativeElement.focus({ preventScroll: true });\n }\n\n public SetFilter(filter: ForkListFilter): void {\n this.Filter = filter;\n this.rebuild();\n }\n\n public SelectRow(row: ForkListRow): void {\n this.ForkSelected.emit(row.Summary.Branch.ID);\n }\n\n public Close(): void {\n this.Closed.emit();\n }\n\n /** Escape inside the popover closes it; the key goes no further up the page. */\n @HostListener('keydown.escape', ['$event'])\n public OnEscape(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.Close();\n }\n\n private rebuild(): void {\n this.Rows = BuildForkListRows(this._summaries, this.Filter ?? 'All', this._currentUserId, new Date());\n }\n}\n","<section #panel class=\"forks-popover\" role=\"dialog\" tabindex=\"-1\" [attr.id]=\"PanelID || null\" aria-label=\"Forks in this conversation\">\n <div class=\"forks-popover-header\">\n <h2 class=\"forks-popover-title\">Forks</h2>\n <button mjButton Variant=\"icon\" Size=\"sm\" class=\"forks-popover-close\" (click)=\"Close()\" aria-label=\"Close\" title=\"Close\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"forks-popover-filters\" role=\"group\" aria-label=\"Filter forks\">\n <mj-filter-chip Label=\"All\" [Active]=\"Filter === 'All'\" (Clicked)=\"SetFilter('All')\" />\n <mj-filter-chip Label=\"Mine\" [Active]=\"Filter === 'Mine'\" (Clicked)=\"SetFilter('Mine')\" />\n </div>\n <div class=\"forks-popover-body\">\n @if (Rows.length === 0) {\n <mj-empty-state Size=\"compact\" Icon=\"fa-solid fa-code-branch\" [Title]=\"Filter === 'All' ? 'No forks yet' : 'No forks you started or wrote in'\" />\n }\n @for (row of Rows; track row.Summary.Branch.ID) {\n <div class=\"forks-popover-row\" [class.nested]=\"row.Depth > 0\" [style.margin-left.px]=\"row.Depth * 24\"\n [attr.data-kind]=\"row.Summary.Kind\"\n [mjClickable]=\"'Open fork ' + row.Summary.DisplayName + ', ' + row.MetaText\" (click)=\"SelectRow(row)\">\n <span class=\"forks-popover-icon\" aria-hidden=\"true\"><i [class]=\"row.Icon\"></i></span>\n <span class=\"forks-popover-text\">\n <span class=\"forks-popover-name\">{{ row.Summary.DisplayName }}</span>\n @if (row.PreviewText) {\n <span class=\"forks-popover-preview\">{{ row.PreviewText }}</span>\n }\n <span class=\"forks-popover-meta\">{{ row.MetaText }}</span>\n </span>\n </div>\n }\n </div>\n</section>\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { MJConversationEntity } from '@memberjunction/core-entities';
|
|
2
|
+
import { MJConversationEntity, type ConversationScope } from '@memberjunction/core-entities';
|
|
3
3
|
import { UserInfo } from '@memberjunction/core';
|
|
4
4
|
import { ExportService, ExportFormat, ExportOptions, ExportBranding } from '../../services/export.service';
|
|
5
5
|
import { DialogService } from '../../services/dialog.service';
|
|
@@ -36,6 +36,11 @@ export declare class ExportModalComponent {
|
|
|
36
36
|
set branding(value: ExportBranding | null);
|
|
37
37
|
/** @deprecated Use {@link Branding}. */
|
|
38
38
|
get branding(): ExportBranding | null;
|
|
39
|
+
/**
|
|
40
|
+
* The scope to export: the view the person has open. Null, or a scope of another conversation,
|
|
41
|
+
* exports Main.
|
|
42
|
+
*/
|
|
43
|
+
Scope: ConversationScope | null;
|
|
39
44
|
Cancelled: EventEmitter<void>;
|
|
40
45
|
/**
|
|
41
46
|
* @deprecated Use {@link Cancelled}.
|
|
@@ -128,6 +133,6 @@ export declare class ExportModalComponent {
|
|
|
128
133
|
onCancel(): void;
|
|
129
134
|
private resetForm;
|
|
130
135
|
static ɵfac: i0.ɵɵFactoryDeclaration<ExportModalComponent, never>;
|
|
131
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ExportModalComponent, "mj-export-modal", never, { "IsVisible": { "alias": "IsVisible"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "Conversation": { "alias": "Conversation"; "required": false; }; "conversation": { "alias": "conversation"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Branding": { "alias": "Branding"; "required": false; }; "branding": { "alias": "branding"; "required": false; }; }, { "Cancelled": "Cancelled"; "cancelled": "cancelled"; "Exported": "Exported"; "exported": "exported"; }, never, never, false, never>;
|
|
136
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExportModalComponent, "mj-export-modal", never, { "IsVisible": { "alias": "IsVisible"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "Conversation": { "alias": "Conversation"; "required": false; }; "conversation": { "alias": "conversation"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Branding": { "alias": "Branding"; "required": false; }; "branding": { "alias": "branding"; "required": false; }; "Scope": { "alias": "Scope"; "required": false; }; }, { "Cancelled": "Cancelled"; "cancelled": "cancelled"; "Exported": "Exported"; "exported": "exported"; }, never, never, false, never>;
|
|
132
137
|
}
|
|
133
138
|
//# sourceMappingURL=export-modal.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"export-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAsB,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;;AAE5D,qBA6Ua,oBAAoB;IA2O7B,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,aAAa;IACrB,OAAO,CAA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
|
|
|
1
1
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { ConversationEngine } from '@memberjunction/core-entities';
|
|
3
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
import * as i1 from "../../services/export.service";
|
|
4
6
|
import * as i2 from "../../services/dialog.service";
|
|
@@ -277,6 +279,11 @@ export class ExportModalComponent {
|
|
|
277
279
|
get branding() {
|
|
278
280
|
return this.Branding;
|
|
279
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* The scope to export: the view the person has open. Null, or a scope of another conversation,
|
|
284
|
+
* exports Main.
|
|
285
|
+
*/
|
|
286
|
+
Scope = null;
|
|
280
287
|
Cancelled = new EventEmitter();
|
|
281
288
|
/**
|
|
282
289
|
* @deprecated Use {@link Cancelled}.
|
|
@@ -447,8 +454,12 @@ export class ExportModalComponent {
|
|
|
447
454
|
}
|
|
448
455
|
this.IsExporting = true;
|
|
449
456
|
this.ErrorMessage = '';
|
|
457
|
+
const conversationId = this.Conversation.ID;
|
|
450
458
|
try {
|
|
451
|
-
|
|
459
|
+
const scope = this.Scope && UUIDsEqual(this.Scope.ConversationID, conversationId)
|
|
460
|
+
? this.Scope
|
|
461
|
+
: ConversationEngine.TrunkScope(conversationId);
|
|
462
|
+
await this.exportService.ExportConversation(conversationId, scope, this.SelectedFormat, this.CurrentUser, this.resolveExportOptions());
|
|
452
463
|
this.toastService.success('Conversation exported successfully');
|
|
453
464
|
this.Exported.emit();
|
|
454
465
|
this.resetForm();
|
|
@@ -488,7 +499,7 @@ export class ExportModalComponent {
|
|
|
488
499
|
this.IsVisible = false;
|
|
489
500
|
}
|
|
490
501
|
static ɵfac = function ExportModalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ExportModalComponent)(i0.ɵɵdirectiveInject(i1.ExportService), i0.ɵɵdirectiveInject(i2.DialogService), i0.ɵɵdirectiveInject(i3.ToastService)); };
|
|
491
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportModalComponent, selectors: [["mj-export-modal"]], inputs: { IsVisible: "IsVisible", isVisible: "isVisible", Conversation: "Conversation", conversation: "conversation", CurrentUser: "CurrentUser", currentUser: "currentUser", Branding: "Branding", branding: "branding" }, outputs: { Cancelled: "Cancelled", cancelled: "cancelled", Exported: "Exported", exported: "exported" }, standalone: false, decls: 1, vars: 1, consts: [[3, "Title", "Width", "Height", "Visible"], [3, "Close", "Title", "Width", "Height", "Visible"], [1, "export-modal-content"], [1, "format-section"], [1, "section-title"], [1, "fa-solid", "fa-file-export"], [1, "section-description"], [1, "format-options"], [1, "format-option", 3, "selected"], [1, "options-section"], [1, "fa-solid", "fa-sliders"], [1, "option-checkboxes"], [1, "checkbox-label"], ["type", "checkbox", 3, "ngModelChange", "ngModel", "disabled"], [1, "format-specific-options"], [1, "error-message"], [1, "loading-indicator"], ["mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-download"], [1, "format-option", 3, "click"], [1, "format-details"], [1, "format-name"], [1, "format-description"], [1, "fa-solid", "fa-check-circle", "check-icon"], [1, "subsection-title"], [1, "mj-input", "theme-mode-select", 3, "ngModelChange", "ngModel", "disabled"], ["value", "light"], ["value", "dark"], [1, "fa-solid", "fa-exclamation-triangle"], ["text", "Exporting conversation...", "size", "small"]], template: function ExportModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
502
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportModalComponent, selectors: [["mj-export-modal"]], inputs: { IsVisible: "IsVisible", isVisible: "isVisible", Conversation: "Conversation", conversation: "conversation", CurrentUser: "CurrentUser", currentUser: "currentUser", Branding: "Branding", branding: "branding", Scope: "Scope" }, outputs: { Cancelled: "Cancelled", cancelled: "cancelled", Exported: "Exported", exported: "exported" }, standalone: false, decls: 1, vars: 1, consts: [[3, "Title", "Width", "Height", "Visible"], [3, "Close", "Title", "Width", "Height", "Visible"], [1, "export-modal-content"], [1, "format-section"], [1, "section-title"], [1, "fa-solid", "fa-file-export"], [1, "section-description"], [1, "format-options"], [1, "format-option", 3, "selected"], [1, "options-section"], [1, "fa-solid", "fa-sliders"], [1, "option-checkboxes"], [1, "checkbox-label"], ["type", "checkbox", 3, "ngModelChange", "ngModel", "disabled"], [1, "format-specific-options"], [1, "error-message"], [1, "loading-indicator"], ["mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-download"], [1, "format-option", 3, "click"], [1, "format-details"], [1, "format-name"], [1, "format-description"], [1, "fa-solid", "fa-check-circle", "check-icon"], [1, "subsection-title"], [1, "mj-input", "theme-mode-select", 3, "ngModelChange", "ngModel", "disabled"], ["value", "light"], ["value", "dark"], [1, "fa-solid", "fa-exclamation-triangle"], ["text", "Exporting conversation...", "size", "small"]], template: function ExportModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
492
503
|
i0.ɵɵconditionalCreate(0, ExportModalComponent_Conditional_0_Template, 40, 15, "mj-dialog", 0);
|
|
493
504
|
} if (rf & 2) {
|
|
494
505
|
i0.ɵɵconditional(ctx.isVisible ? 0 : -1);
|
|
@@ -652,6 +663,8 @@ export class ExportModalComponent {
|
|
|
652
663
|
type: Input
|
|
653
664
|
}], branding: [{
|
|
654
665
|
type: Input
|
|
666
|
+
}], Scope: [{
|
|
667
|
+
type: Input
|
|
655
668
|
}], Cancelled: [{
|
|
656
669
|
type: Output
|
|
657
670
|
}], cancelled: [{
|
|
@@ -661,5 +674,5 @@ export class ExportModalComponent {
|
|
|
661
674
|
}], exported: [{
|
|
662
675
|
type: Output
|
|
663
676
|
}] }); })();
|
|
664
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExportModalComponent, { className: "ExportModalComponent", filePath: "src/lib/components/export/export-modal.component.ts", lineNumber:
|
|
677
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExportModalComponent, { className: "ExportModalComponent", filePath: "src/lib/components/export/export-modal.component.ts", lineNumber: 342 }); })();
|
|
665
678
|
//# sourceMappingURL=export-modal.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;IAuCnD,wBAAmD;;;;IAVvD,+BAGuC;IAArC,yNAAS,oCAA0B,KAAC;IACpC,oBAA6B;IAE3B,AADF,+BAA4B,cACD;IAAA,YAAiB;IAAA,iBAAM;IAChD,+BAAgC;IAAA,YAAwB;IAC1D,AAD0D,iBAAM,EAC1D;IACN,0GAAuC;IAGzC,iBAAM;;;;IAVJ,qEAAkD;IAE/C,cAAqB;IAArB,6BAAqB;IAEG,eAAiB;IAAjB,oCAAiB;IACV,eAAwB;IAAxB,2CAAwB;IAE1D,cAEC;IAFD,oEAEC;;;;IAiCD,AADF,iCAA8B,gBAI2D;IADrF,gWAAwC;IAF1C,iBAGuF;IACvF,4BAAM;IAAA,gCAAgB;IAAA,iBAAO;IAC7B,6BAAO;IAAA,YAAkB;IAC3B,AAD2B,iBAAQ,EAC3B;;;IAJJ,cAAwC;IAAxC,iEAAwC;IACxC,qHAAoF;IAE/E,eAAkB;IAAlB,yCAAkB;;;;IAM3B,AADF,+BAAqC,aACN;IAAA,4BAAY;IAAA,iBAAK;IAE5C,AADF,iCAA8B,gBAID;IADzB,8VAAuC;IAFzC,iBAG2B;IAC3B,4BAAM;IAAA,4BAAY;IAAA,iBAAO;IACzB,6BAAO;IAAA,4CAA4B;IAEvC,AADE,AADqC,iBAAQ,EACrC,EACJ;;;IALA,eAAuC;IAAvC,gEAAuC;IACvC,6CAAw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AC,QAAQ;YAC7B,SAAS,EAAE,OAAO;SACnB,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;8GAjTU,oBAAoB;6DAApB,oBAAoB;YAzU7B,8FAAiB;;YAAjB,wCAyIC;;;iFAgMQ,oBAAoB;cA7UhC,SAAS;6BACI,KAAK,YACP,iBAAiB,YACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2IP;;kBAiMF,KAAK;;kBAuBL,KAAK;;kBAIL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAYL,KAAK;;kBAGL,KAAK;;kBAOL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kFAnFI,oBAAoB","sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { MJConversationEntity } from '@memberjunction/core-entities';\nimport { UserInfo } from '@memberjunction/core';\nimport { ExportService, ExportFormat, ExportOptions, ExportBranding } from '../../services/export.service';\nimport { DialogService } from '../../services/dialog.service';\nimport { ToastService } from '../../services/toast.service';\n\n@Component({\n standalone: false,\n selector: 'mj-export-modal',\n template: `\n @if (isVisible) {\n <mj-dialog\n [Title]=\"exportTitle\"\n [Width]=\"600\"\n [Height]=\"600\"\n [Visible]=\"true\"\n (Close)=\"onCancel()\">\n <div class=\"export-modal-content\">\n <section class=\"format-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-file-export\"></i>\n Export Format\n </h3>\n <p class=\"section-description\">\n Choose a format to export this conversation:\n </p>\n <div class=\"format-options\">\n @for (format of formats; track format.value) {\n <div\n class=\"format-option\"\n [class.selected]=\"selectedFormat === format.value\"\n (click)=\"selectFormat(format.value)\">\n <i [class]=\"format.icon\"></i>\n <div class=\"format-details\">\n <div class=\"format-name\">{{ format.name }}</div>\n <div class=\"format-description\">{{ format.description }}</div>\n </div>\n @if (selectedFormat === format.value) {\n <i class=\"fa-solid fa-check-circle check-icon\"></i>\n }\n </div>\n }\n </div>\n </section>\n <section class=\"options-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-sliders\"></i>\n Export Options\n </h3>\n <div class=\"option-checkboxes\">\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMessages\"\n [disabled]=\"isExporting\">\n <span>Include messages</span>\n <small>Export all conversation messages</small>\n </label>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMetadata\"\n [disabled]=\"isExporting\">\n <span>Include metadata</span>\n <small>Add creation date, IDs, and other metadata</small>\n </label>\n <!-- Branding applies to EVERY format (HTML gets theme colors + logo +\n footer; markdown/text/JSON get the title and attribution), so it\n belongs here rather than under HTML Options. Shown for HTML even with\n no host branding, because it still snapshots the app's theme. -->\n @if (selectedFormat === 'html' || branding) {\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeTheme\"\n [disabled]=\"isExporting || (selectedFormat === 'html' && !exportOptions.includeCSS)\">\n <span>Include branding</span>\n <small>{{ brandingHint }}</small>\n </label>\n }\n </div>\n @if (selectedFormat === 'json') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">JSON Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.prettyPrint\"\n [disabled]=\"isExporting\">\n <span>Pretty print</span>\n <small>Format JSON with indentation</small>\n </label>\n </div>\n }\n @if (selectedFormat === 'html') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">HTML Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeCSS\"\n [disabled]=\"isExporting\">\n <span>Include CSS styling</span>\n <small>Embed styles for better presentation</small>\n </label>\n <!-- Which palette gets baked in — NOT the mode the app happens to be in.\n Exporting from a dark session would otherwise put dark text on the\n export's white page. -->\n @if (exportOptions.includeTheme && exportOptions.includeCSS) {\n <label class=\"checkbox-label\">\n <span>Theme</span>\n <select\n class=\"mj-input theme-mode-select\"\n [(ngModel)]=\"exportOptions.themeMode\"\n [disabled]=\"isExporting\">\n <option value=\"light\">Light</option>\n <option value=\"dark\">Dark</option>\n </select>\n <small>Palette baked into the exported file</small>\n </label>\n }\n </div>\n }\n </section>\n @if (errorMessage) {\n <div class=\"error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n {{ errorMessage }}\n </div>\n }\n @if (isExporting) {\n <div class=\"loading-indicator\">\n <mj-loading text=\"Exporting conversation...\" size=\"small\"></mj-loading>\n </div>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton [disabled]=\"isExporting\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button mjButton variant=\"primary\" [disabled]=\"!canExport\" (click)=\"onExport()\">\n <i class=\"fa-solid fa-download\"></i>\n Export\n </button>\n </mj-dialog-actions>\n </mj-dialog>\n }\n `,\n styles: [`\n .export-modal-content {\n padding: 20px;\n max-height: calc(600px - 120px);\n overflow-y: auto;\n }\n\n section {\n margin-bottom: 24px;\n }\n\n .section-title {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0 0 8px 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .section-title i {\n color: var(--mj-brand-primary);\n }\n\n .section-description {\n margin: 0 0 16px 0;\n color: var(--mj-text-muted);\n font-size: 14px;\n }\n\n .format-options {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .format-option {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 2px solid var(--mj-border-strong);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n background: var(--mj-bg-surface-card);\n }\n\n .format-option:hover {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-sunken);\n }\n\n .format-option.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-bg-surface-card));\n }\n\n .format-option > i.fa-solid,\n .format-option > i.fas {\n font-size: 24px;\n color: var(--mj-text-muted);\n width: 32px;\n text-align: center;\n }\n\n .format-option.selected > i.fa-solid,\n .format-option.selected > i.fas {\n color: var(--mj-brand-primary);\n }\n\n .format-details {\n flex: 1;\n }\n\n .format-name {\n font-weight: 500;\n font-size: 14px;\n margin-bottom: 2px;\n }\n\n .format-description {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .check-icon {\n font-size: 20px;\n color: var(--mj-status-success);\n }\n\n .option-checkboxes {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .checkbox-label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n cursor: pointer;\n padding: 8px;\n border-radius: 4px;\n transition: background 0.2s;\n }\n\n .checkbox-label:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .checkbox-label input[type=\"checkbox\"] {\n margin-right: 8px;\n cursor: pointer;\n }\n\n .checkbox-label > span {\n display: inline-flex;\n align-items: center;\n font-size: 14px;\n font-weight: 500;\n }\n\n .checkbox-label input[type=\"checkbox\"]:disabled {\n cursor: not-allowed;\n }\n\n .theme-mode-select {\n margin-left: 8px;\n padding: 2px 6px;\n font-size: 13px;\n }\n\n .checkbox-label small {\n margin-left: 28px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .format-specific-options {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n .subsection-title {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .error-message {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--mj-status-error);\n font-size: 13px;\n margin-top: 15px;\n padding: 10px 12px;\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-left: 3px solid var(--mj-status-error);\n border-radius: 4px;\n }\n\n .loading-indicator {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 15px;\n padding: 12px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n color: var(--mj-text-muted);\n }\n\n mj-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 15px 20px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n mj-dialog-actions button i {\n margin-right: 6px;\n }\n `]\n})\nexport class ExportModalComponent {\n private _isVisible = false;\n @Input()\n set IsVisible(value: boolean) {\n const opening = value && !this._isVisible;\n this._isVisible = value;\n if (opening) {\n // Fresh open: \"Include branding\" defaults ON only when the host explicitly\n // configured export branding — plain MJ Explorer keeps today's unthemed file.\n // NOTE this reads `branding`, so a host binding both in one change-detection\n // pass must bind [branding] FIRST (Angular sets inputs in template order).\n // chat-area's template does; a host mounting with isVisible already true and\n // branding bound after would get the checkbox defaulted off.\n this.ExportOptions.includeTheme = !!this.Branding;\n }\n }\n get IsVisible(): boolean {\n return this._isVisible;\n }\n\n /** @deprecated Use {@link IsVisible}. */\n get isVisible(): boolean {\n return this.IsVisible;\n }\n /** @deprecated Use {@link IsVisible}. */\n @Input() set isVisible(value: boolean) {\n this.IsVisible = value;\n }\n\n @Input() Conversation?: MJConversationEntity;\n\n /** @deprecated Use {@link Conversation}. */\n @Input() set conversation(value: MJConversationEntity | undefined) {\n this.Conversation = value;\n }\n /** @deprecated Use {@link Conversation}. */\n get conversation(): MJConversationEntity | undefined {\n return this.Conversation;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n /**\n * Host-supplied export branding (theme tokens / logo / title). When set, the\n * HTML format's \"Include branding\" checkbox defaults on and the branding is\n * passed to {@link ExportService} on export. See `ExportBranding`.\n */\n @Input() Branding: ExportBranding | null = null;\n\n /** @deprecated Use {@link Branding}. */\n @Input() set branding(value: ExportBranding | null) {\n this.Branding = value;\n }\n /** @deprecated Use {@link Branding}. */\n get branding(): ExportBranding | null {\n return this.Branding;\n }\n @Output() Cancelled = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Cancelled}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (cancelled) keeps working. Must stay AFTER Cancelled: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() cancelled = this.Cancelled;\n @Output() Exported = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Exported}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (exported) keeps working. Must stay AFTER Exported: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() exported = this.Exported;\n\n SelectedFormat: ExportFormat | null = 'markdown';\n\n /** @deprecated Use {@link SelectedFormat}. */\n get selectedFormat(): ExportFormat | null {\n return this.SelectedFormat;\n }\n /** @deprecated Use {@link SelectedFormat}. */\n set selectedFormat(value: ExportFormat | null) {\n this.SelectedFormat = value;\n }\n IsExporting = false;\n\n /** @deprecated Use {@link IsExporting}. */\n get isExporting() {\n return this.IsExporting;\n }\n /** @deprecated Use {@link IsExporting}. */\n set isExporting(value) {\n this.IsExporting = value;\n }\n ErrorMessage = '';\n\n /** @deprecated Use {@link ErrorMessage}. */\n get errorMessage() {\n return this.ErrorMessage;\n }\n /** @deprecated Use {@link ErrorMessage}. */\n set errorMessage(value) {\n this.ErrorMessage = value;\n }\n\n ExportOptions: ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: false,\n themeMode: 'light'\n };\n\n /** @deprecated Use {@link ExportOptions}. */\n get exportOptions(): ExportOptions {\n return this.ExportOptions;\n }\n /** @deprecated Use {@link ExportOptions}. */\n set exportOptions(value: ExportOptions) {\n this.ExportOptions = value;\n }\n\n /** Format-aware hint under the \"Include branding\" checkbox. */\n get BrandingHint(): string {\n if (this.SelectedFormat === 'html') {\n if (!this.ExportOptions.includeCSS) {\n return 'Requires \"Include CSS styling\"';\n }\n return `Embed the app's theme colors${this.Branding?.logoUrl ? ', logo,' : ''} and attribution line`;\n }\n const logo = this.Branding?.logoUrl && this.SelectedFormat === 'markdown' ? ', logo,' : '';\n return `Add the title${logo} and attribution line`;\n }\n\n /** @deprecated Use {@link BrandingHint}. */\n get brandingHint(): string {\n return this.BrandingHint;\n }\n\n /**\n * The options actually handed to the service. `includeTheme` is the user's INTENT;\n * this resolves it against the selected format:\n *\n * - HTML with the stylesheet off cannot carry branding (a full-size unstyled logo and\n * an unstyled footer would leak), so it drops.\n * - `includeCSS` is an HTML-only concern and must NOT decide anything for\n * markdown / text / JSON — resolving here rather than mutating `includeTheme` is\n * what keeps an HTML-format toggle from silently following the user into another\n * format.\n */\n private resolveExportOptions(): ExportOptions {\n const unstyledHtml = this.SelectedFormat === 'html' && !this.ExportOptions.includeCSS;\n const brandingOn = !!this.ExportOptions.includeTheme && !unstyledHtml;\n return {\n ...this.ExportOptions,\n includeTheme: brandingOn,\n branding: brandingOn ? (this.Branding ?? undefined) : undefined\n };\n }\n\n get ExportTitle(): string {\n return `Export: ${this.Conversation?.Name || 'Conversation'}`;\n }\n\n /** @deprecated Use {@link ExportTitle}. */\n get exportTitle(): string {\n return this.ExportTitle;\n }\n\n get CanExport(): boolean {\n return !this.IsExporting &&\n !!this.SelectedFormat &&\n (this.ExportOptions.includeMessages === true);\n }\n\n /** @deprecated Use {@link CanExport}. */\n get canExport(): boolean {\n return this.CanExport;\n }\n\n Formats = [\n {\n value: 'markdown' as ExportFormat,\n name: 'Markdown',\n description: 'Formatted text with markdown syntax',\n icon: 'fa-solid fa-file-alt'\n },\n {\n value: 'json' as ExportFormat,\n name: 'JSON',\n description: 'Structured data format',\n icon: 'fa-solid fa-code'\n },\n {\n value: 'html' as ExportFormat,\n name: 'HTML',\n description: 'Web page format',\n icon: 'fa-solid fa-file-code'\n },\n {\n value: 'text' as ExportFormat,\n name: 'Plain Text',\n description: 'Simple text file',\n icon: 'fa-solid fa-file'\n }\n ];\n\n /** @deprecated Use {@link Formats}. */\n get formats() {\n return this.Formats;\n }\n /** @deprecated Use {@link Formats}. */\n set formats(value) {\n this.Formats = value;\n }\n\n constructor(\n private exportService: ExportService,\n private dialogService: DialogService,\n private toastService: ToastService\n ) {}\n\n SelectFormat(format: ExportFormat): void {\n if (!this.IsExporting) {\n this.SelectedFormat = format;\n }\n }\n\n /** @deprecated Use {@link SelectFormat}. */\n selectFormat(format: ExportFormat): void {\n return this.SelectFormat(format);\n }\n\n async OnExport(): Promise<void> {\n if (!this.CanExport || !this.Conversation) {\n return;\n }\n\n if (!this.ExportOptions.includeMessages) {\n this.ErrorMessage = 'At least \"Include messages\" must be selected';\n return;\n }\n\n this.IsExporting = true;\n this.ErrorMessage = '';\n\n try {\n await this.exportService.exportConversation(\n this.Conversation.ID,\n this.SelectedFormat!,\n this.CurrentUser,\n this.resolveExportOptions()\n );\n\n this.toastService.success('Conversation exported successfully');\n this.Exported.emit();\n this.resetForm();\n } catch (error) {\n console.error('Error exporting conversation:', error);\n this.ErrorMessage = error instanceof Error ? error.message : 'Failed to export conversation';\n this.toastService.error(this.ErrorMessage);\n } finally {\n this.IsExporting = false;\n }\n }\n\n /** @deprecated Use {@link OnExport}. */\n async onExport(): Promise<void> {\n return this.OnExport();\n }\n\n OnCancel(): void {\n this.Cancelled.emit();\n this.resetForm();\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n private resetForm(): void {\n this.SelectedFormat = 'markdown';\n this.ErrorMessage = '';\n this.ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: !!this.Branding,\n themeMode: 'light'\n };\n this.IsVisible = false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"export-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal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YACnB,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ;YAC7B,SAAS,EAAE,OAAO;SACnB,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;8GA5TU,oBAAoB;6DAApB,oBAAoB;YAzU7B,8FAAiB;;YAAjB,wCAyIC;;;iFAgMQ,oBAAoB;cA7UhC,SAAS;6BACI,KAAK,YACP,iBAAiB,YACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2IP;;kBAiMF,KAAK;;kBAuBL,KAAK;;kBAIL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAYL,KAAK;;kBAGL,KAAK;;kBAYL,KAAK;;kBACL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kFAzFI,oBAAoB","sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ConversationEngine, MJConversationEntity, type ConversationScope } from '@memberjunction/core-entities';\nimport { UserInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { ExportService, ExportFormat, ExportOptions, ExportBranding } from '../../services/export.service';\nimport { DialogService } from '../../services/dialog.service';\nimport { ToastService } from '../../services/toast.service';\n\n@Component({\n standalone: false,\n selector: 'mj-export-modal',\n template: `\n @if (isVisible) {\n <mj-dialog\n [Title]=\"exportTitle\"\n [Width]=\"600\"\n [Height]=\"600\"\n [Visible]=\"true\"\n (Close)=\"onCancel()\">\n <div class=\"export-modal-content\">\n <section class=\"format-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-file-export\"></i>\n Export Format\n </h3>\n <p class=\"section-description\">\n Choose a format to export this conversation:\n </p>\n <div class=\"format-options\">\n @for (format of formats; track format.value) {\n <div\n class=\"format-option\"\n [class.selected]=\"selectedFormat === format.value\"\n (click)=\"selectFormat(format.value)\">\n <i [class]=\"format.icon\"></i>\n <div class=\"format-details\">\n <div class=\"format-name\">{{ format.name }}</div>\n <div class=\"format-description\">{{ format.description }}</div>\n </div>\n @if (selectedFormat === format.value) {\n <i class=\"fa-solid fa-check-circle check-icon\"></i>\n }\n </div>\n }\n </div>\n </section>\n <section class=\"options-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-sliders\"></i>\n Export Options\n </h3>\n <div class=\"option-checkboxes\">\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMessages\"\n [disabled]=\"isExporting\">\n <span>Include messages</span>\n <small>Export all conversation messages</small>\n </label>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMetadata\"\n [disabled]=\"isExporting\">\n <span>Include metadata</span>\n <small>Add creation date, IDs, and other metadata</small>\n </label>\n <!-- Branding applies to EVERY format (HTML gets theme colors + logo +\n footer; markdown/text/JSON get the title and attribution), so it\n belongs here rather than under HTML Options. Shown for HTML even with\n no host branding, because it still snapshots the app's theme. -->\n @if (selectedFormat === 'html' || branding) {\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeTheme\"\n [disabled]=\"isExporting || (selectedFormat === 'html' && !exportOptions.includeCSS)\">\n <span>Include branding</span>\n <small>{{ brandingHint }}</small>\n </label>\n }\n </div>\n @if (selectedFormat === 'json') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">JSON Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.prettyPrint\"\n [disabled]=\"isExporting\">\n <span>Pretty print</span>\n <small>Format JSON with indentation</small>\n </label>\n </div>\n }\n @if (selectedFormat === 'html') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">HTML Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeCSS\"\n [disabled]=\"isExporting\">\n <span>Include CSS styling</span>\n <small>Embed styles for better presentation</small>\n </label>\n <!-- Which palette gets baked in — NOT the mode the app happens to be in.\n Exporting from a dark session would otherwise put dark text on the\n export's white page. -->\n @if (exportOptions.includeTheme && exportOptions.includeCSS) {\n <label class=\"checkbox-label\">\n <span>Theme</span>\n <select\n class=\"mj-input theme-mode-select\"\n [(ngModel)]=\"exportOptions.themeMode\"\n [disabled]=\"isExporting\">\n <option value=\"light\">Light</option>\n <option value=\"dark\">Dark</option>\n </select>\n <small>Palette baked into the exported file</small>\n </label>\n }\n </div>\n }\n </section>\n @if (errorMessage) {\n <div class=\"error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n {{ errorMessage }}\n </div>\n }\n @if (isExporting) {\n <div class=\"loading-indicator\">\n <mj-loading text=\"Exporting conversation...\" size=\"small\"></mj-loading>\n </div>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton [disabled]=\"isExporting\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button mjButton variant=\"primary\" [disabled]=\"!canExport\" (click)=\"onExport()\">\n <i class=\"fa-solid fa-download\"></i>\n Export\n </button>\n </mj-dialog-actions>\n </mj-dialog>\n }\n `,\n styles: [`\n .export-modal-content {\n padding: 20px;\n max-height: calc(600px - 120px);\n overflow-y: auto;\n }\n\n section {\n margin-bottom: 24px;\n }\n\n .section-title {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0 0 8px 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .section-title i {\n color: var(--mj-brand-primary);\n }\n\n .section-description {\n margin: 0 0 16px 0;\n color: var(--mj-text-muted);\n font-size: 14px;\n }\n\n .format-options {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .format-option {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 2px solid var(--mj-border-strong);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n background: var(--mj-bg-surface-card);\n }\n\n .format-option:hover {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-sunken);\n }\n\n .format-option.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-bg-surface-card));\n }\n\n .format-option > i.fa-solid,\n .format-option > i.fas {\n font-size: 24px;\n color: var(--mj-text-muted);\n width: 32px;\n text-align: center;\n }\n\n .format-option.selected > i.fa-solid,\n .format-option.selected > i.fas {\n color: var(--mj-brand-primary);\n }\n\n .format-details {\n flex: 1;\n }\n\n .format-name {\n font-weight: 500;\n font-size: 14px;\n margin-bottom: 2px;\n }\n\n .format-description {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .check-icon {\n font-size: 20px;\n color: var(--mj-status-success);\n }\n\n .option-checkboxes {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .checkbox-label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n cursor: pointer;\n padding: 8px;\n border-radius: 4px;\n transition: background 0.2s;\n }\n\n .checkbox-label:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .checkbox-label input[type=\"checkbox\"] {\n margin-right: 8px;\n cursor: pointer;\n }\n\n .checkbox-label > span {\n display: inline-flex;\n align-items: center;\n font-size: 14px;\n font-weight: 500;\n }\n\n .checkbox-label input[type=\"checkbox\"]:disabled {\n cursor: not-allowed;\n }\n\n .theme-mode-select {\n margin-left: 8px;\n padding: 2px 6px;\n font-size: 13px;\n }\n\n .checkbox-label small {\n margin-left: 28px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .format-specific-options {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n .subsection-title {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .error-message {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--mj-status-error);\n font-size: 13px;\n margin-top: 15px;\n padding: 10px 12px;\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-left: 3px solid var(--mj-status-error);\n border-radius: 4px;\n }\n\n .loading-indicator {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 15px;\n padding: 12px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n color: var(--mj-text-muted);\n }\n\n mj-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 15px 20px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n mj-dialog-actions button i {\n margin-right: 6px;\n }\n `]\n})\nexport class ExportModalComponent {\n private _isVisible = false;\n @Input()\n set IsVisible(value: boolean) {\n const opening = value && !this._isVisible;\n this._isVisible = value;\n if (opening) {\n // Fresh open: \"Include branding\" defaults ON only when the host explicitly\n // configured export branding — plain MJ Explorer keeps today's unthemed file.\n // NOTE this reads `branding`, so a host binding both in one change-detection\n // pass must bind [branding] FIRST (Angular sets inputs in template order).\n // chat-area's template does; a host mounting with isVisible already true and\n // branding bound after would get the checkbox defaulted off.\n this.ExportOptions.includeTheme = !!this.Branding;\n }\n }\n get IsVisible(): boolean {\n return this._isVisible;\n }\n\n /** @deprecated Use {@link IsVisible}. */\n get isVisible(): boolean {\n return this.IsVisible;\n }\n /** @deprecated Use {@link IsVisible}. */\n @Input() set isVisible(value: boolean) {\n this.IsVisible = value;\n }\n\n @Input() Conversation?: MJConversationEntity;\n\n /** @deprecated Use {@link Conversation}. */\n @Input() set conversation(value: MJConversationEntity | undefined) {\n this.Conversation = value;\n }\n /** @deprecated Use {@link Conversation}. */\n get conversation(): MJConversationEntity | undefined {\n return this.Conversation;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n /**\n * Host-supplied export branding (theme tokens / logo / title). When set, the\n * HTML format's \"Include branding\" checkbox defaults on and the branding is\n * passed to {@link ExportService} on export. See `ExportBranding`.\n */\n @Input() Branding: ExportBranding | null = null;\n\n /** @deprecated Use {@link Branding}. */\n @Input() set branding(value: ExportBranding | null) {\n this.Branding = value;\n }\n /** @deprecated Use {@link Branding}. */\n get branding(): ExportBranding | null {\n return this.Branding;\n }\n\n /**\n * The scope to export: the view the person has open. Null, or a scope of another conversation,\n * exports Main.\n */\n @Input() Scope: ConversationScope | null = null;\n @Output() Cancelled = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Cancelled}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (cancelled) keeps working. Must stay AFTER Cancelled: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() cancelled = this.Cancelled;\n @Output() Exported = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Exported}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (exported) keeps working. Must stay AFTER Exported: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() exported = this.Exported;\n\n SelectedFormat: ExportFormat | null = 'markdown';\n\n /** @deprecated Use {@link SelectedFormat}. */\n get selectedFormat(): ExportFormat | null {\n return this.SelectedFormat;\n }\n /** @deprecated Use {@link SelectedFormat}. */\n set selectedFormat(value: ExportFormat | null) {\n this.SelectedFormat = value;\n }\n IsExporting = false;\n\n /** @deprecated Use {@link IsExporting}. */\n get isExporting() {\n return this.IsExporting;\n }\n /** @deprecated Use {@link IsExporting}. */\n set isExporting(value) {\n this.IsExporting = value;\n }\n ErrorMessage = '';\n\n /** @deprecated Use {@link ErrorMessage}. */\n get errorMessage() {\n return this.ErrorMessage;\n }\n /** @deprecated Use {@link ErrorMessage}. */\n set errorMessage(value) {\n this.ErrorMessage = value;\n }\n\n ExportOptions: ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: false,\n themeMode: 'light'\n };\n\n /** @deprecated Use {@link ExportOptions}. */\n get exportOptions(): ExportOptions {\n return this.ExportOptions;\n }\n /** @deprecated Use {@link ExportOptions}. */\n set exportOptions(value: ExportOptions) {\n this.ExportOptions = value;\n }\n\n /** Format-aware hint under the \"Include branding\" checkbox. */\n get BrandingHint(): string {\n if (this.SelectedFormat === 'html') {\n if (!this.ExportOptions.includeCSS) {\n return 'Requires \"Include CSS styling\"';\n }\n return `Embed the app's theme colors${this.Branding?.logoUrl ? ', logo,' : ''} and attribution line`;\n }\n const logo = this.Branding?.logoUrl && this.SelectedFormat === 'markdown' ? ', logo,' : '';\n return `Add the title${logo} and attribution line`;\n }\n\n /** @deprecated Use {@link BrandingHint}. */\n get brandingHint(): string {\n return this.BrandingHint;\n }\n\n /**\n * The options actually handed to the service. `includeTheme` is the user's INTENT;\n * this resolves it against the selected format:\n *\n * - HTML with the stylesheet off cannot carry branding (a full-size unstyled logo and\n * an unstyled footer would leak), so it drops.\n * - `includeCSS` is an HTML-only concern and must NOT decide anything for\n * markdown / text / JSON — resolving here rather than mutating `includeTheme` is\n * what keeps an HTML-format toggle from silently following the user into another\n * format.\n */\n private resolveExportOptions(): ExportOptions {\n const unstyledHtml = this.SelectedFormat === 'html' && !this.ExportOptions.includeCSS;\n const brandingOn = !!this.ExportOptions.includeTheme && !unstyledHtml;\n return {\n ...this.ExportOptions,\n includeTheme: brandingOn,\n branding: brandingOn ? (this.Branding ?? undefined) : undefined\n };\n }\n\n get ExportTitle(): string {\n return `Export: ${this.Conversation?.Name || 'Conversation'}`;\n }\n\n /** @deprecated Use {@link ExportTitle}. */\n get exportTitle(): string {\n return this.ExportTitle;\n }\n\n get CanExport(): boolean {\n return !this.IsExporting &&\n !!this.SelectedFormat &&\n (this.ExportOptions.includeMessages === true);\n }\n\n /** @deprecated Use {@link CanExport}. */\n get canExport(): boolean {\n return this.CanExport;\n }\n\n Formats = [\n {\n value: 'markdown' as ExportFormat,\n name: 'Markdown',\n description: 'Formatted text with markdown syntax',\n icon: 'fa-solid fa-file-alt'\n },\n {\n value: 'json' as ExportFormat,\n name: 'JSON',\n description: 'Structured data format',\n icon: 'fa-solid fa-code'\n },\n {\n value: 'html' as ExportFormat,\n name: 'HTML',\n description: 'Web page format',\n icon: 'fa-solid fa-file-code'\n },\n {\n value: 'text' as ExportFormat,\n name: 'Plain Text',\n description: 'Simple text file',\n icon: 'fa-solid fa-file'\n }\n ];\n\n /** @deprecated Use {@link Formats}. */\n get formats() {\n return this.Formats;\n }\n /** @deprecated Use {@link Formats}. */\n set formats(value) {\n this.Formats = value;\n }\n\n constructor(\n private exportService: ExportService,\n private dialogService: DialogService,\n private toastService: ToastService\n ) {}\n\n SelectFormat(format: ExportFormat): void {\n if (!this.IsExporting) {\n this.SelectedFormat = format;\n }\n }\n\n /** @deprecated Use {@link SelectFormat}. */\n selectFormat(format: ExportFormat): void {\n return this.SelectFormat(format);\n }\n\n async OnExport(): Promise<void> {\n if (!this.CanExport || !this.Conversation) {\n return;\n }\n\n if (!this.ExportOptions.includeMessages) {\n this.ErrorMessage = 'At least \"Include messages\" must be selected';\n return;\n }\n\n this.IsExporting = true;\n this.ErrorMessage = '';\n const conversationId = this.Conversation.ID;\n\n try {\n const scope = this.Scope && UUIDsEqual(this.Scope.ConversationID, conversationId)\n ? this.Scope\n : ConversationEngine.TrunkScope(conversationId);\n await this.exportService.ExportConversation(\n conversationId,\n scope,\n this.SelectedFormat!,\n this.CurrentUser,\n this.resolveExportOptions()\n );\n\n this.toastService.success('Conversation exported successfully');\n this.Exported.emit();\n this.resetForm();\n } catch (error) {\n console.error('Error exporting conversation:', error);\n this.ErrorMessage = error instanceof Error ? error.message : 'Failed to export conversation';\n this.toastService.error(this.ErrorMessage);\n } finally {\n this.IsExporting = false;\n }\n }\n\n /** @deprecated Use {@link OnExport}. */\n async onExport(): Promise<void> {\n return this.OnExport();\n }\n\n OnCancel(): void {\n this.Cancelled.emit();\n this.resetForm();\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n private resetForm(): void {\n this.SelectedFormat = 'markdown';\n this.ErrorMessage = '';\n this.ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: !!this.Branding,\n themeMode: 'light'\n };\n this.IsVisible = false;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-message-rating.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/conversation-message-rating.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAqC,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAkB,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;AAiB9D;;;;;;;;GAQG;AACH,
|
|
1
|
+
{"version":3,"file":"conversation-message-rating.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/conversation-message-rating.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAqC,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAkB,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;AAiB9D;;;;;;;;GAQG;AACH,qBAuGa,kCAAmC,SAAQ,oBAAqB,YAAW,MAAM;IAsH1F,OAAO,CAAC,GAAG;IACX,O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