@memberjunction/ng-conversations 6.3.0-edge.0 → 6.3.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -22
- package/dist/assets/edge-ai.worker.js +35168 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts +186 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts.map +1 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.js +2202 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +39 -6
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +773 -204
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +19 -18
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +6 -4
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +35 -17
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +108 -106
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +15 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +43 -4
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +20 -2
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.js +378 -62
- package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +94 -18
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +732 -439
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +19 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +184 -89
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- 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 +13 -2
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/library/library-create-dialog.component.d.ts +136 -0
- package/dist/lib/components/library/library-create-dialog.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-create-dialog.component.js +1620 -0
- package/dist/lib/components/library/library-create-dialog.component.js.map +1 -0
- package/dist/lib/components/library/library-full-view.component.d.ts +10 -4
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +216 -40
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/library/library-remote-drive-pane.component.d.ts +97 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.js +1229 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.js.map +1 -0
- package/dist/lib/components/library/library-workspace.component.d.ts +293 -0
- package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-workspace.component.js +5121 -0
- package/dist/lib/components/library/library-workspace.component.js.map +1 -0
- package/dist/lib/components/library/library.models.d.ts +192 -0
- package/dist/lib/components/library/library.models.d.ts.map +1 -0
- package/dist/lib/components/library/library.models.js +2 -0
- package/dist/lib/components/library/library.models.js.map +1 -0
- package/dist/lib/components/message/agent-handoff-card.component.js +1 -1
- package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +5 -0
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +72 -16
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +33 -14
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +142 -75
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +51 -4
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +640 -399
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +15 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +75 -3
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +9 -9
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +94 -6
- package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +249 -59
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +6 -0
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +81 -61
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +5 -0
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +11 -4
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts +55 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +974 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts +66 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js +253 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts +80 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js +49 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts +54 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js +386 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +28 -1
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js +53 -1
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +23 -7
- package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +15 -2
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts +32 -11
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +186 -23
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +9 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js +33 -10
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js +3 -3
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.js +3 -3
- package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +6 -4
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +82 -33
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +521 -191
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js +90 -5
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.js +2 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +11 -4
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.js +24 -5
- package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +7 -9
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +25 -15
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +30 -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 +150 -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 +101 -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 +503 -55
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts +48 -5
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js +249 -53
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +10 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +25 -3
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +181 -127
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +14 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +50 -11
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/sidebar/my-agents-section.component.d.ts +78 -0
- package/dist/lib/components/sidebar/my-agents-section.component.d.ts.map +1 -0
- package/dist/lib/components/sidebar/my-agents-section.component.js +450 -0
- package/dist/lib/components/sidebar/my-agents-section.component.js.map +1 -0
- package/dist/lib/components/task/tasks-full-view.component.d.ts +31 -8
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +701 -497
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +15 -2
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +1 -0
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js +13 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +78 -71
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +68 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +7 -1
- 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.map +1 -1
- package/dist/lib/services/agent-state.service.js +14 -3
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +14 -3
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +43 -11
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +31 -21
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +84 -35
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-tasks-filter.d.ts +59 -2
- package/dist/lib/services/conversation-tasks-filter.d.ts.map +1 -1
- package/dist/lib/services/conversation-tasks-filter.js +222 -18
- package/dist/lib/services/conversation-tasks-filter.js.map +1 -1
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts +85 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js +257 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts +85 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.js +10 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts +90 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.js +386 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.d.ts +13 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.js +201 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.js.map +1 -0
- package/dist/lib/services/export.service.d.ts +64 -0
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +185 -6
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/library-creation.service.d.ts +304 -0
- package/dist/lib/services/library-creation.service.d.ts.map +1 -0
- package/dist/lib/services/library-creation.service.js +1244 -0
- package/dist/lib/services/library-creation.service.js.map +1 -0
- package/dist/lib/services/realtime-pairing.d.ts +3 -3
- package/dist/lib/services/realtime-pairing.js +4 -4
- package/dist/lib/services/realtime-pairing.js.map +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts +14 -0
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js +46 -4
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +2 -1
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +19 -2
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +99 -36
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/utils/agent-handoff-map.js +1 -1
- package/dist/lib/utils/agent-handoff-map.js.map +1 -1
- package/dist/lib/utils/agent-turn-routing.js +1 -1
- package/dist/lib/utils/agent-turn-routing.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +5 -2
- package/dist/lib/utils/decision-routing.d.ts.map +1 -1
- package/dist/lib/utils/decision-routing.js +9 -4
- package/dist/lib/utils/decision-routing.js.map +1 -1
- package/dist/public-api.d.ts +15 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +17 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +42 -37
|
@@ -0,0 +1,1620 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, EventEmitter, Input, Output, inject, } from '@angular/core';
|
|
2
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
3
|
+
import { RunView } from '@memberjunction/core';
|
|
4
|
+
import { ArtifactMetadataEngine, UserInfoEngine, } from '@memberjunction/core-entities';
|
|
5
|
+
import { EscapeSQLString } from '@memberjunction/global';
|
|
6
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
7
|
+
import { LibraryCreationService, RemoteDriveFileExistsError, } from '../../services/library-creation.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@angular/forms";
|
|
10
|
+
import * as i2 from "@memberjunction/ng-ui-components";
|
|
11
|
+
const _forTrack0 = ($index, $item) => $item.Id;
|
|
12
|
+
const _forTrack1 = ($index, $item) => $item.Kind;
|
|
13
|
+
const _forTrack2 = ($index, $item) => $item.Label;
|
|
14
|
+
const _forTrack3 = ($index, $item) => $item.ID;
|
|
15
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_19_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
17
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
18
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Conditional_19_For_2_Template_button_click_0_listener() { const tile_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SelectStarterKind(tile_r5)); });
|
|
19
|
+
i0.ɵɵelementStart(1, "div", 25);
|
|
20
|
+
i0.ɵɵelement(2, "i");
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
22
|
+
i0.ɵɵelementStart(3, "div", 26)(4, "div", 27);
|
|
23
|
+
i0.ɵɵtext(5);
|
|
24
|
+
i0.ɵɵelementEnd();
|
|
25
|
+
i0.ɵɵelementStart(6, "div", 28);
|
|
26
|
+
i0.ɵɵtext(7);
|
|
27
|
+
i0.ɵɵelementEnd()()();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const tile_r5 = ctx.$implicit;
|
|
30
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
31
|
+
i0.ɵɵclassProp("selected", ctx_r1.SelectedKind === tile_r5.Kind);
|
|
32
|
+
i0.ɵɵattribute("data-testid", "dialog-starter-" + tile_r5.Kind);
|
|
33
|
+
i0.ɵɵadvance();
|
|
34
|
+
i0.ɵɵclassMap(tile_r5.AccentClass);
|
|
35
|
+
i0.ɵɵadvance();
|
|
36
|
+
i0.ɵɵclassMap(tile_r5.Icon);
|
|
37
|
+
i0.ɵɵadvance(3);
|
|
38
|
+
i0.ɵɵtextInterpolate(tile_r5.Title);
|
|
39
|
+
i0.ɵɵadvance(2);
|
|
40
|
+
i0.ɵɵtextInterpolate(tile_r5.Subtitle);
|
|
41
|
+
} }
|
|
42
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
44
|
+
i0.ɵɵelementStart(0, "div", 18);
|
|
45
|
+
i0.ɵɵrepeaterCreate(1, LibraryCreateDialogComponent_Conditional_0_Conditional_19_For_2_Template, 8, 9, "button", 19, _forTrack1);
|
|
46
|
+
i0.ɵɵelementEnd();
|
|
47
|
+
i0.ɵɵelementStart(3, "div", 10)(4, "label", 20);
|
|
48
|
+
i0.ɵɵtext(5, "Title");
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
i0.ɵɵelementStart(6, "input", 21);
|
|
51
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_19_Template_input_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Title, $event) || (ctx_r1.Title = $event); return i0.ɵɵresetView($event); });
|
|
52
|
+
i0.ɵɵlistener("keydown.enter", function LibraryCreateDialogComponent_Conditional_0_Conditional_19_Template_input_keydown_enter_6_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Submit()); });
|
|
53
|
+
i0.ɵɵelementEnd()();
|
|
54
|
+
i0.ɵɵelementStart(7, "div", 10)(8, "label", 22);
|
|
55
|
+
i0.ɵɵtext(9, "Description (optional)");
|
|
56
|
+
i0.ɵɵelementEnd();
|
|
57
|
+
i0.ɵɵelementStart(10, "input", 23);
|
|
58
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_19_Template_input_ngModelChange_10_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Description, $event) || (ctx_r1.Description = $event); return i0.ɵɵresetView($event); });
|
|
59
|
+
i0.ɵɵelementEnd()();
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
62
|
+
i0.ɵɵadvance();
|
|
63
|
+
i0.ɵɵrepeater(ctx_r1.StarterTiles);
|
|
64
|
+
i0.ɵɵadvance(5);
|
|
65
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Title);
|
|
66
|
+
i0.ɵɵadvance(4);
|
|
67
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Description);
|
|
68
|
+
} }
|
|
69
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
+
i0.ɵɵelementStart(0, "div", 35);
|
|
71
|
+
i0.ɵɵtext(1);
|
|
72
|
+
i0.ɵɵelementEnd();
|
|
73
|
+
i0.ɵɵelementStart(2, "div", 36);
|
|
74
|
+
i0.ɵɵtext(3);
|
|
75
|
+
i0.ɵɵelementEnd();
|
|
76
|
+
} if (rf & 2) {
|
|
77
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
78
|
+
i0.ɵɵadvance();
|
|
79
|
+
i0.ɵɵtextInterpolate(ctx_r1.SelectedFile.name);
|
|
80
|
+
i0.ɵɵadvance(2);
|
|
81
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.FormatSize(ctx_r1.SelectedFile.size), " \u00B7 Click or drop another file to replace ");
|
|
82
|
+
} }
|
|
83
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
84
|
+
i0.ɵɵelementStart(0, "div", 35);
|
|
85
|
+
i0.ɵɵtext(1, "Drop a file here or click to browse");
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
i0.ɵɵelementStart(2, "div", 36);
|
|
88
|
+
i0.ɵɵtext(3, " Supports .docx, .xlsx, .csv, .md, .pdf, images, audio/video, SQL, and JSON ");
|
|
89
|
+
i0.ɵɵelementEnd();
|
|
90
|
+
} }
|
|
91
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
92
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
93
|
+
i0.ɵɵelementStart(0, "div", 32)(1, "label", 37)(2, "input", 38);
|
|
94
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_5_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.ConvertToEditable, $event) || (ctx_r1.ConvertToEditable = $event); return i0.ɵɵresetView($event); });
|
|
95
|
+
i0.ɵɵelementEnd();
|
|
96
|
+
i0.ɵɵelementStart(3, "div")(4, "div", 39);
|
|
97
|
+
i0.ɵɵtext(5, " Convert to collaborative MJ Document / Spreadsheet (Recommended) ");
|
|
98
|
+
i0.ɵɵelementEnd();
|
|
99
|
+
i0.ɵɵelementStart(6, "div", 40);
|
|
100
|
+
i0.ɵɵtext(7, " Opens in live Yjs Studio with Suggesting mode, formulas, and visual version diffs. ");
|
|
101
|
+
i0.ɵɵelementEnd()()();
|
|
102
|
+
i0.ɵɵelementStart(8, "label", 37)(9, "input", 38);
|
|
103
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_5_Template_input_ngModelChange_9_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.ConvertToEditable, $event) || (ctx_r1.ConvertToEditable = $event); return i0.ɵɵresetView($event); });
|
|
104
|
+
i0.ɵɵelementEnd();
|
|
105
|
+
i0.ɵɵelementStart(10, "div")(11, "div", 39);
|
|
106
|
+
i0.ɵɵtext(12, "Store original binary file in Library");
|
|
107
|
+
i0.ɵɵelementEnd();
|
|
108
|
+
i0.ɵɵelementStart(13, "div", 40);
|
|
109
|
+
i0.ɵɵtext(14, " Preserves exact original bytes in MJ Storage as a read-only file artifact. ");
|
|
110
|
+
i0.ɵɵelementEnd()()()();
|
|
111
|
+
} if (rf & 2) {
|
|
112
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
113
|
+
i0.ɵɵadvance(2);
|
|
114
|
+
i0.ɵɵproperty("value", true);
|
|
115
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.ConvertToEditable);
|
|
116
|
+
i0.ɵɵadvance(7);
|
|
117
|
+
i0.ɵɵproperty("value", false);
|
|
118
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.ConvertToEditable);
|
|
119
|
+
} }
|
|
120
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
121
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
122
|
+
i0.ɵɵelementStart(0, "label", 29);
|
|
123
|
+
i0.ɵɵlistener("dragover", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template_label_dragover_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnDragOver($event)); })("dragleave", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template_label_dragleave_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.IsDragOver = false); })("drop", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template_label_drop_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnDrop($event)); });
|
|
124
|
+
i0.ɵɵelementStart(1, "input", 30);
|
|
125
|
+
i0.ɵɵlistener("change", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnFileSelected($event)); });
|
|
126
|
+
i0.ɵɵelementEnd();
|
|
127
|
+
i0.ɵɵelement(2, "i", 31);
|
|
128
|
+
i0.ɵɵconditionalCreate(3, LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_3_Template, 4, 2)(4, LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_4_Template, 4, 0);
|
|
129
|
+
i0.ɵɵelementEnd();
|
|
130
|
+
i0.ɵɵconditionalCreate(5, LibraryCreateDialogComponent_Conditional_0_Conditional_20_Conditional_5_Template, 15, 4, "div", 32);
|
|
131
|
+
i0.ɵɵelementStart(6, "div", 10)(7, "label", 33);
|
|
132
|
+
i0.ɵɵtext(8, "Display Title");
|
|
133
|
+
i0.ɵɵelementEnd();
|
|
134
|
+
i0.ɵɵelementStart(9, "input", 34);
|
|
135
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template_input_ngModelChange_9_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Title, $event) || (ctx_r1.Title = $event); return i0.ɵɵresetView($event); });
|
|
136
|
+
i0.ɵɵelementEnd()();
|
|
137
|
+
} if (rf & 2) {
|
|
138
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
139
|
+
i0.ɵɵclassProp("drag-over", ctx_r1.IsDragOver);
|
|
140
|
+
i0.ɵɵadvance(3);
|
|
141
|
+
i0.ɵɵconditional(ctx_r1.SelectedFile ? 3 : 4);
|
|
142
|
+
i0.ɵɵadvance(2);
|
|
143
|
+
i0.ɵɵconditional(ctx_r1.SelectedFile && ctx_r1.IsSelectedFileConvertible ? 5 : -1);
|
|
144
|
+
i0.ɵɵadvance(4);
|
|
145
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Title);
|
|
146
|
+
} }
|
|
147
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_21_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
148
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
149
|
+
i0.ɵɵelementStart(0, "button", 58);
|
|
150
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_For_6_Template_button_click_0_listener() { const opt_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SelectSynthesisTarget(opt_r10.Kind)); });
|
|
151
|
+
i0.ɵɵelement(1, "i");
|
|
152
|
+
i0.ɵɵelementStart(2, "span");
|
|
153
|
+
i0.ɵɵtext(3);
|
|
154
|
+
i0.ɵɵelementEnd()();
|
|
155
|
+
} if (rf & 2) {
|
|
156
|
+
const opt_r10 = ctx.$implicit;
|
|
157
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
158
|
+
i0.ɵɵclassProp("active", ctx_r1.SynthesisTargetKind === opt_r10.Kind);
|
|
159
|
+
i0.ɵɵattribute("data-testid", "synth-target-" + opt_r10.Kind);
|
|
160
|
+
i0.ɵɵadvance();
|
|
161
|
+
i0.ɵɵclassMap(opt_r10.Icon);
|
|
162
|
+
i0.ɵɵadvance(2);
|
|
163
|
+
i0.ɵɵtextInterpolate(opt_r10.Label);
|
|
164
|
+
} }
|
|
165
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
166
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
167
|
+
i0.ɵɵtext(1, "No matching artifacts in Library.");
|
|
168
|
+
i0.ɵɵelementEnd();
|
|
169
|
+
} }
|
|
170
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_19_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
171
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
172
|
+
i0.ɵɵelementStart(0, "label", 60)(1, "input", 61);
|
|
173
|
+
i0.ɵɵlistener("change", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_19_For_1_Template_input_change_1_listener() { const item_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.ToggleSourceSelection(item_r12.Id)); });
|
|
174
|
+
i0.ɵɵelementEnd();
|
|
175
|
+
i0.ɵɵelement(2, "i");
|
|
176
|
+
i0.ɵɵelementStart(3, "span", 62);
|
|
177
|
+
i0.ɵɵtext(4);
|
|
178
|
+
i0.ɵɵelementEnd();
|
|
179
|
+
i0.ɵɵelementStart(5, "span", 63);
|
|
180
|
+
i0.ɵɵtext(6);
|
|
181
|
+
i0.ɵɵelementEnd()();
|
|
182
|
+
} if (rf & 2) {
|
|
183
|
+
const item_r12 = ctx.$implicit;
|
|
184
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
185
|
+
i0.ɵɵclassProp("checked", ctx_r1.IsSourceSelected(item_r12.Id));
|
|
186
|
+
i0.ɵɵadvance();
|
|
187
|
+
i0.ɵɵproperty("checked", ctx_r1.IsSourceSelected(item_r12.Id));
|
|
188
|
+
i0.ɵɵattribute("data-testid", "synth-source-" + item_r12.Id);
|
|
189
|
+
i0.ɵɵadvance();
|
|
190
|
+
i0.ɵɵclassMap(item_r12.Icon + " synth-source-icon");
|
|
191
|
+
i0.ɵɵadvance(2);
|
|
192
|
+
i0.ɵɵtextInterpolate(item_r12.Name);
|
|
193
|
+
i0.ɵɵadvance(2);
|
|
194
|
+
i0.ɵɵtextInterpolate2("", item_r12.TypeName, " \u00B7 v", item_r12.LatestVersionNumber);
|
|
195
|
+
} }
|
|
196
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
197
|
+
i0.ɵɵrepeaterCreate(0, LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_19_For_1_Template, 7, 9, "label", 59, _forTrack0);
|
|
198
|
+
} if (rf & 2) {
|
|
199
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
200
|
+
i0.ɵɵrepeater(ctx_r1.FilteredSynthesisSources);
|
|
201
|
+
} }
|
|
202
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_21_For_30_Template(rf, ctx) { if (rf & 1) {
|
|
203
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
204
|
+
i0.ɵɵelementStart(0, "button", 64);
|
|
205
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_For_30_Template_button_click_0_listener() { const preset_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SynthesisGoal = preset_r14.Goal); });
|
|
206
|
+
i0.ɵɵtext(1);
|
|
207
|
+
i0.ɵɵelementEnd();
|
|
208
|
+
} if (rf & 2) {
|
|
209
|
+
const preset_r14 = ctx.$implicit;
|
|
210
|
+
i0.ɵɵadvance();
|
|
211
|
+
i0.ɵɵtextInterpolate1(" ", preset_r14.Label, " ");
|
|
212
|
+
} }
|
|
213
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
214
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
215
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "div", 10)(2, "label", 41);
|
|
216
|
+
i0.ɵɵtext(3, "Target Output Format");
|
|
217
|
+
i0.ɵɵelementEnd();
|
|
218
|
+
i0.ɵɵelementStart(4, "div", 42);
|
|
219
|
+
i0.ɵɵrepeaterCreate(5, LibraryCreateDialogComponent_Conditional_0_Conditional_21_For_6_Template, 4, 6, "button", 43, _forTrack1);
|
|
220
|
+
i0.ɵɵelementEnd()();
|
|
221
|
+
i0.ɵɵelementStart(7, "div", 10)(8, "div", 44)(9, "label", 41);
|
|
222
|
+
i0.ɵɵtext(10);
|
|
223
|
+
i0.ɵɵelementEnd();
|
|
224
|
+
i0.ɵɵelementStart(11, "div", 45)(12, "button", 46);
|
|
225
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectAllVisibleSources()); });
|
|
226
|
+
i0.ɵɵtext(13, " Select all ");
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
i0.ɵɵelementStart(14, "button", 46);
|
|
229
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.ClearSelectedSources()); });
|
|
230
|
+
i0.ɵɵtext(15, " Clear ");
|
|
231
|
+
i0.ɵɵelementEnd()()();
|
|
232
|
+
i0.ɵɵelementStart(16, "input", 47);
|
|
233
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template_input_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.SourceSearchQuery, $event) || (ctx_r1.SourceSearchQuery = $event); return i0.ɵɵresetView($event); });
|
|
234
|
+
i0.ɵɵelementEnd();
|
|
235
|
+
i0.ɵɵelementStart(17, "div", 48);
|
|
236
|
+
i0.ɵɵconditionalCreate(18, LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_18_Template, 2, 0, "div", 49)(19, LibraryCreateDialogComponent_Conditional_0_Conditional_21_Conditional_19_Template, 2, 0);
|
|
237
|
+
i0.ɵɵelementEnd()();
|
|
238
|
+
i0.ɵɵelementStart(20, "div", 10)(21, "label", 50);
|
|
239
|
+
i0.ɵɵtext(22, "Synthesized Artifact Title");
|
|
240
|
+
i0.ɵɵelementEnd();
|
|
241
|
+
i0.ɵɵelementStart(23, "input", 51);
|
|
242
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template_input_ngModelChange_23_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Title, $event) || (ctx_r1.Title = $event); return i0.ɵɵresetView($event); });
|
|
243
|
+
i0.ɵɵelementEnd()();
|
|
244
|
+
i0.ɵɵelementStart(24, "div", 10)(25, "div", 44)(26, "label", 52);
|
|
245
|
+
i0.ɵɵtext(27, "Synthesis Goal / Prompt");
|
|
246
|
+
i0.ɵɵelementEnd();
|
|
247
|
+
i0.ɵɵelementStart(28, "div", 53);
|
|
248
|
+
i0.ɵɵrepeaterCreate(29, LibraryCreateDialogComponent_Conditional_0_Conditional_21_For_30_Template, 2, 1, "button", 54, _forTrack2);
|
|
249
|
+
i0.ɵɵelementEnd()();
|
|
250
|
+
i0.ɵɵelementStart(31, "textarea", 55);
|
|
251
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template_textarea_ngModelChange_31_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.SynthesisGoal, $event) || (ctx_r1.SynthesisGoal = $event); return i0.ɵɵresetView($event); });
|
|
252
|
+
i0.ɵɵelementEnd()();
|
|
253
|
+
i0.ɵɵelementStart(32, "label", 56)(33, "input", 57);
|
|
254
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template_input_ngModelChange_33_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.LinkChartsAndRanges, $event) || (ctx_r1.LinkChartsAndRanges = $event); return i0.ɵɵresetView($event); });
|
|
255
|
+
i0.ɵɵelementEnd();
|
|
256
|
+
i0.ɵɵelementStart(34, "span");
|
|
257
|
+
i0.ɵɵtext(35, "Link live charts & named ranges from selected Spreadsheets");
|
|
258
|
+
i0.ɵɵelementEnd()()();
|
|
259
|
+
} if (rf & 2) {
|
|
260
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
261
|
+
i0.ɵɵadvance(5);
|
|
262
|
+
i0.ɵɵrepeater(ctx_r1.SynthesisTargetOptions);
|
|
263
|
+
i0.ɵɵadvance(5);
|
|
264
|
+
i0.ɵɵtextInterpolate1(" Source Artifacts (", ctx_r1.SelectedSourceIds.size, " selected) ");
|
|
265
|
+
i0.ɵɵadvance(6);
|
|
266
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SourceSearchQuery);
|
|
267
|
+
i0.ɵɵadvance(2);
|
|
268
|
+
i0.ɵɵconditional(ctx_r1.FilteredSynthesisSources.length === 0 ? 18 : 19);
|
|
269
|
+
i0.ɵɵadvance(5);
|
|
270
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Title);
|
|
271
|
+
i0.ɵɵadvance(6);
|
|
272
|
+
i0.ɵɵrepeater(ctx_r1.SynthesisGoalPresets);
|
|
273
|
+
i0.ɵɵadvance(2);
|
|
274
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SynthesisGoal);
|
|
275
|
+
i0.ɵɵadvance(2);
|
|
276
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.LinkChartsAndRanges);
|
|
277
|
+
} }
|
|
278
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_22_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
279
|
+
i0.ɵɵelementStart(0, "option", 14);
|
|
280
|
+
i0.ɵɵtext(1);
|
|
281
|
+
i0.ɵɵelementEnd();
|
|
282
|
+
} if (rf & 2) {
|
|
283
|
+
const t_r16 = ctx.$implicit;
|
|
284
|
+
i0.ɵɵproperty("value", t_r16.ID);
|
|
285
|
+
i0.ɵɵadvance();
|
|
286
|
+
i0.ɵɵtextInterpolate(t_r16.Name);
|
|
287
|
+
} }
|
|
288
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
289
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
290
|
+
i0.ɵɵelementStart(0, "div", 65)(1, "div", 66)(2, "label", 67);
|
|
291
|
+
i0.ɵɵtext(3, "Title");
|
|
292
|
+
i0.ɵɵelementEnd();
|
|
293
|
+
i0.ɵɵelementStart(4, "input", 68);
|
|
294
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_22_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Title, $event) || (ctx_r1.Title = $event); return i0.ɵɵresetView($event); });
|
|
295
|
+
i0.ɵɵelementEnd()();
|
|
296
|
+
i0.ɵɵelementStart(5, "div", 66)(6, "label", 69);
|
|
297
|
+
i0.ɵɵtext(7, "Artifact Type");
|
|
298
|
+
i0.ɵɵelementEnd();
|
|
299
|
+
i0.ɵɵelementStart(8, "select", 70);
|
|
300
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_22_Template_select_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.SelectedCustomTypeId, $event) || (ctx_r1.SelectedCustomTypeId = $event); return i0.ɵɵresetView($event); });
|
|
301
|
+
i0.ɵɵrepeaterCreate(9, LibraryCreateDialogComponent_Conditional_0_Conditional_22_For_10_Template, 2, 2, "option", 14, _forTrack3);
|
|
302
|
+
i0.ɵɵelementEnd()()();
|
|
303
|
+
i0.ɵɵelementStart(11, "div", 10)(12, "label", 71);
|
|
304
|
+
i0.ɵɵtext(13, "Initial Content");
|
|
305
|
+
i0.ɵɵelementEnd();
|
|
306
|
+
i0.ɵɵelementStart(14, "textarea", 72);
|
|
307
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Conditional_22_Template_textarea_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.CustomContent, $event) || (ctx_r1.CustomContent = $event); return i0.ɵɵresetView($event); });
|
|
308
|
+
i0.ɵɵelementEnd()();
|
|
309
|
+
} if (rf & 2) {
|
|
310
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
311
|
+
i0.ɵɵadvance(4);
|
|
312
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Title);
|
|
313
|
+
i0.ɵɵadvance(4);
|
|
314
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SelectedCustomTypeId);
|
|
315
|
+
i0.ɵɵadvance();
|
|
316
|
+
i0.ɵɵrepeater(ctx_r1.ArtifactTypes);
|
|
317
|
+
i0.ɵɵadvance(5);
|
|
318
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.CustomContent);
|
|
319
|
+
} }
|
|
320
|
+
function LibraryCreateDialogComponent_Conditional_0_For_30_Template(rf, ctx) { if (rf & 1) {
|
|
321
|
+
i0.ɵɵelementStart(0, "option", 14);
|
|
322
|
+
i0.ɵɵtext(1);
|
|
323
|
+
i0.ɵɵelementEnd();
|
|
324
|
+
} if (rf & 2) {
|
|
325
|
+
const col_r17 = ctx.$implicit;
|
|
326
|
+
i0.ɵɵproperty("value", col_r17.Id);
|
|
327
|
+
i0.ɵɵadvance();
|
|
328
|
+
i0.ɵɵtextInterpolate(col_r17.Label);
|
|
329
|
+
} }
|
|
330
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
331
|
+
i0.ɵɵelementStart(0, "mj-alert", 15);
|
|
332
|
+
i0.ɵɵtext(1);
|
|
333
|
+
i0.ɵɵelementEnd();
|
|
334
|
+
} if (rf & 2) {
|
|
335
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
336
|
+
i0.ɵɵadvance();
|
|
337
|
+
i0.ɵɵtextInterpolate(ctx_r1.ErrorMessage);
|
|
338
|
+
} }
|
|
339
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_34_Template(rf, ctx) { if (rf & 1) {
|
|
340
|
+
i0.ɵɵelement(0, "i", 73);
|
|
341
|
+
i0.ɵɵtext(1);
|
|
342
|
+
} if (rf & 2) {
|
|
343
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
344
|
+
i0.ɵɵadvance();
|
|
345
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.ActiveTab === "synthesize" && ctx_r1.SynthesisProgressMessage ? ctx_r1.SynthesisProgressMessage : "Creating\u2026", " ");
|
|
346
|
+
} }
|
|
347
|
+
function LibraryCreateDialogComponent_Conditional_0_Conditional_35_Template(rf, ctx) { if (rf & 1) {
|
|
348
|
+
i0.ɵɵelement(0, "i", 74);
|
|
349
|
+
i0.ɵɵtext(1);
|
|
350
|
+
} if (rf & 2) {
|
|
351
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
352
|
+
i0.ɵɵadvance();
|
|
353
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.SubmitButtonLabel, " ");
|
|
354
|
+
} }
|
|
355
|
+
function LibraryCreateDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
356
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
357
|
+
i0.ɵɵelementStart(0, "mj-dialog", 1);
|
|
358
|
+
i0.ɵɵlistener("Close", function LibraryCreateDialogComponent_Conditional_0_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
|
|
359
|
+
i0.ɵɵelementStart(1, "div", 2)(2, "div", 3)(3, "button", 4);
|
|
360
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SwitchTab("blank")); });
|
|
361
|
+
i0.ɵɵelement(4, "i", 5);
|
|
362
|
+
i0.ɵɵelementStart(5, "span");
|
|
363
|
+
i0.ɵɵtext(6, "Create Blank");
|
|
364
|
+
i0.ɵɵelementEnd()();
|
|
365
|
+
i0.ɵɵelementStart(7, "button", 4);
|
|
366
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SwitchTab("upload")); });
|
|
367
|
+
i0.ɵɵelement(8, "i", 6);
|
|
368
|
+
i0.ɵɵelementStart(9, "span");
|
|
369
|
+
i0.ɵɵtext(10, "Upload / Convert File");
|
|
370
|
+
i0.ɵɵelementEnd()();
|
|
371
|
+
i0.ɵɵelementStart(11, "button", 7);
|
|
372
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SwitchTab("synthesize")); });
|
|
373
|
+
i0.ɵɵelement(12, "i", 5);
|
|
374
|
+
i0.ɵɵelementStart(13, "span");
|
|
375
|
+
i0.ɵɵtext(14, "Synthesize with AI");
|
|
376
|
+
i0.ɵɵelementEnd()();
|
|
377
|
+
i0.ɵɵelementStart(15, "button", 4);
|
|
378
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SwitchTab("custom")); });
|
|
379
|
+
i0.ɵɵelement(16, "i", 8);
|
|
380
|
+
i0.ɵɵelementStart(17, "span");
|
|
381
|
+
i0.ɵɵtext(18, "Custom Source");
|
|
382
|
+
i0.ɵɵelementEnd()()();
|
|
383
|
+
i0.ɵɵconditionalCreate(19, LibraryCreateDialogComponent_Conditional_0_Conditional_19_Template, 11, 2);
|
|
384
|
+
i0.ɵɵconditionalCreate(20, LibraryCreateDialogComponent_Conditional_0_Conditional_20_Template, 10, 5);
|
|
385
|
+
i0.ɵɵconditionalCreate(21, LibraryCreateDialogComponent_Conditional_0_Conditional_21_Template, 36, 6, "div", 9);
|
|
386
|
+
i0.ɵɵconditionalCreate(22, LibraryCreateDialogComponent_Conditional_0_Conditional_22_Template, 15, 3);
|
|
387
|
+
i0.ɵɵelementStart(23, "div", 10)(24, "label", 11);
|
|
388
|
+
i0.ɵɵtext(25, "Save into Collection (optional)");
|
|
389
|
+
i0.ɵɵelementEnd();
|
|
390
|
+
i0.ɵɵelementStart(26, "select", 12);
|
|
391
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryCreateDialogComponent_Conditional_0_Template_select_ngModelChange_26_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.TargetCollectionId, $event) || (ctx_r1.TargetCollectionId = $event); return i0.ɵɵresetView($event); });
|
|
392
|
+
i0.ɵɵelementStart(27, "option", 13);
|
|
393
|
+
i0.ɵɵtext(28, "None (Personal Library Root)");
|
|
394
|
+
i0.ɵɵelementEnd();
|
|
395
|
+
i0.ɵɵrepeaterCreate(29, LibraryCreateDialogComponent_Conditional_0_For_30_Template, 2, 2, "option", 14, _forTrack0);
|
|
396
|
+
i0.ɵɵelementEnd()();
|
|
397
|
+
i0.ɵɵconditionalCreate(31, LibraryCreateDialogComponent_Conditional_0_Conditional_31_Template, 2, 1, "mj-alert", 15);
|
|
398
|
+
i0.ɵɵelementEnd();
|
|
399
|
+
i0.ɵɵelementStart(32, "mj-dialog-actions")(33, "button", 16);
|
|
400
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Template_button_click_33_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Submit()); });
|
|
401
|
+
i0.ɵɵconditionalCreate(34, LibraryCreateDialogComponent_Conditional_0_Conditional_34_Template, 2, 1)(35, LibraryCreateDialogComponent_Conditional_0_Conditional_35_Template, 2, 1);
|
|
402
|
+
i0.ɵɵelementEnd();
|
|
403
|
+
i0.ɵɵelementStart(36, "button", 17);
|
|
404
|
+
i0.ɵɵlistener("click", function LibraryCreateDialogComponent_Conditional_0_Template_button_click_36_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancel()); });
|
|
405
|
+
i0.ɵɵtext(37, " Cancel ");
|
|
406
|
+
i0.ɵɵelementEnd()()();
|
|
407
|
+
} if (rf & 2) {
|
|
408
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
409
|
+
i0.ɵɵproperty("Title", ctx_r1.DialogTitle)("Visible", true)("Width", 680)("MinWidth", 420);
|
|
410
|
+
i0.ɵɵadvance(3);
|
|
411
|
+
i0.ɵɵclassProp("active", ctx_r1.ActiveTab === "blank");
|
|
412
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.ActiveTab === "blank");
|
|
413
|
+
i0.ɵɵadvance(4);
|
|
414
|
+
i0.ɵɵclassProp("active", ctx_r1.ActiveTab === "upload");
|
|
415
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.ActiveTab === "upload");
|
|
416
|
+
i0.ɵɵadvance(4);
|
|
417
|
+
i0.ɵɵclassProp("active", ctx_r1.ActiveTab === "synthesize");
|
|
418
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.ActiveTab === "synthesize");
|
|
419
|
+
i0.ɵɵadvance(4);
|
|
420
|
+
i0.ɵɵclassProp("active", ctx_r1.ActiveTab === "custom");
|
|
421
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.ActiveTab === "custom");
|
|
422
|
+
i0.ɵɵadvance(4);
|
|
423
|
+
i0.ɵɵconditional(ctx_r1.ActiveTab === "blank" ? 19 : -1);
|
|
424
|
+
i0.ɵɵadvance();
|
|
425
|
+
i0.ɵɵconditional(ctx_r1.ActiveTab === "upload" ? 20 : -1);
|
|
426
|
+
i0.ɵɵadvance();
|
|
427
|
+
i0.ɵɵconditional(ctx_r1.ActiveTab === "synthesize" ? 21 : -1);
|
|
428
|
+
i0.ɵɵadvance();
|
|
429
|
+
i0.ɵɵconditional(ctx_r1.ActiveTab === "custom" ? 22 : -1);
|
|
430
|
+
i0.ɵɵadvance(4);
|
|
431
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.TargetCollectionId);
|
|
432
|
+
i0.ɵɵadvance(3);
|
|
433
|
+
i0.ɵɵrepeater(ctx_r1.EditableCollections);
|
|
434
|
+
i0.ɵɵadvance(2);
|
|
435
|
+
i0.ɵɵconditional(ctx_r1.ErrorMessage ? 31 : -1);
|
|
436
|
+
i0.ɵɵadvance(2);
|
|
437
|
+
i0.ɵɵproperty("disabled", !ctx_r1.CanSubmit || ctx_r1.IsSubmitting);
|
|
438
|
+
i0.ɵɵadvance();
|
|
439
|
+
i0.ɵɵconditional(ctx_r1.IsSubmitting ? 34 : 35);
|
|
440
|
+
i0.ɵɵadvance(2);
|
|
441
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSubmitting);
|
|
442
|
+
} }
|
|
443
|
+
const _forTrack4 = ($index, $item) => $item.AccountId;
|
|
444
|
+
const _forTrack5 = ($index, $item) => $item.Format;
|
|
445
|
+
function LibraryExportDriveDialogComponent_Conditional_0_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
446
|
+
i0.ɵɵelementStart(0, "option", 6);
|
|
447
|
+
i0.ɵɵtext(1);
|
|
448
|
+
i0.ɵɵelementEnd();
|
|
449
|
+
} if (rf & 2) {
|
|
450
|
+
const drive_r3 = ctx.$implicit;
|
|
451
|
+
i0.ɵɵproperty("value", drive_r3.AccountId);
|
|
452
|
+
i0.ɵɵadvance();
|
|
453
|
+
i0.ɵɵtextInterpolate2(" ", drive_r3.AccountName, " (", drive_r3.ProviderName, ") ");
|
|
454
|
+
} }
|
|
455
|
+
function LibraryExportDriveDialogComponent_Conditional_0_For_18_Template(rf, ctx) { if (rf & 1) {
|
|
456
|
+
i0.ɵɵelementStart(0, "option", 6);
|
|
457
|
+
i0.ɵɵtext(1);
|
|
458
|
+
i0.ɵɵelementEnd();
|
|
459
|
+
} if (rf & 2) {
|
|
460
|
+
const fmt_r4 = ctx.$implicit;
|
|
461
|
+
i0.ɵɵproperty("value", fmt_r4.Format);
|
|
462
|
+
i0.ɵɵadvance();
|
|
463
|
+
i0.ɵɵtextInterpolate(fmt_r4.Label);
|
|
464
|
+
} }
|
|
465
|
+
function LibraryExportDriveDialogComponent_Conditional_0_Conditional_27_Template(rf, ctx) { if (rf & 1) {
|
|
466
|
+
i0.ɵɵelementStart(0, "mj-alert", 17);
|
|
467
|
+
i0.ɵɵtext(1, " A file already exists at ");
|
|
468
|
+
i0.ɵɵelementStart(2, "strong");
|
|
469
|
+
i0.ɵɵtext(3);
|
|
470
|
+
i0.ɵɵelementEnd();
|
|
471
|
+
i0.ɵɵtext(4, ". Click ");
|
|
472
|
+
i0.ɵɵelementStart(5, "strong");
|
|
473
|
+
i0.ɵɵtext(6, "Overwrite Existing File");
|
|
474
|
+
i0.ɵɵelementEnd();
|
|
475
|
+
i0.ɵɵtext(7, " to replace it, or change the file name above. ");
|
|
476
|
+
i0.ɵɵelementEnd();
|
|
477
|
+
} if (rf & 2) {
|
|
478
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
479
|
+
i0.ɵɵadvance(3);
|
|
480
|
+
i0.ɵɵtextInterpolate(ctx_r1.PendingOverwritePath);
|
|
481
|
+
} }
|
|
482
|
+
function LibraryExportDriveDialogComponent_Conditional_0_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
483
|
+
i0.ɵɵelementStart(0, "mj-alert", 18);
|
|
484
|
+
i0.ɵɵtext(1);
|
|
485
|
+
i0.ɵɵelementEnd();
|
|
486
|
+
} if (rf & 2) {
|
|
487
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
488
|
+
i0.ɵɵadvance();
|
|
489
|
+
i0.ɵɵtextInterpolate(ctx_r1.ErrorMessage);
|
|
490
|
+
} }
|
|
491
|
+
function LibraryExportDriveDialogComponent_Conditional_0_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
492
|
+
i0.ɵɵelement(0, "i", 21);
|
|
493
|
+
i0.ɵɵtext(1, " Publishing\u2026 ");
|
|
494
|
+
} }
|
|
495
|
+
function LibraryExportDriveDialogComponent_Conditional_0_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
496
|
+
i0.ɵɵelement(0, "i", 22);
|
|
497
|
+
i0.ɵɵtext(1, " Overwrite Existing File ");
|
|
498
|
+
} }
|
|
499
|
+
function LibraryExportDriveDialogComponent_Conditional_0_Conditional_33_Template(rf, ctx) { if (rf & 1) {
|
|
500
|
+
i0.ɵɵelement(0, "i", 16);
|
|
501
|
+
i0.ɵɵtext(1, " Publish to Drive ");
|
|
502
|
+
} }
|
|
503
|
+
function LibraryExportDriveDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
504
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
505
|
+
i0.ɵɵelementStart(0, "mj-dialog", 1);
|
|
506
|
+
i0.ɵɵlistener("Close", function LibraryExportDriveDialogComponent_Conditional_0_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancelled.emit()); });
|
|
507
|
+
i0.ɵɵelementStart(1, "div", 2)(2, "div", 3)(3, "label", 4);
|
|
508
|
+
i0.ɵɵtext(4, "Destination Connected Drive");
|
|
509
|
+
i0.ɵɵelementEnd();
|
|
510
|
+
i0.ɵɵelementStart(5, "select", 5);
|
|
511
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_select_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.SelectedAccountId, $event) || (ctx_r1.SelectedAccountId = $event); return i0.ɵɵresetView($event); });
|
|
512
|
+
i0.ɵɵlistener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_select_ngModelChange_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ClearOverwritePrompt()); });
|
|
513
|
+
i0.ɵɵrepeaterCreate(6, LibraryExportDriveDialogComponent_Conditional_0_For_7_Template, 2, 3, "option", 6, _forTrack4);
|
|
514
|
+
i0.ɵɵelementEnd()();
|
|
515
|
+
i0.ɵɵelementStart(8, "div", 3)(9, "label", 7);
|
|
516
|
+
i0.ɵɵtext(10, "Remote Folder Path (optional)");
|
|
517
|
+
i0.ɵɵelementEnd();
|
|
518
|
+
i0.ɵɵelementStart(11, "input", 8);
|
|
519
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_input_ngModelChange_11_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.FolderPrefix, $event) || (ctx_r1.FolderPrefix = $event); return i0.ɵɵresetView($event); });
|
|
520
|
+
i0.ɵɵlistener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_input_ngModelChange_11_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ClearOverwritePrompt()); });
|
|
521
|
+
i0.ɵɵelementEnd()();
|
|
522
|
+
i0.ɵɵelementStart(12, "div", 9)(13, "div", 10)(14, "label", 11);
|
|
523
|
+
i0.ɵɵtext(15, "Export Format");
|
|
524
|
+
i0.ɵɵelementEnd();
|
|
525
|
+
i0.ɵɵelementStart(16, "select", 12);
|
|
526
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_select_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.SelectedFormat, $event) || (ctx_r1.SelectedFormat = $event); return i0.ɵɵresetView($event); });
|
|
527
|
+
i0.ɵɵlistener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_select_ngModelChange_16_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ClearOverwritePrompt()); });
|
|
528
|
+
i0.ɵɵrepeaterCreate(17, LibraryExportDriveDialogComponent_Conditional_0_For_18_Template, 2, 2, "option", 6, _forTrack5);
|
|
529
|
+
i0.ɵɵelementEnd()();
|
|
530
|
+
i0.ɵɵelementStart(19, "div", 10)(20, "label", 13);
|
|
531
|
+
i0.ɵɵtext(21, "File Name");
|
|
532
|
+
i0.ɵɵelementEnd();
|
|
533
|
+
i0.ɵɵelementStart(22, "input", 14);
|
|
534
|
+
i0.ɵɵtwoWayListener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_input_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.FileName, $event) || (ctx_r1.FileName = $event); return i0.ɵɵresetView($event); });
|
|
535
|
+
i0.ɵɵlistener("ngModelChange", function LibraryExportDriveDialogComponent_Conditional_0_Template_input_ngModelChange_22_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ClearOverwritePrompt()); });
|
|
536
|
+
i0.ɵɵelementEnd()()();
|
|
537
|
+
i0.ɵɵelementStart(23, "div", 15);
|
|
538
|
+
i0.ɵɵelement(24, "i", 16);
|
|
539
|
+
i0.ɵɵelementStart(25, "span");
|
|
540
|
+
i0.ɵɵtext(26);
|
|
541
|
+
i0.ɵɵelementEnd()();
|
|
542
|
+
i0.ɵɵconditionalCreate(27, LibraryExportDriveDialogComponent_Conditional_0_Conditional_27_Template, 8, 1, "mj-alert", 17);
|
|
543
|
+
i0.ɵɵconditionalCreate(28, LibraryExportDriveDialogComponent_Conditional_0_Conditional_28_Template, 2, 1, "mj-alert", 18);
|
|
544
|
+
i0.ɵɵelementEnd();
|
|
545
|
+
i0.ɵɵelementStart(29, "mj-dialog-actions")(30, "button", 19);
|
|
546
|
+
i0.ɵɵlistener("click", function LibraryExportDriveDialogComponent_Conditional_0_Template_button_click_30_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ExportNow(!!ctx_r1.PendingOverwritePath)); });
|
|
547
|
+
i0.ɵɵconditionalCreate(31, LibraryExportDriveDialogComponent_Conditional_0_Conditional_31_Template, 2, 0)(32, LibraryExportDriveDialogComponent_Conditional_0_Conditional_32_Template, 2, 0)(33, LibraryExportDriveDialogComponent_Conditional_0_Conditional_33_Template, 2, 0);
|
|
548
|
+
i0.ɵɵelementEnd();
|
|
549
|
+
i0.ɵɵelementStart(34, "button", 20);
|
|
550
|
+
i0.ɵɵlistener("click", function LibraryExportDriveDialogComponent_Conditional_0_Template_button_click_34_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Cancelled.emit()); });
|
|
551
|
+
i0.ɵɵtext(35, " Cancel ");
|
|
552
|
+
i0.ɵɵelementEnd()()();
|
|
553
|
+
} if (rf & 2) {
|
|
554
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
555
|
+
i0.ɵɵproperty("Title", "Export to Connected Drive: " + ctx_r1.Item.Name + " (v" + ctx_r1.EffectiveVersionNumber + ")")("Visible", true)("Width", 540)("MinWidth", 380);
|
|
556
|
+
i0.ɵɵadvance(5);
|
|
557
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SelectedAccountId);
|
|
558
|
+
i0.ɵɵadvance();
|
|
559
|
+
i0.ɵɵrepeater(ctx_r1.Drives);
|
|
560
|
+
i0.ɵɵadvance(5);
|
|
561
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.FolderPrefix);
|
|
562
|
+
i0.ɵɵadvance(5);
|
|
563
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SelectedFormat);
|
|
564
|
+
i0.ɵɵadvance();
|
|
565
|
+
i0.ɵɵrepeater(ctx_r1.FormatOptions);
|
|
566
|
+
i0.ɵɵadvance(5);
|
|
567
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.FileName);
|
|
568
|
+
i0.ɵɵadvance(4);
|
|
569
|
+
i0.ɵɵtextInterpolate1(" Writes version v", ctx_r1.EffectiveVersionNumber, " directly to the selected external drive without creating duplicate MJ: Files database records. ");
|
|
570
|
+
i0.ɵɵadvance();
|
|
571
|
+
i0.ɵɵconditional(ctx_r1.PendingOverwritePath ? 27 : -1);
|
|
572
|
+
i0.ɵɵadvance();
|
|
573
|
+
i0.ɵɵconditional(ctx_r1.ErrorMessage ? 28 : -1);
|
|
574
|
+
i0.ɵɵadvance(2);
|
|
575
|
+
i0.ɵɵproperty("disabled", !ctx_r1.SelectedAccountId || ctx_r1.IsExporting);
|
|
576
|
+
i0.ɵɵadvance();
|
|
577
|
+
i0.ɵɵconditional(ctx_r1.IsExporting ? 31 : ctx_r1.PendingOverwritePath ? 32 : 33);
|
|
578
|
+
i0.ɵɵadvance(3);
|
|
579
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsExporting);
|
|
580
|
+
} }
|
|
581
|
+
const SETTING_LAST_SYNTHESIS_TARGET = 'Library/LastSynthesisTargetKind';
|
|
582
|
+
const SYNTHESIS_TARGET_OPTIONS = [
|
|
583
|
+
{ Kind: 'presentation', Label: 'Presentation', Icon: 'fa-solid fa-person-chalkboard' },
|
|
584
|
+
{ Kind: 'document', Label: 'Markdown Document', Icon: 'fa-solid fa-file-lines' },
|
|
585
|
+
{ Kind: 'spreadsheet', Label: 'Excel Spreadsheet', Icon: 'fa-solid fa-table-cells' },
|
|
586
|
+
];
|
|
587
|
+
const SYNTHESIS_GOAL_PRESETS = [
|
|
588
|
+
{
|
|
589
|
+
Label: 'Executive Briefing',
|
|
590
|
+
Goal: 'Synthesize key insights, top risks, metrics, and actionable next steps for leadership.',
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
Label: 'Combined Memo',
|
|
594
|
+
Goal: 'Merge narratives and supporting quantitative evidence into a cohesive written brief.',
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
Label: 'KPI Rollup',
|
|
598
|
+
Goal: 'Consolidate recurring KPIs, figures, and highlights into a structured summary matrix.',
|
|
599
|
+
},
|
|
600
|
+
];
|
|
601
|
+
const STARTER_TILES = [
|
|
602
|
+
{
|
|
603
|
+
Kind: 'document',
|
|
604
|
+
Title: 'MJ Document',
|
|
605
|
+
Subtitle: 'Rich Markdown, Suggesting mode & live MJ Entity Views',
|
|
606
|
+
Icon: 'fa-solid fa-file-lines',
|
|
607
|
+
AccentClass: 'accent-doc',
|
|
608
|
+
DefaultName: 'Untitled Document',
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
Kind: 'spreadsheet',
|
|
612
|
+
Title: 'MJ Spreadsheet',
|
|
613
|
+
Subtitle: 'Formulas, =MJ.QUERY() live tables & range charts',
|
|
614
|
+
Icon: 'fa-solid fa-table-cells',
|
|
615
|
+
AccentClass: 'accent-sheet',
|
|
616
|
+
DefaultName: 'Untitled Spreadsheet',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
Kind: 'presentation',
|
|
620
|
+
Title: 'MJ Presentation',
|
|
621
|
+
Subtitle: '16:9 structured slides, speaker notes & live data',
|
|
622
|
+
Icon: 'fa-solid fa-person-chalkboard',
|
|
623
|
+
AccentClass: 'accent-slide',
|
|
624
|
+
DefaultName: 'Untitled Presentation',
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
Kind: 'query',
|
|
628
|
+
Title: 'Data Query (SQL)',
|
|
629
|
+
Subtitle: 'Versioned SQL script with side-by-side Git diff',
|
|
630
|
+
Icon: 'fa-solid fa-database',
|
|
631
|
+
AccentClass: 'accent-query',
|
|
632
|
+
DefaultName: 'Untitled Data Query',
|
|
633
|
+
},
|
|
634
|
+
];
|
|
635
|
+
export class LibraryCreateDialogComponent extends BaseAngularComponent {
|
|
636
|
+
_isOpen = false;
|
|
637
|
+
set IsOpen(value) {
|
|
638
|
+
const next = Boolean(value);
|
|
639
|
+
const wasOpen = this._isOpen;
|
|
640
|
+
this._isOpen = next;
|
|
641
|
+
if (next && !wasOpen) {
|
|
642
|
+
this.initializeDialogOnOpen();
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
get IsOpen() {
|
|
646
|
+
return this._isOpen;
|
|
647
|
+
}
|
|
648
|
+
InitialTab = 'blank';
|
|
649
|
+
InitialStarterKind = 'document';
|
|
650
|
+
DefaultCollectionId = null;
|
|
651
|
+
Collections = [];
|
|
652
|
+
AvailableItems = [];
|
|
653
|
+
DefaultSelectedArtifactIds = [];
|
|
654
|
+
EnvironmentId = '';
|
|
655
|
+
CurrentUser;
|
|
656
|
+
Created = new EventEmitter();
|
|
657
|
+
Synthesized = new EventEmitter();
|
|
658
|
+
Cancelled = new EventEmitter();
|
|
659
|
+
StarterTiles = STARTER_TILES;
|
|
660
|
+
SynthesisTargetOptions = SYNTHESIS_TARGET_OPTIONS;
|
|
661
|
+
SynthesisGoalPresets = SYNTHESIS_GOAL_PRESETS;
|
|
662
|
+
ActiveTab = 'blank';
|
|
663
|
+
SelectedKind = 'document';
|
|
664
|
+
Title = 'Untitled Document';
|
|
665
|
+
Description = '';
|
|
666
|
+
TargetCollectionId = '';
|
|
667
|
+
SelectedFile = null;
|
|
668
|
+
ConvertToEditable = true;
|
|
669
|
+
IsDragOver = false;
|
|
670
|
+
SynthesisTargetKind = 'presentation';
|
|
671
|
+
SynthesisGoal = 'Synthesize key insights, top metrics, and next steps from these artifacts.';
|
|
672
|
+
SelectedSourceIds = new Set();
|
|
673
|
+
SourceSearchQuery = '';
|
|
674
|
+
LinkChartsAndRanges = true;
|
|
675
|
+
ArtifactTypes = [];
|
|
676
|
+
SelectedCustomTypeId = '';
|
|
677
|
+
CustomContent = '';
|
|
678
|
+
IsSubmitting = false;
|
|
679
|
+
SynthesisProgressMessage = '';
|
|
680
|
+
ErrorMessage = '';
|
|
681
|
+
creationService = inject(LibraryCreationService);
|
|
682
|
+
notifications = inject(MJNotificationService);
|
|
683
|
+
cdr = inject(ChangeDetectorRef);
|
|
684
|
+
initializeDialogOnOpen() {
|
|
685
|
+
this.ActiveTab = this.InitialTab;
|
|
686
|
+
this.SelectedKind = this.InitialStarterKind;
|
|
687
|
+
const starter = STARTER_TILES.find((t) => t.Kind === this.InitialStarterKind) ?? STARTER_TILES[0];
|
|
688
|
+
this.Title =
|
|
689
|
+
this.ActiveTab === 'upload'
|
|
690
|
+
? ''
|
|
691
|
+
: this.ActiveTab === 'synthesize'
|
|
692
|
+
? 'Synthesized Executive Brief'
|
|
693
|
+
: starter.DefaultName;
|
|
694
|
+
this.Description = '';
|
|
695
|
+
this.SelectedFile = null;
|
|
696
|
+
this.ConvertToEditable = true;
|
|
697
|
+
this.CustomContent = '';
|
|
698
|
+
this.ErrorMessage = '';
|
|
699
|
+
this.TargetCollectionId = this.DefaultCollectionId ?? '';
|
|
700
|
+
this.SourceSearchQuery = '';
|
|
701
|
+
this.LinkChartsAndRanges = true;
|
|
702
|
+
this.SelectedSourceIds = new Set(this.DefaultSelectedArtifactIds ?? []);
|
|
703
|
+
this.restoreSynthesisTargetPreference();
|
|
704
|
+
void this.ensureArtifactTypesLoaded();
|
|
705
|
+
}
|
|
706
|
+
get DialogTitle() {
|
|
707
|
+
if (this.ActiveTab === 'upload')
|
|
708
|
+
return 'Upload or Convert File into Library';
|
|
709
|
+
if (this.ActiveTab === 'synthesize')
|
|
710
|
+
return 'Synthesize New Artifact with AI';
|
|
711
|
+
if (this.ActiveTab === 'custom')
|
|
712
|
+
return 'Create Custom Library Item';
|
|
713
|
+
return 'Create in Library';
|
|
714
|
+
}
|
|
715
|
+
get SubmitButtonLabel() {
|
|
716
|
+
if (this.ActiveTab === 'upload') {
|
|
717
|
+
return this.SelectedFile && this.IsSelectedFileConvertible && this.ConvertToEditable
|
|
718
|
+
? 'Convert & Open in Studio'
|
|
719
|
+
: 'Upload to Library';
|
|
720
|
+
}
|
|
721
|
+
if (this.ActiveTab === 'synthesize') {
|
|
722
|
+
return 'Synthesize & Open in Studio';
|
|
723
|
+
}
|
|
724
|
+
return 'Create & Open in Studio';
|
|
725
|
+
}
|
|
726
|
+
get FilteredSynthesisSources() {
|
|
727
|
+
const q = this.SourceSearchQuery.trim().toLowerCase();
|
|
728
|
+
if (!q)
|
|
729
|
+
return this.AvailableItems;
|
|
730
|
+
return this.AvailableItems.filter((i) => i.Name.toLowerCase().includes(q) ||
|
|
731
|
+
i.TypeName.toLowerCase().includes(q) ||
|
|
732
|
+
(i.Description ?? '').toLowerCase().includes(q));
|
|
733
|
+
}
|
|
734
|
+
IsSourceSelected(artifactId) {
|
|
735
|
+
return this.SelectedSourceIds.has(artifactId);
|
|
736
|
+
}
|
|
737
|
+
ToggleSourceSelection(artifactId) {
|
|
738
|
+
if (this.SelectedSourceIds.has(artifactId)) {
|
|
739
|
+
this.SelectedSourceIds.delete(artifactId);
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
this.SelectedSourceIds.add(artifactId);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
SelectAllVisibleSources() {
|
|
746
|
+
for (const item of this.FilteredSynthesisSources) {
|
|
747
|
+
this.SelectedSourceIds.add(item.Id);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
ClearSelectedSources() {
|
|
751
|
+
this.SelectedSourceIds.clear();
|
|
752
|
+
}
|
|
753
|
+
SelectSynthesisTarget(kind) {
|
|
754
|
+
this.SynthesisTargetKind = kind;
|
|
755
|
+
try {
|
|
756
|
+
UserInfoEngine.Instance.SetSettingDebounced(SETTING_LAST_SYNTHESIS_TARGET, kind);
|
|
757
|
+
}
|
|
758
|
+
catch {
|
|
759
|
+
// Ignore if UserInfoEngine is uninitialized in isolated unit tests
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
get IsSelectedFileConvertible() {
|
|
763
|
+
return !!this.SelectedFile && this.creationService.IsConvertibleFileName(this.SelectedFile.name);
|
|
764
|
+
}
|
|
765
|
+
get EditableCollections() {
|
|
766
|
+
const out = [];
|
|
767
|
+
const walk = (nodes, prefix) => {
|
|
768
|
+
for (const n of nodes) {
|
|
769
|
+
const label = prefix ? `${prefix} / ${n.Name}` : n.Name;
|
|
770
|
+
if (n.CanEdit) {
|
|
771
|
+
out.push({ Id: n.Id, Label: label });
|
|
772
|
+
}
|
|
773
|
+
if (n.Children.length > 0) {
|
|
774
|
+
walk(n.Children, label);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
walk(this.Collections, '');
|
|
779
|
+
return out;
|
|
780
|
+
}
|
|
781
|
+
get CanSubmit() {
|
|
782
|
+
if (this.ActiveTab === 'blank') {
|
|
783
|
+
return (this.Title ?? '').trim().length > 0;
|
|
784
|
+
}
|
|
785
|
+
if (this.ActiveTab === 'upload') {
|
|
786
|
+
return this.SelectedFile !== null;
|
|
787
|
+
}
|
|
788
|
+
if (this.ActiveTab === 'synthesize') {
|
|
789
|
+
return this.SelectedSourceIds.size > 0 && (this.SynthesisGoal ?? '').trim().length > 0;
|
|
790
|
+
}
|
|
791
|
+
return ((this.Title ?? '').trim().length > 0 &&
|
|
792
|
+
(this.SelectedCustomTypeId ?? '').length > 0 &&
|
|
793
|
+
(this.CustomContent ?? '').trim().length > 0);
|
|
794
|
+
}
|
|
795
|
+
SwitchTab(tab) {
|
|
796
|
+
this.ActiveTab = tab;
|
|
797
|
+
this.ErrorMessage = '';
|
|
798
|
+
if (tab === 'blank' && !this.Title.trim()) {
|
|
799
|
+
const starter = STARTER_TILES.find((t) => t.Kind === this.SelectedKind) ?? STARTER_TILES[0];
|
|
800
|
+
this.Title = starter.DefaultName;
|
|
801
|
+
}
|
|
802
|
+
if (tab === 'synthesize' && !this.Title.trim()) {
|
|
803
|
+
this.Title = 'Synthesized Executive Brief';
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
SelectStarterKind(tile) {
|
|
807
|
+
const previousDefault = STARTER_TILES.find((t) => t.Kind === this.SelectedKind)?.DefaultName;
|
|
808
|
+
this.SelectedKind = tile.Kind;
|
|
809
|
+
if (!this.Title.trim() || this.Title === previousDefault) {
|
|
810
|
+
this.Title = tile.DefaultName;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
OnDragOver(event) {
|
|
814
|
+
event.preventDefault();
|
|
815
|
+
this.IsDragOver = true;
|
|
816
|
+
}
|
|
817
|
+
OnDrop(event) {
|
|
818
|
+
event.preventDefault();
|
|
819
|
+
this.IsDragOver = false;
|
|
820
|
+
const file = event.dataTransfer?.files?.[0] ?? null;
|
|
821
|
+
if (file) {
|
|
822
|
+
this.applySelectedFile(file);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
OnFileSelected(event) {
|
|
826
|
+
const input = event.target;
|
|
827
|
+
const file = input.files?.[0] ?? null;
|
|
828
|
+
if (file) {
|
|
829
|
+
this.applySelectedFile(file);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
async Submit() {
|
|
833
|
+
if (!this.CanSubmit || this.IsSubmitting)
|
|
834
|
+
return;
|
|
835
|
+
this.IsSubmitting = true;
|
|
836
|
+
this.SynthesisProgressMessage = '';
|
|
837
|
+
this.ErrorMessage = '';
|
|
838
|
+
this.cdr.detectChanges();
|
|
839
|
+
try {
|
|
840
|
+
const collectionId = this.TargetCollectionId || null;
|
|
841
|
+
if (this.ActiveTab === 'synthesize') {
|
|
842
|
+
const synthResult = await this.creationService.SynthesizeArtifactFromSources({
|
|
843
|
+
TargetKind: this.SynthesisTargetKind,
|
|
844
|
+
Goal: this.SynthesisGoal,
|
|
845
|
+
SourceArtifactIds: Array.from(this.SelectedSourceIds),
|
|
846
|
+
CollectionID: collectionId,
|
|
847
|
+
Title: this.Title.trim() || null,
|
|
848
|
+
LinkChartsAndRanges: this.LinkChartsAndRanges,
|
|
849
|
+
CurrentUser: this.CurrentUser,
|
|
850
|
+
Provider: this.ProviderToUse,
|
|
851
|
+
OnProgress: (progress) => {
|
|
852
|
+
if (progress.Message) {
|
|
853
|
+
this.SynthesisProgressMessage = progress.Message;
|
|
854
|
+
this.cdr.detectChanges();
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
});
|
|
858
|
+
this.notifications.CreateSimpleNotification(`Synthesized "${synthResult.Title}" (${synthResult.SourceCount} sources)`, 'success', 3500);
|
|
859
|
+
this.Synthesized.emit(synthResult);
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
let created;
|
|
863
|
+
if (this.ActiveTab === 'blank') {
|
|
864
|
+
created = await this.creationService.CreateBlankArtifact({
|
|
865
|
+
Kind: this.SelectedKind,
|
|
866
|
+
Title: this.Title,
|
|
867
|
+
Description: this.Description,
|
|
868
|
+
CollectionID: collectionId,
|
|
869
|
+
EnvironmentID: this.EnvironmentId,
|
|
870
|
+
CurrentUser: this.CurrentUser,
|
|
871
|
+
Provider: this.ProviderToUse,
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
else if (this.ActiveTab === 'upload' && this.SelectedFile) {
|
|
875
|
+
created = await this.creationService.ImportLocalFileToLibrary({
|
|
876
|
+
File: this.SelectedFile,
|
|
877
|
+
ConvertToEditable: this.IsSelectedFileConvertible && this.ConvertToEditable,
|
|
878
|
+
Title: this.Title,
|
|
879
|
+
Description: this.Description,
|
|
880
|
+
CollectionID: collectionId,
|
|
881
|
+
EnvironmentID: this.EnvironmentId,
|
|
882
|
+
CurrentUser: this.CurrentUser,
|
|
883
|
+
Provider: this.ProviderToUse,
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
created = await this.creationService.CreateCustomTextArtifact({
|
|
888
|
+
Title: this.Title,
|
|
889
|
+
Description: this.Description,
|
|
890
|
+
Content: this.CustomContent,
|
|
891
|
+
ArtifactTypeID: this.SelectedCustomTypeId,
|
|
892
|
+
CollectionID: collectionId,
|
|
893
|
+
EnvironmentID: this.EnvironmentId,
|
|
894
|
+
CurrentUser: this.CurrentUser,
|
|
895
|
+
Provider: this.ProviderToUse,
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
this.notifications.CreateSimpleNotification(`Created "${created.Artifact.Name}"`, 'success', 3000);
|
|
899
|
+
this.Created.emit(created);
|
|
900
|
+
}
|
|
901
|
+
catch (err) {
|
|
902
|
+
this.ErrorMessage = err instanceof Error ? err.message : 'Failed to create item.';
|
|
903
|
+
}
|
|
904
|
+
finally {
|
|
905
|
+
this.IsSubmitting = false;
|
|
906
|
+
this.SynthesisProgressMessage = '';
|
|
907
|
+
this.cdr.detectChanges();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
Cancel() {
|
|
911
|
+
this.Cancelled.emit();
|
|
912
|
+
}
|
|
913
|
+
FormatSize(bytes) {
|
|
914
|
+
if (bytes < 1024)
|
|
915
|
+
return `${bytes} B`;
|
|
916
|
+
if (bytes < 1024 * 1024)
|
|
917
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
918
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
919
|
+
}
|
|
920
|
+
applySelectedFile(file) {
|
|
921
|
+
this.SelectedFile = file;
|
|
922
|
+
this.ConvertToEditable = this.creationService.IsConvertibleFileName(file.name);
|
|
923
|
+
if (!this.Title.trim()) {
|
|
924
|
+
const dot = file.name.lastIndexOf('.');
|
|
925
|
+
this.Title = dot > 0 ? file.name.slice(0, dot) : file.name;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
async ensureArtifactTypesLoaded() {
|
|
929
|
+
if (this.ArtifactTypes.length > 0)
|
|
930
|
+
return;
|
|
931
|
+
this.ArtifactTypes = await this.creationService.LoadEnabledArtifactTypes(this.CurrentUser, this.ProviderToUse);
|
|
932
|
+
if (this.ArtifactTypes.length > 0 && !this.SelectedCustomTypeId) {
|
|
933
|
+
const md = this.ArtifactTypes.find((t) => t.DriverClass === 'MarkdownArtifactViewerPlugin') ?? this.ArtifactTypes[0];
|
|
934
|
+
this.SelectedCustomTypeId = md.ID;
|
|
935
|
+
}
|
|
936
|
+
this.cdr.detectChanges();
|
|
937
|
+
}
|
|
938
|
+
restoreSynthesisTargetPreference() {
|
|
939
|
+
try {
|
|
940
|
+
const saved = UserInfoEngine.Instance.GetSetting(SETTING_LAST_SYNTHESIS_TARGET);
|
|
941
|
+
if (saved === 'presentation' || saved === 'document' || saved === 'spreadsheet') {
|
|
942
|
+
this.SynthesisTargetKind = saved;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
catch {
|
|
946
|
+
// Ignore if UserInfoEngine is uninitialized in unit test
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵLibraryCreateDialogComponent_BaseFactory; return function LibraryCreateDialogComponent_Factory(__ngFactoryType__) { return (ɵLibraryCreateDialogComponent_BaseFactory || (ɵLibraryCreateDialogComponent_BaseFactory = i0.ɵɵgetInheritedFactory(LibraryCreateDialogComponent)))(__ngFactoryType__ || LibraryCreateDialogComponent); }; })();
|
|
950
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LibraryCreateDialogComponent, selectors: [["mj-library-create-dialog"]], inputs: { IsOpen: "IsOpen", InitialTab: "InitialTab", InitialStarterKind: "InitialStarterKind", DefaultCollectionId: "DefaultCollectionId", Collections: "Collections", AvailableItems: "AvailableItems", DefaultSelectedArtifactIds: "DefaultSelectedArtifactIds", EnvironmentId: "EnvironmentId", CurrentUser: "CurrentUser" }, outputs: { Created: "Created", Synthesized: "Synthesized", Cancelled: "Cancelled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "Title", "Visible", "Width", "MinWidth"], [3, "Close", "Title", "Visible", "Width", "MinWidth"], ["data-testid", "library-create-dialog", 1, "create-dialog-body"], ["role", "tablist", "aria-label", "Creation mode", 1, "create-mode-tabs"], ["type", "button", "role", "tab", 1, "create-mode-tab", 3, "click"], [1, "fa-solid", "fa-wand-magic-sparkles"], [1, "fa-solid", "fa-cloud-arrow-up"], ["type", "button", "role", "tab", "data-testid", "library-create-tab-synthesize", 1, "create-mode-tab", 3, "click"], [1, "fa-solid", "fa-code"], ["data-testid", "library-synthesize-panel", 1, "synth-panel"], [1, "field-group"], ["for", "lib-target-collection", 1, "field-label"], ["id", "lib-target-collection", 1, "field-select", 3, "ngModelChange", "ngModel"], ["value", ""], [3, "value"], ["Variant", "error"], ["type", "button", "mjButton", "", "variant", "primary", "data-testid", "library-create-submit-btn", 3, "click", "disabled"], ["type", "button", "mjButton", "", 3, "click", "disabled"], [1, "starter-grid"], ["type", "button", 1, "starter-option", 3, "selected"], ["for", "lib-create-title", 1, "field-label"], ["id", "lib-create-title", "type", "text", "placeholder", "Enter a title...", "data-testid", "library-create-title-input", 1, "field-input", 3, "ngModelChange", "keydown.enter", "ngModel"], ["for", "lib-create-desc", 1, "field-label"], ["id", "lib-create-desc", "type", "text", "placeholder", "Short summary for collaborators...", 1, "field-input", 3, "ngModelChange", "ngModel"], ["type", "button", 1, "starter-option", 3, "click"], [1, "starter-icon"], [1, "starter-copy"], [1, "starter-title"], [1, "starter-sub"], [1, "drop-zone", 3, "dragover", "dragleave", "drop"], ["type", "file", "data-testid", "library-upload-file-input", 1, "sr-only-file", 3, "change"], [1, "fa-solid", "fa-file-arrow-up", "drop-icon"], [1, "convert-choice-card"], ["for", "lib-upload-title", 1, "field-label"], ["id", "lib-upload-title", "type", "text", "placeholder", "Defaults to filename...", 1, "field-input", 3, "ngModelChange", "ngModel"], [1, "drop-primary"], [1, "drop-secondary"], [1, "convert-radio"], ["type", "radio", "name", "convertMode", 3, "ngModelChange", "value", "ngModel"], [1, "convert-radio-title"], [1, "convert-radio-desc"], [1, "field-label"], [1, "synth-target-row"], ["type", "button", 1, "synth-target-pill", 3, "active"], [1, "synth-sources-header"], [1, "synth-source-actions"], ["type", "button", 1, "synth-mini-link", 3, "click"], ["type", "text", "placeholder", "Filter Library items to combine...", "data-testid", "library-synth-source-search", 1, "field-input", 3, "ngModelChange", "ngModel"], ["data-testid", "library-synthesize-sources", 1, "synth-source-list"], [1, "synth-empty"], ["for", "lib-synth-title", 1, "field-label"], ["id", "lib-synth-title", "type", "text", "placeholder", "e.g., Q2 Executive Strategy Deck", "data-testid", "library-synthesize-title-input", 1, "field-input", 3, "ngModelChange", "ngModel"], ["for", "lib-synth-goal", 1, "field-label"], [1, "synth-presets"], ["type", "button", 1, "synth-preset-chip"], ["id", "lib-synth-goal", "rows", "3", "placeholder", "Describe how the selected sources should be combined...", "data-testid", "library-synthesize-goal-input", 1, "field-textarea", 3, "ngModelChange", "ngModel"], [1, "synth-checkbox-row"], ["type", "checkbox", "data-testid", "library-synthesize-link-charts", 3, "ngModelChange", "ngModel"], ["type", "button", 1, "synth-target-pill", 3, "click"], [1, "synth-source-item", 3, "checked"], [1, "synth-source-item"], ["type", "checkbox", 3, "change", "checked"], [1, "synth-source-name"], [1, "synth-source-meta"], ["type", "button", 1, "synth-preset-chip", 3, "click"], [1, "field-row"], [1, "field-group", "flex-1"], ["for", "lib-custom-title", 1, "field-label"], ["id", "lib-custom-title", "type", "text", "placeholder", "Artifact name", 1, "field-input", 3, "ngModelChange", "ngModel"], ["for", "lib-custom-type", 1, "field-label"], ["id", "lib-custom-type", 1, "field-select", 3, "ngModelChange", "ngModel"], ["for", "lib-custom-content", 1, "field-label"], ["id", "lib-custom-content", "rows", "6", "placeholder", "Paste JSON, HTML, SVG, Markdown, or code...", 1, "field-textarea", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-plus"]], template: function LibraryCreateDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
951
|
+
i0.ɵɵconditionalCreate(0, LibraryCreateDialogComponent_Conditional_0_Template, 38, 25, "mj-dialog", 0);
|
|
952
|
+
} if (rf & 2) {
|
|
953
|
+
i0.ɵɵconditional(ctx.IsOpen ? 0 : -1);
|
|
954
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.SelectControlValueAccessor, i1.RadioControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.MJButtonDirective, i2.MJDialogComponent, i2.MJDialogActionsComponent, i2.MJAlertComponent], styles: [".create-dialog-body[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-2) 0;\n }\n\n .create-mode-tabs[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-1);\n padding: 4px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n }\n\n .create-mode-tab[_ngcontent-%COMP%] {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--mj-space-2);\n padding: 8px 12px;\n border: none;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n }\n\n .create-mode-tab.active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n font-weight: 600;\n box-shadow: var(--mj-shadow-sm);\n }\n\n .starter-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-3);\n }\n\n .starter-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-3);\n padding: var(--mj-space-3);\n text-align: left;\n background: var(--mj-bg-surface);\n border: 1.5px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n }\n\n .starter-option[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-strong);\n background: var(--mj-bg-surface-hover);\n }\n\n .starter-option.selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 7%, var(--mj-bg-surface));\n }\n\n .starter-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n border-radius: var(--mj-radius-md);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n flex-shrink: 0;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n }\n\n .starter-icon.accent-sheet[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n background: color-mix(in srgb, var(--mj-status-success) 14%, var(--mj-bg-surface));\n }\n\n .starter-icon.accent-slide[_ngcontent-%COMP%] {\n color: var(--mj-status-warning);\n background: color-mix(in srgb, var(--mj-status-warning) 14%, var(--mj-bg-surface));\n }\n\n .starter-title[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 2px;\n }\n\n .starter-sub[_ngcontent-%COMP%] {\n font-size: 12px;\n line-height: 1.35;\n color: var(--mj-text-muted);\n }\n\n .field-row[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-3);\n }\n\n .flex-1[_ngcontent-%COMP%] {\n flex: 1;\n }\n\n .field-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .field-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .field-input[_ngcontent-%COMP%], \n .field-select[_ngcontent-%COMP%], \n .field-textarea[_ngcontent-%COMP%] {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 12px;\n border-radius: var(--mj-radius-sm);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: var(--mj-text-sm);\n }\n\n .field-textarea[_ngcontent-%COMP%] {\n font-family: 'SFMono-Regular', Consolas, Menlo, monospace;\n resize: vertical;\n }\n\n .drop-zone[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: var(--mj-space-6);\n border: 2px dashed var(--mj-border-strong);\n border-radius: var(--mj-radius-lg);\n background: var(--mj-bg-surface-card);\n cursor: pointer;\n text-align: center;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n }\n\n .drop-zone[_ngcontent-%COMP%]:hover, \n .drop-zone.drag-over[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .sr-only-file[_ngcontent-%COMP%] {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n }\n\n .drop-icon[_ngcontent-%COMP%] {\n font-size: 28px;\n color: var(--mj-brand-primary);\n margin-bottom: 4px;\n }\n\n .drop-primary[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .drop-secondary[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .convert-choice-card[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2-5);\n padding: var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n }\n\n .convert-radio[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-2-5);\n cursor: pointer;\n }\n\n .convert-radio[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n margin-top: 3px;\n }\n\n .convert-radio-title[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .convert-radio-desc[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .synth-panel[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-3);\n }\n\n .synth-target-row[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-2);\n flex-wrap: wrap;\n }\n\n .synth-target-pill[_ngcontent-%COMP%] {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--mj-space-2);\n padding: 8px 10px;\n border-radius: var(--mj-radius-md);\n border: 1.5px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n }\n\n .synth-target-pill.active[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n font-weight: 600;\n background: color-mix(in srgb, var(--mj-brand-primary) 9%, var(--mj-bg-surface));\n }\n\n .synth-sources-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n flex-wrap: wrap;\n }\n\n .synth-source-actions[_ngcontent-%COMP%], \n .synth-presets[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n flex-wrap: wrap;\n }\n\n .synth-mini-link[_ngcontent-%COMP%] {\n border: none;\n background: transparent;\n color: var(--mj-brand-primary);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n padding: 2px 4px;\n }\n\n .synth-preset-chip[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border-radius: var(--mj-radius-sm);\n font-size: 11px;\n padding: 2px 8px;\n cursor: pointer;\n }\n\n .synth-preset-chip[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n }\n\n .synth-source-list[_ngcontent-%COMP%] {\n max-height: 170px;\n overflow-y: auto;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n }\n\n .synth-source-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2-5);\n padding: 7px 10px;\n border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n cursor: pointer;\n font-size: var(--mj-text-sm);\n }\n\n .synth-source-item[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n }\n\n .synth-source-item.checked[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .synth-source-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 13px;\n flex-shrink: 0;\n }\n\n .synth-source-name[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--mj-text-primary);\n font-weight: 500;\n }\n\n .synth-source-meta[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n flex-shrink: 0;\n }\n\n .synth-empty[_ngcontent-%COMP%] {\n padding: 14px;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n }\n\n .synth-checkbox-row[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n cursor: pointer;\n }\n\n @media (max-width: 600px) {\n .starter-grid[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n .field-row[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n }"] });
|
|
955
|
+
}
|
|
956
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LibraryCreateDialogComponent, [{
|
|
957
|
+
type: Component,
|
|
958
|
+
args: [{ standalone: false, selector: 'mj-library-create-dialog', template: `
|
|
959
|
+
@if (IsOpen) {
|
|
960
|
+
<mj-dialog
|
|
961
|
+
[Title]="DialogTitle"
|
|
962
|
+
[Visible]="true"
|
|
963
|
+
[Width]="680"
|
|
964
|
+
[MinWidth]="420"
|
|
965
|
+
(Close)="Cancel()"
|
|
966
|
+
>
|
|
967
|
+
<div class="create-dialog-body" data-testid="library-create-dialog">
|
|
968
|
+
<!-- Mode Tabs -->
|
|
969
|
+
<div class="create-mode-tabs" role="tablist" aria-label="Creation mode">
|
|
970
|
+
<button
|
|
971
|
+
type="button"
|
|
972
|
+
role="tab"
|
|
973
|
+
class="create-mode-tab"
|
|
974
|
+
[class.active]="ActiveTab === 'blank'"
|
|
975
|
+
[attr.aria-selected]="ActiveTab === 'blank'"
|
|
976
|
+
(click)="SwitchTab('blank')"
|
|
977
|
+
>
|
|
978
|
+
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
|
979
|
+
<span>Create Blank</span>
|
|
980
|
+
</button>
|
|
981
|
+
<button
|
|
982
|
+
type="button"
|
|
983
|
+
role="tab"
|
|
984
|
+
class="create-mode-tab"
|
|
985
|
+
[class.active]="ActiveTab === 'upload'"
|
|
986
|
+
[attr.aria-selected]="ActiveTab === 'upload'"
|
|
987
|
+
(click)="SwitchTab('upload')"
|
|
988
|
+
>
|
|
989
|
+
<i class="fa-solid fa-cloud-arrow-up"></i>
|
|
990
|
+
<span>Upload / Convert File</span>
|
|
991
|
+
</button>
|
|
992
|
+
<button
|
|
993
|
+
type="button"
|
|
994
|
+
role="tab"
|
|
995
|
+
class="create-mode-tab"
|
|
996
|
+
[class.active]="ActiveTab === 'synthesize'"
|
|
997
|
+
[attr.aria-selected]="ActiveTab === 'synthesize'"
|
|
998
|
+
(click)="SwitchTab('synthesize')"
|
|
999
|
+
data-testid="library-create-tab-synthesize"
|
|
1000
|
+
>
|
|
1001
|
+
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
|
1002
|
+
<span>Synthesize with AI</span>
|
|
1003
|
+
</button>
|
|
1004
|
+
<button
|
|
1005
|
+
type="button"
|
|
1006
|
+
role="tab"
|
|
1007
|
+
class="create-mode-tab"
|
|
1008
|
+
[class.active]="ActiveTab === 'custom'"
|
|
1009
|
+
[attr.aria-selected]="ActiveTab === 'custom'"
|
|
1010
|
+
(click)="SwitchTab('custom')"
|
|
1011
|
+
>
|
|
1012
|
+
<i class="fa-solid fa-code"></i>
|
|
1013
|
+
<span>Custom Source</span>
|
|
1014
|
+
</button>
|
|
1015
|
+
</div>
|
|
1016
|
+
|
|
1017
|
+
@if (ActiveTab === 'blank') {
|
|
1018
|
+
<div class="starter-grid">
|
|
1019
|
+
@for (tile of StarterTiles; track tile.Kind) {
|
|
1020
|
+
<button
|
|
1021
|
+
type="button"
|
|
1022
|
+
class="starter-option"
|
|
1023
|
+
[class.selected]="SelectedKind === tile.Kind"
|
|
1024
|
+
(click)="SelectStarterKind(tile)"
|
|
1025
|
+
[attr.data-testid]="'dialog-starter-' + tile.Kind"
|
|
1026
|
+
>
|
|
1027
|
+
<div class="starter-icon" [class]="tile.AccentClass">
|
|
1028
|
+
<i [class]="tile.Icon"></i>
|
|
1029
|
+
</div>
|
|
1030
|
+
<div class="starter-copy">
|
|
1031
|
+
<div class="starter-title">{{ tile.Title }}</div>
|
|
1032
|
+
<div class="starter-sub">{{ tile.Subtitle }}</div>
|
|
1033
|
+
</div>
|
|
1034
|
+
</button>
|
|
1035
|
+
}
|
|
1036
|
+
</div>
|
|
1037
|
+
|
|
1038
|
+
<div class="field-group">
|
|
1039
|
+
<label class="field-label" for="lib-create-title">Title</label>
|
|
1040
|
+
<input
|
|
1041
|
+
id="lib-create-title"
|
|
1042
|
+
type="text"
|
|
1043
|
+
class="field-input"
|
|
1044
|
+
[(ngModel)]="Title"
|
|
1045
|
+
placeholder="Enter a title..."
|
|
1046
|
+
(keydown.enter)="Submit()"
|
|
1047
|
+
data-testid="library-create-title-input"
|
|
1048
|
+
/>
|
|
1049
|
+
</div>
|
|
1050
|
+
|
|
1051
|
+
<div class="field-group">
|
|
1052
|
+
<label class="field-label" for="lib-create-desc">Description (optional)</label>
|
|
1053
|
+
<input
|
|
1054
|
+
id="lib-create-desc"
|
|
1055
|
+
type="text"
|
|
1056
|
+
class="field-input"
|
|
1057
|
+
[(ngModel)]="Description"
|
|
1058
|
+
placeholder="Short summary for collaborators..."
|
|
1059
|
+
/>
|
|
1060
|
+
</div>
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
@if (ActiveTab === 'upload') {
|
|
1064
|
+
<label
|
|
1065
|
+
class="drop-zone"
|
|
1066
|
+
[class.drag-over]="IsDragOver"
|
|
1067
|
+
(dragover)="OnDragOver($event)"
|
|
1068
|
+
(dragleave)="IsDragOver = false"
|
|
1069
|
+
(drop)="OnDrop($event)"
|
|
1070
|
+
>
|
|
1071
|
+
<input
|
|
1072
|
+
type="file"
|
|
1073
|
+
class="sr-only-file"
|
|
1074
|
+
(change)="OnFileSelected($event)"
|
|
1075
|
+
data-testid="library-upload-file-input"
|
|
1076
|
+
/>
|
|
1077
|
+
<i class="fa-solid fa-file-arrow-up drop-icon"></i>
|
|
1078
|
+
@if (SelectedFile) {
|
|
1079
|
+
<div class="drop-primary">{{ SelectedFile.name }}</div>
|
|
1080
|
+
<div class="drop-secondary">
|
|
1081
|
+
{{ FormatSize(SelectedFile.size) }} · Click or drop another file to replace
|
|
1082
|
+
</div>
|
|
1083
|
+
} @else {
|
|
1084
|
+
<div class="drop-primary">Drop a file here or click to browse</div>
|
|
1085
|
+
<div class="drop-secondary">
|
|
1086
|
+
Supports .docx, .xlsx, .csv, .md, .pdf, images, audio/video, SQL, and JSON
|
|
1087
|
+
</div>
|
|
1088
|
+
}
|
|
1089
|
+
</label>
|
|
1090
|
+
|
|
1091
|
+
@if (SelectedFile && IsSelectedFileConvertible) {
|
|
1092
|
+
<div class="convert-choice-card">
|
|
1093
|
+
<label class="convert-radio">
|
|
1094
|
+
<input
|
|
1095
|
+
type="radio"
|
|
1096
|
+
name="convertMode"
|
|
1097
|
+
[value]="true"
|
|
1098
|
+
[(ngModel)]="ConvertToEditable"
|
|
1099
|
+
/>
|
|
1100
|
+
<div>
|
|
1101
|
+
<div class="convert-radio-title">
|
|
1102
|
+
Convert to collaborative MJ Document / Spreadsheet (Recommended)
|
|
1103
|
+
</div>
|
|
1104
|
+
<div class="convert-radio-desc">
|
|
1105
|
+
Opens in live Yjs Studio with Suggesting mode, formulas, and visual version diffs.
|
|
1106
|
+
</div>
|
|
1107
|
+
</div>
|
|
1108
|
+
</label>
|
|
1109
|
+
<label class="convert-radio">
|
|
1110
|
+
<input
|
|
1111
|
+
type="radio"
|
|
1112
|
+
name="convertMode"
|
|
1113
|
+
[value]="false"
|
|
1114
|
+
[(ngModel)]="ConvertToEditable"
|
|
1115
|
+
/>
|
|
1116
|
+
<div>
|
|
1117
|
+
<div class="convert-radio-title">Store original binary file in Library</div>
|
|
1118
|
+
<div class="convert-radio-desc">
|
|
1119
|
+
Preserves exact original bytes in MJ Storage as a read-only file artifact.
|
|
1120
|
+
</div>
|
|
1121
|
+
</div>
|
|
1122
|
+
</label>
|
|
1123
|
+
</div>
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
<div class="field-group">
|
|
1127
|
+
<label class="field-label" for="lib-upload-title">Display Title</label>
|
|
1128
|
+
<input
|
|
1129
|
+
id="lib-upload-title"
|
|
1130
|
+
type="text"
|
|
1131
|
+
class="field-input"
|
|
1132
|
+
[(ngModel)]="Title"
|
|
1133
|
+
placeholder="Defaults to filename..."
|
|
1134
|
+
/>
|
|
1135
|
+
</div>
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
@if (ActiveTab === 'synthesize') {
|
|
1139
|
+
<div class="synth-panel" data-testid="library-synthesize-panel">
|
|
1140
|
+
<div class="field-group">
|
|
1141
|
+
<label class="field-label">Target Output Format</label>
|
|
1142
|
+
<div class="synth-target-row">
|
|
1143
|
+
@for (opt of SynthesisTargetOptions; track opt.Kind) {
|
|
1144
|
+
<button
|
|
1145
|
+
type="button"
|
|
1146
|
+
class="synth-target-pill"
|
|
1147
|
+
[class.active]="SynthesisTargetKind === opt.Kind"
|
|
1148
|
+
(click)="SelectSynthesisTarget(opt.Kind)"
|
|
1149
|
+
[attr.data-testid]="'synth-target-' + opt.Kind"
|
|
1150
|
+
>
|
|
1151
|
+
<i [class]="opt.Icon"></i>
|
|
1152
|
+
<span>{{ opt.Label }}</span>
|
|
1153
|
+
</button>
|
|
1154
|
+
}
|
|
1155
|
+
</div>
|
|
1156
|
+
</div>
|
|
1157
|
+
|
|
1158
|
+
<div class="field-group">
|
|
1159
|
+
<div class="synth-sources-header">
|
|
1160
|
+
<label class="field-label">
|
|
1161
|
+
Source Artifacts ({{ SelectedSourceIds.size }} selected)
|
|
1162
|
+
</label>
|
|
1163
|
+
<div class="synth-source-actions">
|
|
1164
|
+
<button
|
|
1165
|
+
type="button"
|
|
1166
|
+
class="synth-mini-link"
|
|
1167
|
+
(click)="SelectAllVisibleSources()"
|
|
1168
|
+
>
|
|
1169
|
+
Select all
|
|
1170
|
+
</button>
|
|
1171
|
+
<button
|
|
1172
|
+
type="button"
|
|
1173
|
+
class="synth-mini-link"
|
|
1174
|
+
(click)="ClearSelectedSources()"
|
|
1175
|
+
>
|
|
1176
|
+
Clear
|
|
1177
|
+
</button>
|
|
1178
|
+
</div>
|
|
1179
|
+
</div>
|
|
1180
|
+
<input
|
|
1181
|
+
type="text"
|
|
1182
|
+
class="field-input"
|
|
1183
|
+
[(ngModel)]="SourceSearchQuery"
|
|
1184
|
+
placeholder="Filter Library items to combine..."
|
|
1185
|
+
data-testid="library-synth-source-search"
|
|
1186
|
+
/>
|
|
1187
|
+
<div class="synth-source-list" data-testid="library-synthesize-sources">
|
|
1188
|
+
@if (FilteredSynthesisSources.length === 0) {
|
|
1189
|
+
<div class="synth-empty">No matching artifacts in Library.</div>
|
|
1190
|
+
} @else {
|
|
1191
|
+
@for (item of FilteredSynthesisSources; track item.Id) {
|
|
1192
|
+
<label class="synth-source-item" [class.checked]="IsSourceSelected(item.Id)">
|
|
1193
|
+
<input
|
|
1194
|
+
type="checkbox"
|
|
1195
|
+
[checked]="IsSourceSelected(item.Id)"
|
|
1196
|
+
(change)="ToggleSourceSelection(item.Id)"
|
|
1197
|
+
[attr.data-testid]="'synth-source-' + item.Id"
|
|
1198
|
+
/>
|
|
1199
|
+
<i [class]="item.Icon + ' synth-source-icon'"></i>
|
|
1200
|
+
<span class="synth-source-name">{{ item.Name }}</span>
|
|
1201
|
+
<span class="synth-source-meta">{{ item.TypeName }} · v{{ item.LatestVersionNumber }}</span>
|
|
1202
|
+
</label>
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
</div>
|
|
1206
|
+
</div>
|
|
1207
|
+
|
|
1208
|
+
<div class="field-group">
|
|
1209
|
+
<label class="field-label" for="lib-synth-title">Synthesized Artifact Title</label>
|
|
1210
|
+
<input
|
|
1211
|
+
id="lib-synth-title"
|
|
1212
|
+
type="text"
|
|
1213
|
+
class="field-input"
|
|
1214
|
+
[(ngModel)]="Title"
|
|
1215
|
+
placeholder="e.g., Q2 Executive Strategy Deck"
|
|
1216
|
+
data-testid="library-synthesize-title-input"
|
|
1217
|
+
/>
|
|
1218
|
+
</div>
|
|
1219
|
+
|
|
1220
|
+
<div class="field-group">
|
|
1221
|
+
<div class="synth-sources-header">
|
|
1222
|
+
<label class="field-label" for="lib-synth-goal">Synthesis Goal / Prompt</label>
|
|
1223
|
+
<div class="synth-presets">
|
|
1224
|
+
@for (preset of SynthesisGoalPresets; track preset.Label) {
|
|
1225
|
+
<button
|
|
1226
|
+
type="button"
|
|
1227
|
+
class="synth-preset-chip"
|
|
1228
|
+
(click)="SynthesisGoal = preset.Goal"
|
|
1229
|
+
>
|
|
1230
|
+
{{ preset.Label }}
|
|
1231
|
+
</button>
|
|
1232
|
+
}
|
|
1233
|
+
</div>
|
|
1234
|
+
</div>
|
|
1235
|
+
<textarea
|
|
1236
|
+
id="lib-synth-goal"
|
|
1237
|
+
class="field-textarea"
|
|
1238
|
+
rows="3"
|
|
1239
|
+
[(ngModel)]="SynthesisGoal"
|
|
1240
|
+
placeholder="Describe how the selected sources should be combined..."
|
|
1241
|
+
data-testid="library-synthesize-goal-input"
|
|
1242
|
+
></textarea>
|
|
1243
|
+
</div>
|
|
1244
|
+
|
|
1245
|
+
<label class="synth-checkbox-row">
|
|
1246
|
+
<input
|
|
1247
|
+
type="checkbox"
|
|
1248
|
+
[(ngModel)]="LinkChartsAndRanges"
|
|
1249
|
+
data-testid="library-synthesize-link-charts"
|
|
1250
|
+
/>
|
|
1251
|
+
<span>Link live charts & named ranges from selected Spreadsheets</span>
|
|
1252
|
+
</label>
|
|
1253
|
+
</div>
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
@if (ActiveTab === 'custom') {
|
|
1257
|
+
<div class="field-row">
|
|
1258
|
+
<div class="field-group flex-1">
|
|
1259
|
+
<label class="field-label" for="lib-custom-title">Title</label>
|
|
1260
|
+
<input
|
|
1261
|
+
id="lib-custom-title"
|
|
1262
|
+
type="text"
|
|
1263
|
+
class="field-input"
|
|
1264
|
+
[(ngModel)]="Title"
|
|
1265
|
+
placeholder="Artifact name"
|
|
1266
|
+
/>
|
|
1267
|
+
</div>
|
|
1268
|
+
<div class="field-group flex-1">
|
|
1269
|
+
<label class="field-label" for="lib-custom-type">Artifact Type</label>
|
|
1270
|
+
<select
|
|
1271
|
+
id="lib-custom-type"
|
|
1272
|
+
class="field-select"
|
|
1273
|
+
[(ngModel)]="SelectedCustomTypeId"
|
|
1274
|
+
>
|
|
1275
|
+
@for (t of ArtifactTypes; track t.ID) {
|
|
1276
|
+
<option [value]="t.ID">{{ t.Name }}</option>
|
|
1277
|
+
}
|
|
1278
|
+
</select>
|
|
1279
|
+
</div>
|
|
1280
|
+
</div>
|
|
1281
|
+
<div class="field-group">
|
|
1282
|
+
<label class="field-label" for="lib-custom-content">Initial Content</label>
|
|
1283
|
+
<textarea
|
|
1284
|
+
id="lib-custom-content"
|
|
1285
|
+
class="field-textarea"
|
|
1286
|
+
rows="6"
|
|
1287
|
+
[(ngModel)]="CustomContent"
|
|
1288
|
+
placeholder="Paste JSON, HTML, SVG, Markdown, or code..."
|
|
1289
|
+
></textarea>
|
|
1290
|
+
</div>
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
<!-- Shared Optional Collection Target -->
|
|
1294
|
+
<div class="field-group">
|
|
1295
|
+
<label class="field-label" for="lib-target-collection">Save into Collection (optional)</label>
|
|
1296
|
+
<select
|
|
1297
|
+
id="lib-target-collection"
|
|
1298
|
+
class="field-select"
|
|
1299
|
+
[(ngModel)]="TargetCollectionId"
|
|
1300
|
+
>
|
|
1301
|
+
<option value="">None (Personal Library Root)</option>
|
|
1302
|
+
@for (col of EditableCollections; track col.Id) {
|
|
1303
|
+
<option [value]="col.Id">{{ col.Label }}</option>
|
|
1304
|
+
}
|
|
1305
|
+
</select>
|
|
1306
|
+
</div>
|
|
1307
|
+
|
|
1308
|
+
@if (ErrorMessage) {
|
|
1309
|
+
<mj-alert Variant="error">{{ ErrorMessage }}</mj-alert>
|
|
1310
|
+
}
|
|
1311
|
+
</div>
|
|
1312
|
+
|
|
1313
|
+
<mj-dialog-actions>
|
|
1314
|
+
<button
|
|
1315
|
+
type="button"
|
|
1316
|
+
mjButton
|
|
1317
|
+
variant="primary"
|
|
1318
|
+
[disabled]="!CanSubmit || IsSubmitting"
|
|
1319
|
+
(click)="Submit()"
|
|
1320
|
+
data-testid="library-create-submit-btn"
|
|
1321
|
+
>
|
|
1322
|
+
@if (IsSubmitting) {
|
|
1323
|
+
<i class="fa-solid fa-spinner fa-spin"></i>
|
|
1324
|
+
{{ ActiveTab === 'synthesize' && SynthesisProgressMessage ? SynthesisProgressMessage : 'Creating…' }}
|
|
1325
|
+
} @else {
|
|
1326
|
+
<i class="fa-solid fa-plus"></i>
|
|
1327
|
+
{{ SubmitButtonLabel }}
|
|
1328
|
+
}
|
|
1329
|
+
</button>
|
|
1330
|
+
<button type="button" mjButton [disabled]="IsSubmitting" (click)="Cancel()">
|
|
1331
|
+
Cancel
|
|
1332
|
+
</button>
|
|
1333
|
+
</mj-dialog-actions>
|
|
1334
|
+
</mj-dialog>
|
|
1335
|
+
}
|
|
1336
|
+
`, styles: ["\n .create-dialog-body {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-2) 0;\n }\n\n .create-mode-tabs {\n display: flex;\n gap: var(--mj-space-1);\n padding: 4px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n }\n\n .create-mode-tab {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--mj-space-2);\n padding: 8px 12px;\n border: none;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n }\n\n .create-mode-tab.active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n font-weight: 600;\n box-shadow: var(--mj-shadow-sm);\n }\n\n .starter-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-3);\n }\n\n .starter-option {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-3);\n padding: var(--mj-space-3);\n text-align: left;\n background: var(--mj-bg-surface);\n border: 1.5px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n }\n\n .starter-option:hover {\n border-color: var(--mj-border-strong);\n background: var(--mj-bg-surface-hover);\n }\n\n .starter-option.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 7%, var(--mj-bg-surface));\n }\n\n .starter-icon {\n width: 36px;\n height: 36px;\n border-radius: var(--mj-radius-md);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n flex-shrink: 0;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n }\n\n .starter-icon.accent-sheet {\n color: var(--mj-status-success);\n background: color-mix(in srgb, var(--mj-status-success) 14%, var(--mj-bg-surface));\n }\n\n .starter-icon.accent-slide {\n color: var(--mj-status-warning);\n background: color-mix(in srgb, var(--mj-status-warning) 14%, var(--mj-bg-surface));\n }\n\n .starter-title {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 2px;\n }\n\n .starter-sub {\n font-size: 12px;\n line-height: 1.35;\n color: var(--mj-text-muted);\n }\n\n .field-row {\n display: flex;\n gap: var(--mj-space-3);\n }\n\n .flex-1 {\n flex: 1;\n }\n\n .field-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .field-label {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .field-input,\n .field-select,\n .field-textarea {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 12px;\n border-radius: var(--mj-radius-sm);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: var(--mj-text-sm);\n }\n\n .field-textarea {\n font-family: 'SFMono-Regular', Consolas, Menlo, monospace;\n resize: vertical;\n }\n\n .drop-zone {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: var(--mj-space-6);\n border: 2px dashed var(--mj-border-strong);\n border-radius: var(--mj-radius-lg);\n background: var(--mj-bg-surface-card);\n cursor: pointer;\n text-align: center;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n }\n\n .drop-zone:hover,\n .drop-zone.drag-over {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .sr-only-file {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n }\n\n .drop-icon {\n font-size: 28px;\n color: var(--mj-brand-primary);\n margin-bottom: 4px;\n }\n\n .drop-primary {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .drop-secondary {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .convert-choice-card {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2-5);\n padding: var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n }\n\n .convert-radio {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-2-5);\n cursor: pointer;\n }\n\n .convert-radio input {\n margin-top: 3px;\n }\n\n .convert-radio-title {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .convert-radio-desc {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .synth-panel {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-3);\n }\n\n .synth-target-row {\n display: flex;\n gap: var(--mj-space-2);\n flex-wrap: wrap;\n }\n\n .synth-target-pill {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--mj-space-2);\n padding: 8px 10px;\n border-radius: var(--mj-radius-md);\n border: 1.5px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n }\n\n .synth-target-pill.active {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n font-weight: 600;\n background: color-mix(in srgb, var(--mj-brand-primary) 9%, var(--mj-bg-surface));\n }\n\n .synth-sources-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n flex-wrap: wrap;\n }\n\n .synth-source-actions,\n .synth-presets {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n flex-wrap: wrap;\n }\n\n .synth-mini-link {\n border: none;\n background: transparent;\n color: var(--mj-brand-primary);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n padding: 2px 4px;\n }\n\n .synth-preset-chip {\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border-radius: var(--mj-radius-sm);\n font-size: 11px;\n padding: 2px 8px;\n cursor: pointer;\n }\n\n .synth-preset-chip:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n }\n\n .synth-source-list {\n max-height: 170px;\n overflow-y: auto;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n }\n\n .synth-source-item {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2-5);\n padding: 7px 10px;\n border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n cursor: pointer;\n font-size: var(--mj-text-sm);\n }\n\n .synth-source-item:last-child {\n border-bottom: none;\n }\n\n .synth-source-item.checked {\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .synth-source-icon {\n color: var(--mj-brand-primary);\n font-size: 13px;\n flex-shrink: 0;\n }\n\n .synth-source-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--mj-text-primary);\n font-weight: 500;\n }\n\n .synth-source-meta {\n font-size: 11px;\n color: var(--mj-text-muted);\n flex-shrink: 0;\n }\n\n .synth-empty {\n padding: 14px;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n }\n\n .synth-checkbox-row {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n cursor: pointer;\n }\n\n @media (max-width: 600px) {\n .starter-grid {\n grid-template-columns: 1fr;\n }\n .field-row {\n flex-direction: column;\n }\n }\n "] }]
|
|
1337
|
+
}], null, { IsOpen: [{
|
|
1338
|
+
type: Input
|
|
1339
|
+
}], InitialTab: [{
|
|
1340
|
+
type: Input
|
|
1341
|
+
}], InitialStarterKind: [{
|
|
1342
|
+
type: Input
|
|
1343
|
+
}], DefaultCollectionId: [{
|
|
1344
|
+
type: Input
|
|
1345
|
+
}], Collections: [{
|
|
1346
|
+
type: Input
|
|
1347
|
+
}], AvailableItems: [{
|
|
1348
|
+
type: Input
|
|
1349
|
+
}], DefaultSelectedArtifactIds: [{
|
|
1350
|
+
type: Input
|
|
1351
|
+
}], EnvironmentId: [{
|
|
1352
|
+
type: Input
|
|
1353
|
+
}], CurrentUser: [{
|
|
1354
|
+
type: Input
|
|
1355
|
+
}], Created: [{
|
|
1356
|
+
type: Output
|
|
1357
|
+
}], Synthesized: [{
|
|
1358
|
+
type: Output
|
|
1359
|
+
}], Cancelled: [{
|
|
1360
|
+
type: Output
|
|
1361
|
+
}] }); })();
|
|
1362
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LibraryCreateDialogComponent, { className: "LibraryCreateDialogComponent", filePath: "src/lib/components/library/library-create-dialog.component.ts", lineNumber: 870 }); })();
|
|
1363
|
+
/**
|
|
1364
|
+
* Dialog for publishing a snapshot of a native MJ Artifact directly into an external Connected Drive
|
|
1365
|
+
* (`.docx`, `.xlsx`, `.pptx`, `.md`, `.csv`, `.json`, `.sql`) with zero `MJ: Files` rows created.
|
|
1366
|
+
*/
|
|
1367
|
+
export class LibraryExportDriveDialogComponent extends BaseAngularComponent {
|
|
1368
|
+
_isOpen = false;
|
|
1369
|
+
set IsOpen(value) {
|
|
1370
|
+
const next = Boolean(value);
|
|
1371
|
+
const wasOpen = this._isOpen;
|
|
1372
|
+
this._isOpen = next;
|
|
1373
|
+
if (next && !wasOpen) {
|
|
1374
|
+
this.initializeExportDialogOnOpen();
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
get IsOpen() {
|
|
1378
|
+
return this._isOpen;
|
|
1379
|
+
}
|
|
1380
|
+
Item = null;
|
|
1381
|
+
VersionNumber = null;
|
|
1382
|
+
Drives = [];
|
|
1383
|
+
CurrentUser;
|
|
1384
|
+
StorageClientOverride = null;
|
|
1385
|
+
Published = new EventEmitter();
|
|
1386
|
+
Cancelled = new EventEmitter();
|
|
1387
|
+
SelectedAccountId = '';
|
|
1388
|
+
FolderPrefix = '';
|
|
1389
|
+
SelectedFormat = 'docx';
|
|
1390
|
+
FormatOptions = [];
|
|
1391
|
+
FileName = '';
|
|
1392
|
+
IsExporting = false;
|
|
1393
|
+
ErrorMessage = '';
|
|
1394
|
+
PendingOverwritePath = null;
|
|
1395
|
+
creationService = inject(LibraryCreationService);
|
|
1396
|
+
notifications = inject(MJNotificationService);
|
|
1397
|
+
cdr = inject(ChangeDetectorRef);
|
|
1398
|
+
get EffectiveVersionNumber() {
|
|
1399
|
+
return this.VersionNumber ?? this.Item?.LatestVersionNumber ?? 1;
|
|
1400
|
+
}
|
|
1401
|
+
initializeExportDialogOnOpen() {
|
|
1402
|
+
if (this.IsOpen && this.Item) {
|
|
1403
|
+
this.FormatOptions = this.creationService.GetSupportedDriveExportFormats(this.Item.DriverClass, this.Item.TypeName, this.Item.ContentMode, this.Item.FileName);
|
|
1404
|
+
this.SelectedFormat = this.FormatOptions[0]?.Format ?? 'txt';
|
|
1405
|
+
this.SelectedAccountId = this.Drives[0]?.AccountId ?? '';
|
|
1406
|
+
this.FileName = this.Item.Name;
|
|
1407
|
+
this.ErrorMessage = '';
|
|
1408
|
+
this.PendingOverwritePath = null;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
ClearOverwritePrompt() {
|
|
1412
|
+
this.PendingOverwritePath = null;
|
|
1413
|
+
this.ErrorMessage = '';
|
|
1414
|
+
}
|
|
1415
|
+
async ExportNow(confirmOverwrite = false) {
|
|
1416
|
+
if (!this.Item || !this.SelectedAccountId || this.IsExporting)
|
|
1417
|
+
return;
|
|
1418
|
+
this.IsExporting = true;
|
|
1419
|
+
this.ErrorMessage = '';
|
|
1420
|
+
this.cdr.detectChanges();
|
|
1421
|
+
try {
|
|
1422
|
+
const versionEntity = await this.resolveTargetVersionEntity(this.Item);
|
|
1423
|
+
const content = versionEntity?.Content ?? '';
|
|
1424
|
+
const configuration = versionEntity?.Configuration ?? null;
|
|
1425
|
+
const published = await this.creationService.PublishArtifactVersionToConnectedDrive({
|
|
1426
|
+
ArtifactName: this.Item.Name,
|
|
1427
|
+
VersionContent: content,
|
|
1428
|
+
VersionConfiguration: configuration,
|
|
1429
|
+
VersionContentMode: versionEntity?.ContentMode ?? this.Item.ContentMode,
|
|
1430
|
+
ArtifactVersionID: versionEntity?.ID ?? this.Item.LatestVersionId,
|
|
1431
|
+
VersionFileID: versionEntity?.FileID ?? null,
|
|
1432
|
+
VersionMimeType: versionEntity?.MimeType ?? this.Item.MimeType,
|
|
1433
|
+
VersionFileName: versionEntity?.FileName ?? this.Item.FileName,
|
|
1434
|
+
Format: this.SelectedFormat,
|
|
1435
|
+
AccountID: this.SelectedAccountId,
|
|
1436
|
+
TargetFolderPrefix: this.FolderPrefix,
|
|
1437
|
+
TargetFileName: this.FileName,
|
|
1438
|
+
AllowOverwrite: confirmOverwrite,
|
|
1439
|
+
CurrentUser: this.CurrentUser,
|
|
1440
|
+
Provider: this.ProviderToUse,
|
|
1441
|
+
StorageClientOverride: this.StorageClientOverride ?? undefined,
|
|
1442
|
+
});
|
|
1443
|
+
this.PendingOverwritePath = null;
|
|
1444
|
+
this.notifications.CreateSimpleNotification(`Published "${published.ObjectPath}" to Connected Drive`, 'success', 3500);
|
|
1445
|
+
this.Published.emit({
|
|
1446
|
+
AccountId: this.SelectedAccountId,
|
|
1447
|
+
ObjectPath: published.ObjectPath,
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
catch (err) {
|
|
1451
|
+
if (err instanceof RemoteDriveFileExistsError) {
|
|
1452
|
+
this.PendingOverwritePath = err.ObjectPath;
|
|
1453
|
+
this.ErrorMessage = '';
|
|
1454
|
+
}
|
|
1455
|
+
else {
|
|
1456
|
+
this.ErrorMessage = err instanceof Error ? err.message : 'Export to Connected Drive failed.';
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
finally {
|
|
1460
|
+
this.IsExporting = false;
|
|
1461
|
+
this.cdr.detectChanges();
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
async resolveTargetVersionEntity(item) {
|
|
1465
|
+
const targetVersion = this.VersionNumber ?? item.LatestVersionNumber;
|
|
1466
|
+
if (this.VersionNumber != null && this.VersionNumber !== item.LatestVersionNumber) {
|
|
1467
|
+
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
1468
|
+
const res = await rv.RunView({
|
|
1469
|
+
EntityName: 'MJ: Artifact Versions',
|
|
1470
|
+
ExtraFilter: `ArtifactID='${EscapeSQLString(item.Id)}' AND VersionNumber=${Number(targetVersion)}`,
|
|
1471
|
+
MaxRows: 1,
|
|
1472
|
+
ResultType: 'entity_object',
|
|
1473
|
+
}, this.CurrentUser);
|
|
1474
|
+
if (res.Success && res.Results && res.Results.length > 0) {
|
|
1475
|
+
return res.Results[0];
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
if (item.LatestVersionId) {
|
|
1479
|
+
return ArtifactMetadataEngine.Instance.GetVersionContent(item.LatestVersionId, this.CurrentUser, this.ProviderToUse);
|
|
1480
|
+
}
|
|
1481
|
+
return undefined;
|
|
1482
|
+
}
|
|
1483
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵLibraryExportDriveDialogComponent_BaseFactory; return function LibraryExportDriveDialogComponent_Factory(__ngFactoryType__) { return (ɵLibraryExportDriveDialogComponent_BaseFactory || (ɵLibraryExportDriveDialogComponent_BaseFactory = i0.ɵɵgetInheritedFactory(LibraryExportDriveDialogComponent)))(__ngFactoryType__ || LibraryExportDriveDialogComponent); }; })();
|
|
1484
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LibraryExportDriveDialogComponent, selectors: [["mj-library-export-drive-dialog"]], inputs: { IsOpen: "IsOpen", Item: "Item", VersionNumber: "VersionNumber", Drives: "Drives", CurrentUser: "CurrentUser", StorageClientOverride: "StorageClientOverride" }, outputs: { Published: "Published", Cancelled: "Cancelled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "Title", "Visible", "Width", "MinWidth"], [3, "Close", "Title", "Visible", "Width", "MinWidth"], ["data-testid", "library-export-drive-dialog", 1, "export-dialog-body"], [1, "field-group"], ["for", "lib-export-drive", 1, "field-label"], ["id", "lib-export-drive", 1, "field-select", 3, "ngModelChange", "ngModel"], [3, "value"], ["for", "lib-export-folder", 1, "field-label"], ["id", "lib-export-folder", "type", "text", "placeholder", "e.g. Exports/2026", 1, "field-input", 3, "ngModelChange", "ngModel"], [1, "field-row"], [1, "field-group", "flex-1"], ["for", "lib-export-format", 1, "field-label"], ["id", "lib-export-format", 1, "field-select", 3, "ngModelChange", "ngModel"], ["for", "lib-export-filename", 1, "field-label"], ["id", "lib-export-filename", "type", "text", 1, "field-input", 3, "ngModelChange", "ngModel"], [1, "stateless-note"], [1, "fa-solid", "fa-cloud-arrow-up"], ["Variant", "warning", "data-testid", "library-export-overwrite-alert"], ["Variant", "error"], ["type", "button", "mjButton", "", "variant", "primary", "data-testid", "library-export-confirm-btn", 3, "click", "disabled"], ["type", "button", "mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-triangle-exclamation"]], template: function LibraryExportDriveDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1485
|
+
i0.ɵɵconditionalCreate(0, LibraryExportDriveDialogComponent_Conditional_0_Template, 36, 14, "mj-dialog", 0);
|
|
1486
|
+
} if (rf & 2) {
|
|
1487
|
+
i0.ɵɵconditional(ctx.IsOpen && ctx.Item ? 0 : -1);
|
|
1488
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.MJButtonDirective, i2.MJDialogComponent, i2.MJDialogActionsComponent, i2.MJAlertComponent], styles: [".export-dialog-body[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-2) 0;\n }\n\n .field-row[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-3);\n }\n\n .flex-1[_ngcontent-%COMP%] {\n flex: 1;\n }\n\n .field-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .field-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .field-input[_ngcontent-%COMP%], \n .field-select[_ngcontent-%COMP%] {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 12px;\n border-radius: var(--mj-radius-sm);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: var(--mj-text-sm);\n }\n\n .stateless-note[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-2-5);\n padding: var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-border-default));\n font-size: 12px;\n color: var(--mj-text-secondary);\n }\n\n .stateless-note[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n margin-top: 2px;\n }"] });
|
|
1489
|
+
}
|
|
1490
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LibraryExportDriveDialogComponent, [{
|
|
1491
|
+
type: Component,
|
|
1492
|
+
args: [{ standalone: false, selector: 'mj-library-export-drive-dialog', template: `
|
|
1493
|
+
@if (IsOpen && Item) {
|
|
1494
|
+
<mj-dialog
|
|
1495
|
+
[Title]="'Export to Connected Drive: ' + Item.Name + ' (v' + EffectiveVersionNumber + ')'"
|
|
1496
|
+
[Visible]="true"
|
|
1497
|
+
[Width]="540"
|
|
1498
|
+
[MinWidth]="380"
|
|
1499
|
+
(Close)="Cancelled.emit()"
|
|
1500
|
+
>
|
|
1501
|
+
<div class="export-dialog-body" data-testid="library-export-drive-dialog">
|
|
1502
|
+
<div class="field-group">
|
|
1503
|
+
<label class="field-label" for="lib-export-drive">Destination Connected Drive</label>
|
|
1504
|
+
<select
|
|
1505
|
+
id="lib-export-drive"
|
|
1506
|
+
class="field-select"
|
|
1507
|
+
[(ngModel)]="SelectedAccountId"
|
|
1508
|
+
(ngModelChange)="ClearOverwritePrompt()"
|
|
1509
|
+
>
|
|
1510
|
+
@for (drive of Drives; track drive.AccountId) {
|
|
1511
|
+
<option [value]="drive.AccountId">
|
|
1512
|
+
{{ drive.AccountName }} ({{ drive.ProviderName }})
|
|
1513
|
+
</option>
|
|
1514
|
+
}
|
|
1515
|
+
</select>
|
|
1516
|
+
</div>
|
|
1517
|
+
|
|
1518
|
+
<div class="field-group">
|
|
1519
|
+
<label class="field-label" for="lib-export-folder">Remote Folder Path (optional)</label>
|
|
1520
|
+
<input
|
|
1521
|
+
id="lib-export-folder"
|
|
1522
|
+
type="text"
|
|
1523
|
+
class="field-input"
|
|
1524
|
+
[(ngModel)]="FolderPrefix"
|
|
1525
|
+
(ngModelChange)="ClearOverwritePrompt()"
|
|
1526
|
+
placeholder="e.g. Exports/2026"
|
|
1527
|
+
/>
|
|
1528
|
+
</div>
|
|
1529
|
+
|
|
1530
|
+
<div class="field-row">
|
|
1531
|
+
<div class="field-group flex-1">
|
|
1532
|
+
<label class="field-label" for="lib-export-format">Export Format</label>
|
|
1533
|
+
<select
|
|
1534
|
+
id="lib-export-format"
|
|
1535
|
+
class="field-select"
|
|
1536
|
+
[(ngModel)]="SelectedFormat"
|
|
1537
|
+
(ngModelChange)="ClearOverwritePrompt()"
|
|
1538
|
+
>
|
|
1539
|
+
@for (fmt of FormatOptions; track fmt.Format) {
|
|
1540
|
+
<option [value]="fmt.Format">{{ fmt.Label }}</option>
|
|
1541
|
+
}
|
|
1542
|
+
</select>
|
|
1543
|
+
</div>
|
|
1544
|
+
<div class="field-group flex-1">
|
|
1545
|
+
<label class="field-label" for="lib-export-filename">File Name</label>
|
|
1546
|
+
<input
|
|
1547
|
+
id="lib-export-filename"
|
|
1548
|
+
type="text"
|
|
1549
|
+
class="field-input"
|
|
1550
|
+
[(ngModel)]="FileName"
|
|
1551
|
+
(ngModelChange)="ClearOverwritePrompt()"
|
|
1552
|
+
/>
|
|
1553
|
+
</div>
|
|
1554
|
+
</div>
|
|
1555
|
+
|
|
1556
|
+
<div class="stateless-note">
|
|
1557
|
+
<i class="fa-solid fa-cloud-arrow-up"></i>
|
|
1558
|
+
<span>
|
|
1559
|
+
Writes version v{{ EffectiveVersionNumber }} directly to the selected external drive without creating duplicate MJ: Files database records.
|
|
1560
|
+
</span>
|
|
1561
|
+
</div>
|
|
1562
|
+
|
|
1563
|
+
@if (PendingOverwritePath) {
|
|
1564
|
+
<mj-alert Variant="warning" data-testid="library-export-overwrite-alert">
|
|
1565
|
+
A file already exists at <strong>{{ PendingOverwritePath }}</strong>. Click
|
|
1566
|
+
<strong>Overwrite Existing File</strong> to replace it, or change the file name above.
|
|
1567
|
+
</mj-alert>
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
@if (ErrorMessage) {
|
|
1571
|
+
<mj-alert Variant="error">{{ ErrorMessage }}</mj-alert>
|
|
1572
|
+
}
|
|
1573
|
+
</div>
|
|
1574
|
+
|
|
1575
|
+
<mj-dialog-actions>
|
|
1576
|
+
<button
|
|
1577
|
+
type="button"
|
|
1578
|
+
mjButton
|
|
1579
|
+
variant="primary"
|
|
1580
|
+
[disabled]="!SelectedAccountId || IsExporting"
|
|
1581
|
+
(click)="ExportNow(!!PendingOverwritePath)"
|
|
1582
|
+
data-testid="library-export-confirm-btn"
|
|
1583
|
+
>
|
|
1584
|
+
@if (IsExporting) {
|
|
1585
|
+
<i class="fa-solid fa-spinner fa-spin"></i>
|
|
1586
|
+
Publishing…
|
|
1587
|
+
} @else if (PendingOverwritePath) {
|
|
1588
|
+
<i class="fa-solid fa-triangle-exclamation"></i>
|
|
1589
|
+
Overwrite Existing File
|
|
1590
|
+
} @else {
|
|
1591
|
+
<i class="fa-solid fa-cloud-arrow-up"></i>
|
|
1592
|
+
Publish to Drive
|
|
1593
|
+
}
|
|
1594
|
+
</button>
|
|
1595
|
+
<button type="button" mjButton [disabled]="IsExporting" (click)="Cancelled.emit()">
|
|
1596
|
+
Cancel
|
|
1597
|
+
</button>
|
|
1598
|
+
</mj-dialog-actions>
|
|
1599
|
+
</mj-dialog>
|
|
1600
|
+
}
|
|
1601
|
+
`, styles: ["\n .export-dialog-body {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-2) 0;\n }\n\n .field-row {\n display: flex;\n gap: var(--mj-space-3);\n }\n\n .flex-1 {\n flex: 1;\n }\n\n .field-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .field-label {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .field-input,\n .field-select {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 12px;\n border-radius: var(--mj-radius-sm);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: var(--mj-text-sm);\n }\n\n .stateless-note {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-2-5);\n padding: var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-border-default));\n font-size: 12px;\n color: var(--mj-text-secondary);\n }\n\n .stateless-note i {\n color: var(--mj-brand-primary);\n margin-top: 2px;\n }\n "] }]
|
|
1602
|
+
}], null, { IsOpen: [{
|
|
1603
|
+
type: Input
|
|
1604
|
+
}], Item: [{
|
|
1605
|
+
type: Input
|
|
1606
|
+
}], VersionNumber: [{
|
|
1607
|
+
type: Input
|
|
1608
|
+
}], Drives: [{
|
|
1609
|
+
type: Input
|
|
1610
|
+
}], CurrentUser: [{
|
|
1611
|
+
type: Input
|
|
1612
|
+
}], StorageClientOverride: [{
|
|
1613
|
+
type: Input
|
|
1614
|
+
}], Published: [{
|
|
1615
|
+
type: Output
|
|
1616
|
+
}], Cancelled: [{
|
|
1617
|
+
type: Output
|
|
1618
|
+
}] }); })();
|
|
1619
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LibraryExportDriveDialogComponent, { className: "LibraryExportDriveDialogComponent", filePath: "src/lib/components/library/library-create-dialog.component.ts", lineNumber: 1396 }); })();
|
|
1620
|
+
//# sourceMappingURL=library-create-dialog.component.js.map
|