@memberjunction/ng-conversations 6.3.0-edge.1 → 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 +13 -0
- package/dist/assets/edge-ai.worker.js +3451 -798
- 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.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +289 -266
- package/dist/lib/components/artifact/artifact-share-modal.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 +59 -9
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +645 -416
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +5 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +100 -56
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/library/library-workspace.component.d.ts +30 -2
- package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-workspace.component.js +1342 -641
- package/dist/lib/components/library/library-workspace.component.js.map +1 -1
- package/dist/lib/components/library/library.models.d.ts +33 -3
- package/dist/lib/components/library/library.models.d.ts.map +1 -1
- package/dist/lib/components/library/library.models.js.map +1 -1
- 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/message-input.component.d.ts +7 -0
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +52 -20
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +17 -4
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +58 -8
- 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 +73 -3
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +30 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -1
- 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/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 +2 -2
- 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 +2 -2
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +20 -11
- 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 +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +7 -0
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.js +19 -0
- package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +13 -2
- 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 +3 -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 +9 -0
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.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.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +9 -0
- package/dist/lib/components/task/tasks-full-view.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 -76
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +8 -0
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +23 -18
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +75 -32
- package/dist/lib/services/conversation-agent.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/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/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +37 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/share/share-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAA6B,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,8CAA8C,EAC9C,kBAAkB,EAClB,wBAAwB,EAIzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAY,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;;;;;;;;;IAwBvD,AADF,8BAAwC,SAClC;IAAA,6BAAa;IAAA,iBAAK;IAEpB,AADF,iCAAyC,gBAImB;IADxD,gVAAiC;IACjC,2NAAiB,0CAAmC,KAAC;IAHvD,iBAG0D;IAC1D,4BAAM;IAAA,0CAA0B;IAClC,AADkC,iBAAO,EACjC;IACR,6BAAmC;IACjC,YAGF;IACF,AADE,iBAAI,EACA;;;IATA,eAAiC;IAAjC,0DAAiC;IAKnC,eAGF;IAHE,+OAGF;;;IAqBE,qCAGmB;;;IAiBX,kCAA8B;IAAA,YAAiB;IAAA,iBAAS;;;IAAhD,sCAAqB;IAAC,cAAiB;IAAjB,oCAAiB;;;;IAbrD,AADF,+BAA6B,cACJ;IACrB,wBAAkC;IAEhC,AADF,+BAA0B,cACD;IAAA,YAAyB;IAAA,iBAAM;IACtD,+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C,OAAO;QACL,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;6GAnZU,mBAAmB;6DAAnB,mBAAmB;YA5I5B,4FAAc;;YAAd,qCAyGC;;;iFAmCQ,mBAAmB;cAhJ/B,SAAS;6BACI,KAAK,YACP,gBAAgB,YAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2GP;;kBAmCF,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kFAzCI,mBAAmB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport {\n BuildUpdatedAdditionalDataForFolderInheritance,\n ConversationEngine,\n IsInheritingFolderAccess,\n MJConversationEntity,\n MJResourcePermissionEntity,\n MJUserEntity\n} from '@memberjunction/core-entities';\nimport { UserInfo, RunView, Metadata } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { DialogService } from '../../services/dialog.service';\nimport { ToastService } from '../../services/toast.service';\nimport { ConfirmInheritFolderAccess } from '../../utils/folder-move';\n\ninterface SharePermission {\n permissionId: string | null;\n userId: string;\n userEmail: string;\n userName: string;\n permissionLevel: 'View' | 'Edit' | 'Owner';\n}\n\n@Component({\n standalone: false,\n selector: 'mj-share-modal',\n template: `\n @if (isOpen) {\n <mj-dialog\n [Title]=\"'Share: ' + (conversation.Name || '')\"\n [Width]=\"500\"\n [Height]=\"600\"\n [Visible]=\"true\"\n (Close)=\"onClose()\">\n <div class=\"share-content\">\n @if (conversation?.ProjectID && IsConversationOwner) {\n <div class=\"folder-inheritance-section\">\n <h4>Folder Access</h4>\n <label class=\"folder-inheritance-toggle\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"InheritFolderAccess\"\n (ngModelChange)=\"OnToggleInheritFolderAccess($event)\" />\n <span>Inherit access from folder</span>\n </label>\n <p class=\"folder-inheritance-hint\">\n {{ InheritFolderAccess\n ? 'People with access to this folder see this conversation in their list.'\n : 'People with access to this folder do not see this conversation in their list. People added below do.' }}\n </p>\n </div>\n }\n <div class=\"add-user-section\">\n <h4>Add People</h4>\n <div class=\"add-user-form\">\n <input\n type=\"text\"\n [(ngModel)]=\"newUserEmail\"\n placeholder=\"Enter email address\"\n class=\"mj-textbox\"\n style=\"flex: 1;\">\n <button mjButton variant=\"primary\" (click)=\"onAddUser()\">\n Add\n </button>\n </div>\n </div>\n <div class=\"permissions-section\">\n <h4>People with Access</h4>\n <div class=\"permission-list\">\n @if (permissions.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-user-group\"\n Title=\"No one has been given access yet\"\n Size=\"compact\" />\n }\n @for (permission of permissions; track permission) {\n <div class=\"permission-item\">\n <div class=\"user-info\">\n <i class=\"fas fa-user-circle\"></i>\n <div class=\"user-details\">\n <div class=\"user-name\">{{ permission.userName }}</div>\n <div class=\"user-email\">{{ permission.userEmail }}</div>\n </div>\n </div>\n <div class=\"permission-controls\">\n <select\n [ngModel]=\"permission.permissionLevel\"\n (ngModelChange)=\"onAccessLevelChange(permission, $event)\"\n style=\"width: 120px;\" class=\"mj-select\">\n @for (level of accessLevels; track level.value) {\n <option [value]=\"level.value\">{{ level.label }}</option>\n }\n </select>\n <button\n class=\"btn-remove\"\n (click)=\"onRemoveUser(permission)\"\n title=\"Remove access\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n <div class=\"link-section\">\n <h4>Share Link</h4>\n <div class=\"link-controls\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"isPublicLink\"\n (ngModelChange)=\"onTogglePublicLink()\">\n <label>Anyone with the link can view</label>\n </div>\n @if (isPublicLink) {\n <div class=\"link-display\">\n <input\n type=\"text\"\n [value]=\"shareLink\"\n readonly\n class=\"mj-textbox\"\n style=\"flex: 1;\">\n <button mjButton variant=\"flat\" (click)=\"onCopyLink()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n }\n </div>\n </div>\n <mj-dialog-actions>\n <button mjButton (click)=\"onClose()\">Close</button>\n </mj-dialog-actions>\n </mj-dialog>\n }\n `,\n styles: [`\n .share-content { display: flex; flex-direction: column; gap: 24px; }\n\n .folder-inheritance-section h4,\n .add-user-section h4,\n .permissions-section h4,\n .link-section h4 { margin: 0 0 12px 0; font-size: 14px; font-weight: 600; }\n\n .folder-inheritance-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }\n .folder-inheritance-hint { margin: 6px 0 0 0; font-size: 12px; color: #666; line-height: 1.4; }\n\n .add-user-form { display: flex; gap: 8px; }\n\n .permission-list { border: 1px solid #D9D9D9; border-radius: 4px; max-height: 300px; overflow-y: auto; }\n .permission-item { padding: 12px; border-bottom: 1px solid #E8E8E8; display: flex; justify-content: space-between; align-items: center; }\n .permission-item:last-child { border-bottom: none; }\n\n .user-info { display: flex; align-items: center; gap: 12px; flex: 1; }\n .user-info i { font-size: 32px; color: #999; }\n .user-details { display: flex; flex-direction: column; }\n .user-name { font-size: 14px; font-weight: 500; }\n .user-email { font-size: 12px; color: #666; }\n\n .permission-controls { display: flex; align-items: center; gap: 8px; }\n .btn-remove { padding: 6px 8px; background: transparent; border: none; cursor: pointer; border-radius: 3px; color: #999; }\n .btn-remove:hover { background: #FFEBEE; color: #D32F2F; }\n\n .link-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }\n .link-controls label { font-size: 13px; }\n\n .link-display { display: flex; gap: 8px; }\n `]\n})\nexport class ShareModalComponent extends BaseAngularComponent implements OnInit {\n @Input() Conversation!: MJConversationEntity;\n\n /** @deprecated Use {@link Conversation}. */\n @Input() set conversation(value: MJConversationEntity) {\n this.Conversation = value;\n }\n /** @deprecated Use {@link Conversation}. */\n get conversation(): MJConversationEntity {\n return this.Conversation;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n @Input() IsOpen: boolean = false;\n\n /** @deprecated Use {@link IsOpen}. */\n @Input() set isOpen(value: boolean) {\n this.IsOpen = value;\n }\n /** @deprecated Use {@link IsOpen}. */\n get isOpen(): boolean {\n return this.IsOpen;\n }\n\n @Output() Closed = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Closed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (closed) keeps working. Must stay AFTER Closed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() closed = this.Closed;\n\n public Permissions: SharePermission[] = [];\n\n /** @deprecated Use {@link Permissions}. */\n public get permissions(): SharePermission[] {\n return this.Permissions;\n }\n /** @deprecated Use {@link Permissions}. */\n public set permissions(value: SharePermission[]) {\n this.Permissions = value;\n }\n public NewUserEmail: string = '';\n\n /** @deprecated Use {@link NewUserEmail}. */\n public get newUserEmail(): string {\n return this.NewUserEmail;\n }\n /** @deprecated Use {@link NewUserEmail}. */\n public set newUserEmail(value: string) {\n this.NewUserEmail = value;\n }\n public IsPublicLink: boolean = false;\n\n /** @deprecated Use {@link IsPublicLink}. */\n public get isPublicLink(): boolean {\n return this.IsPublicLink;\n }\n /** @deprecated Use {@link IsPublicLink}. */\n public set isPublicLink(value: boolean) {\n this.IsPublicLink = value;\n }\n public ShareLink: string = '';\n\n /** @deprecated Use {@link ShareLink}. */\n public get shareLink(): string {\n return this.ShareLink;\n }\n /** @deprecated Use {@link ShareLink}. */\n public set shareLink(value: string) {\n this.ShareLink = value;\n }\n\n public InheritFolderAccess: boolean = false;\n\n public AccessLevels = [\n { label: 'Can View', value: 'View' },\n { label: 'Can Edit', value: 'Edit' },\n { label: 'Owner', value: 'Owner' }\n ];\n\n /** @deprecated Use {@link AccessLevels}. */\n public get accessLevels() {\n return this.AccessLevels;\n }\n /** @deprecated Use {@link AccessLevels}. */\n public set accessLevels(value) {\n this.AccessLevels = value;\n }\n\n private readonly CONVERSATIONS_RESOURCE_TYPE_ID = '81D4BC3D-9FEB-EF11-B01A-286B35C04427';\n\n constructor(\n private dialogService: DialogService,\n private toastService: ToastService,\n private cdr: ChangeDetectorRef\n ) {\n super();}\n\n ngOnInit() {\n if (this.Conversation) {\n this.InheritFolderAccess = IsInheritingFolderAccess(this.Conversation);\n this.loadPermissions();\n this.updateShareLink();\n }\n }\n\n /**\n * True when the current user owns the conversation. Only the owner may change whether it inherits its\n * folder's access; the server refuses anyone else (`MJConversationEntityServer`).\n */\n public get IsConversationOwner(): boolean {\n return !!this.Conversation?.UserID && !!this.CurrentUser && UUIDsEqual(this.Conversation.UserID, this.CurrentUser.ID);\n }\n\n async OnToggleInheritFolderAccess(inherit: boolean): Promise<void> {\n if (!this.Conversation) return;\n const engine = ConversationEngine.Instance;\n if (inherit && !(await ConfirmInheritFolderAccess(this.dialogService, engine, this.Conversation.ProjectID))) {\n this.InheritFolderAccess = false;\n this.cdr.detectChanges();\n return;\n }\n try {\n let saved = false;\n if (engine?.SetConversationFolderInheritance && engine.GetConversation(this.Conversation.ID)) {\n saved = await engine.SetConversationFolderInheritance(\n this.Conversation.ID,\n inherit,\n this.CurrentUser\n );\n } else {\n this.Conversation.AdditionalData = BuildUpdatedAdditionalDataForFolderInheritance(\n this.Conversation.AdditionalData,\n inherit\n );\n saved = await this.Conversation.Save();\n }\n if (!saved) {\n this.InheritFolderAccess = !inherit;\n this.toastService.error('Failed to update folder access inheritance');\n } else {\n this.toastService.success(\n inherit\n ? 'Folder access inheritance enabled'\n : 'Folder access restricted for this conversation'\n );\n }\n } catch (err) {\n console.error('Failed to update folder inheritance:', err);\n this.InheritFolderAccess = !inherit;\n this.toastService.error('Failed to update folder access inheritance');\n } finally {\n this.cdr.detectChanges();\n }\n }\n\n private async loadPermissions(): Promise<void> {\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJResourcePermissionEntity>({\n EntityName: 'MJ: Resource Permissions',\n ExtraFilter: `ResourceTypeID='${this.CONVERSATIONS_RESOURCE_TYPE_ID}' AND ResourceRecordID='${this.Conversation.ID}' AND Status='Approved'`,\n ResultType: 'entity_object'\n });\n\n if (result.Success && result.Results) {\n const permissionPromises = result.Results.map(async (perm) => {\n if (perm.UserID) {\n const userRv = RunView.FromMetadataProvider(this.ProviderToUse);\n const userResult = await userRv.RunView<MJUserEntity>({\n EntityName: 'MJ: Users',\n ExtraFilter: `ID='${perm.UserID}'`,\n ResultType: 'entity_object'\n });\n\n if (userResult.Success && userResult.Results && userResult.Results.length > 0) {\n const user = userResult.Results[0];\n return {\n permissionId: perm.ID,\n userId: perm.UserID,\n userEmail: user.Email,\n userName: user.Name,\n permissionLevel: perm.PermissionLevel || 'View'\n } as SharePermission;\n }\n }\n return null;\n });\n\n const resolvedPermissions = await Promise.all(permissionPromises);\n this.Permissions = resolvedPermissions.filter(p => p !== null) as SharePermission[];\n }\n } catch (error) {\n console.error('Failed to load permissions:', error);\n } finally {\n this.cdr.detectChanges();\n }\n }\n\n GetAccessLevel(permission: SharePermission): string {\n return permission.permissionLevel;\n }\n\n /** @deprecated Use {@link GetAccessLevel}. */\n getAccessLevel(permission: SharePermission): string {\n return this.GetAccessLevel(permission);\n }\n\n async OnAccessLevelChange(permission: SharePermission, level: 'View' | 'Edit' | 'Owner'): Promise<void> {\n permission.permissionLevel = level;\n await this.savePermission(permission);\n }\n\n /** @deprecated Use {@link OnAccessLevelChange}. */\n async onAccessLevelChange(permission: SharePermission, level: 'View' | 'Edit' | 'Owner'): Promise<void> {\n return this.OnAccessLevelChange(permission, level);\n }\n\n async OnAddUser(): Promise<void> {\n const email = this.NewUserEmail.trim();\n if (!email) return;\n\n // Simple email validation\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) {\n await this.dialogService.alert('Invalid Email', 'Please enter a valid email address');\n return;\n }\n\n // Check if user already has access\n if (this.Permissions.some(p => p.userEmail === email)) {\n await this.dialogService.alert('User Already Has Access', 'This user already has access');\n return;\n }\n\n try {\n // Look up user by email\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const userResult = await rv.RunView<MJUserEntity>({\n EntityName: 'MJ: Users',\n ExtraFilter: `Email='${email}'`,\n ResultType: 'entity_object'\n });\n\n if (!userResult.Success || !userResult.Results || userResult.Results.length === 0) {\n await this.dialogService.alert('User Not Found', 'No user found with that email address');\n return;\n }\n\n const user = userResult.Results[0];\n const newPermission: SharePermission = {\n permissionId: null,\n userId: user.ID,\n userEmail: user.Email,\n userName: user.Name,\n permissionLevel: 'View'\n };\n\n await this.savePermission(newPermission);\n this.Permissions.push(newPermission);\n this.NewUserEmail = '';\n this.toastService.success(`Access granted to ${user.Email}`);\n this.cdr.detectChanges();\n } catch (error) {\n console.error('Failed to add user:', error);\n this.toastService.error('Failed to add user');\n }\n }\n\n /** @deprecated Use {@link OnAddUser}. */\n async onAddUser(): Promise<void> {\n return this.OnAddUser();\n }\n\n async OnRemoveUser(permission: SharePermission): Promise<void> {\n const confirmed = await this.dialogService.confirm({\n title: 'Remove Access',\n message: `Remove access for ${permission.userEmail}?`,\n okText: 'Remove',\n cancelText: 'Cancel'\n });\n\n if (!confirmed) return;\n\n try {\n if (permission.permissionId) {\n const md = this.ProviderToUse;\n const permEntity = await md.GetEntityObject<MJResourcePermissionEntity>('MJ: Resource Permissions');\n await permEntity.Load(permission.permissionId);\n\n const deleteResult = await permEntity.Delete();\n if (!deleteResult) {\n throw new Error('Failed to delete permission');\n }\n }\n\n this.Permissions = this.Permissions.filter(p => p.userId !== permission.userId);\n this.toastService.success(`Access removed for ${permission.userEmail}`);\n } catch (error) {\n console.error('Failed to remove user:', error);\n this.toastService.error('Failed to remove user');\n }\n }\n\n /** @deprecated Use {@link OnRemoveUser}. */\n async onRemoveUser(permission: SharePermission): Promise<void> {\n return this.OnRemoveUser(permission);\n }\n\n private async savePermission(permission: SharePermission): Promise<void> {\n try {\n const md = this.ProviderToUse;\n const permEntity = await md.GetEntityObject<MJResourcePermissionEntity>('MJ: Resource Permissions');\n\n if (permission.permissionId) {\n // Update existing permission\n await permEntity.Load(permission.permissionId);\n permEntity.PermissionLevel = permission.permissionLevel;\n } else {\n // Create new permission\n permEntity.ResourceTypeID = this.CONVERSATIONS_RESOURCE_TYPE_ID;\n permEntity.ResourceRecordID = this.Conversation.ID;\n permEntity.Type = 'User';\n permEntity.UserID = permission.userId;\n permEntity.PermissionLevel = permission.permissionLevel;\n permEntity.Status = 'Approved';\n }\n\n const saveResult = await permEntity.Save();\n if (!saveResult) {\n throw new Error('Failed to save permission');\n }\n\n // Update the permission ID if it was a new permission\n if (!permission.permissionId) {\n permission.permissionId = permEntity.ID;\n }\n } catch (error) {\n console.error('Failed to save permission:', error);\n throw error;\n }\n }\n\n async OnTogglePublicLink(): Promise<void> {\n try {\n // Note: Public link functionality uses the conversation ID directly.\n // For enhanced security with unique tokens, password protection, and expiration,\n // future migration should add: PublicAccessToken, PublicAccessPassword, PublicAccessExpiresAt fields\n this.updateShareLink();\n } catch (error) {\n console.error('Failed to toggle public link:', error);\n await this.dialogService.alert('Error', 'Failed to update sharing settings');\n }\n }\n\n /** @deprecated Use {@link OnTogglePublicLink}. */\n async onTogglePublicLink(): Promise<void> {\n return this.OnTogglePublicLink();\n }\n\n private updateShareLink(): void {\n if (this.IsPublicLink && this.Conversation) {\n // Generate shareable link\n const baseUrl = window.location.origin;\n this.ShareLink = `${baseUrl}/chat/${this.Conversation.ID}`;\n } else {\n this.ShareLink = '';\n }\n }\n\n async OnCopyLink(): Promise<void> {\n try {\n await navigator.clipboard.writeText(this.ShareLink);\n this.toastService.success('Link copied to clipboard');\n } catch (err) {\n console.error('Failed to copy link:', err);\n this.toastService.error('Failed to copy link');\n }\n }\n\n /** @deprecated Use {@link OnCopyLink}. */\n async onCopyLink(): Promise<void> {\n return this.OnCopyLink();\n }\n\n OnClose(): void {\n this.Closed.emit();\n }\n\n /** @deprecated Use {@link OnClose}. */\n onClose(): void {\n return this.OnClose();\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"share-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/share/share-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAA6B,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,8CAA8C,EAC9C,kBAAkB,EAClB,wBAAwB,EAIzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAY,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;;;;;;;;;IAwBvD,AADF,8BAAwC,SAClC;IAAA,6BAAa;IAAA,iBAAK;IAEpB,AADF,iCAAyC,gBAImB;IADxD,gVAAiC;IACjC,2NAAiB,0CAAmC,KAAC;IAHvD,iBAG0D;IAC1D,4BAAM;IAAA,0CAA0B;IAClC,AADkC,iBAAO,EACjC;IACR,6BAAmC;IACjC,YAGF;IACF,AADE,iBAAI,EACA;;;IATA,eAAiC;IAAjC,0DAAiC;IAKnC,eAGF;IAHE,+OAGF;;;;IAKA,AADF,8BAA8B,SACxB;IAAA,0BAAU;IAAA,iBAAK;IAEjB,AADF,+BAA2B,gBAMN;IAHjB,kUAA0B;IAF5B,iBAKmB;IACnB,kCAAyD;IAAtB,sMAAS,kBAAW,KAAC;IACtD,qBACF;IAEJ,AADE,AADE,iBAAS,EACL,EACF;;;IARA,eAA0B;IAA1B,mDAA0B;;;IAUhC,8BAA2E;IACzE,wBAA2B;IAC3B,4BAAM;IAAA,6FAA6E;IACrF,AADqF,iBAAO,EACtF;;;IAMF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A0C;IAC1C,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAED,uCAAuC;IACvC,OAAO;QACL,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;6GAlZU,mBAAmB;6DAAnB,mBAAmB;YA3J5B,4FAAc;;YAAd,qCAsHC;;;iFAqCQ,mBAAmB;cA/J/B,SAAS;6BACI,KAAK,YACP,gBAAgB,YAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwHP;;kBAqCF,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kFAzCI,mBAAmB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport {\n BuildUpdatedAdditionalDataForFolderInheritance,\n ConversationEngine,\n IsInheritingFolderAccess,\n MJConversationEntity,\n MJResourcePermissionEntity,\n MJUserEntity\n} from '@memberjunction/core-entities';\nimport { UserInfo, RunView, Metadata } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { DialogService } from '../../services/dialog.service';\nimport { ToastService } from '../../services/toast.service';\nimport { ConfirmInheritFolderAccess } from '../../utils/folder-move';\n\ninterface SharePermission {\n permissionId: string | null;\n userId: string;\n userEmail: string;\n userName: string;\n permissionLevel: 'View' | 'Edit' | 'Owner';\n}\n\n@Component({\n standalone: false,\n selector: 'mj-share-modal',\n template: `\n @if (isOpen) {\n <mj-dialog\n [Title]=\"'Share: ' + (conversation.Name || '')\"\n [Width]=\"500\"\n [Height]=\"600\"\n [Visible]=\"true\"\n (Close)=\"onClose()\">\n <div class=\"share-content\">\n @if (conversation?.ProjectID && IsConversationOwner) {\n <div class=\"folder-inheritance-section\">\n <h4>Folder Access</h4>\n <label class=\"folder-inheritance-toggle\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"InheritFolderAccess\"\n (ngModelChange)=\"OnToggleInheritFolderAccess($event)\" />\n <span>Inherit access from folder</span>\n </label>\n <p class=\"folder-inheritance-hint\">\n {{ InheritFolderAccess\n ? 'People with access to this folder see this conversation in their list.'\n : 'People with access to this folder do not see this conversation in their list. People added below do.' }}\n </p>\n </div>\n }\n @if (IsConversationOwner) {\n <div class=\"add-user-section\">\n <h4>Add People</h4>\n <div class=\"add-user-form\">\n <input\n type=\"text\"\n [(ngModel)]=\"newUserEmail\"\n placeholder=\"Enter email address\"\n class=\"mj-textbox\"\n style=\"flex: 1;\">\n <button mjButton variant=\"primary\" (click)=\"onAddUser()\">\n Add\n </button>\n </div>\n </div>\n } @else {\n <div class=\"owner-only-notice\" data-testid=\"share-modal-owner-only-notice\">\n <i class=\"fas fa-lock\"></i>\n <span>Only the conversation owner can share or revoke access for this conversation.</span>\n </div>\n }\n <div class=\"permissions-section\">\n <h4>People with Access</h4>\n <div class=\"permission-list\">\n @if (permissions.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-user-group\"\n Title=\"No one has been given access yet\"\n Size=\"compact\" />\n }\n @for (permission of permissions; track permission) {\n <div class=\"permission-item\">\n <div class=\"user-info\">\n <i class=\"fas fa-user-circle\"></i>\n <div class=\"user-details\">\n <div class=\"user-name\">{{ permission.userName }}</div>\n <div class=\"user-email\">{{ permission.userEmail }}</div>\n </div>\n </div>\n @if (IsConversationOwner) {\n <div class=\"permission-controls\">\n <select\n [ngModel]=\"permission.permissionLevel\"\n (ngModelChange)=\"onAccessLevelChange(permission, $event)\"\n style=\"width: 120px;\" class=\"mj-select\">\n @for (level of accessLevels; track level.value) {\n <option [value]=\"level.value\">{{ level.label }}</option>\n }\n </select>\n <button\n class=\"btn-remove\"\n (click)=\"onRemoveUser(permission)\"\n title=\"Remove access\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n } @else {\n <span class=\"permission-readonly-badge\">{{ permission.permissionLevel }}</span>\n }\n </div>\n }\n </div>\n </div>\n @if (IsConversationOwner) {\n <div class=\"link-section\">\n <h4>Share Link</h4>\n <div class=\"link-controls\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"isPublicLink\"\n (ngModelChange)=\"onTogglePublicLink()\">\n <label>Anyone with the link can view</label>\n </div>\n @if (isPublicLink) {\n <div class=\"link-display\">\n <input\n type=\"text\"\n [value]=\"shareLink\"\n readonly\n class=\"mj-textbox\"\n style=\"flex: 1;\">\n <button mjButton variant=\"flat\" (click)=\"onCopyLink()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n }\n </div>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton (click)=\"onClose()\">Close</button>\n </mj-dialog-actions>\n </mj-dialog>\n }\n `,\n styles: [`\n .share-content { display: flex; flex-direction: column; gap: 24px; }\n\n .folder-inheritance-section h4,\n .add-user-section h4,\n .permissions-section h4,\n .link-section h4 { margin: 0 0 12px 0; font-size: 14px; font-weight: 600; color: var(--mj-text-primary); }\n\n .folder-inheritance-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }\n .folder-inheritance-hint { margin: 6px 0 0 0; font-size: 12px; color: var(--mj-text-secondary); line-height: 1.4; }\n .owner-only-notice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--mj-bg-surface-sunken); border: 1px solid var(--mj-border-default); color: var(--mj-text-secondary); font-size: 13px; }\n .permission-readonly-badge { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n\n .add-user-form { display: flex; gap: 8px; }\n\n .permission-list { border: 1px solid var(--mj-border-default); border-radius: 4px; max-height: 300px; overflow-y: auto; }\n .permission-item { padding: 12px; border-bottom: 1px solid var(--mj-border-subtle); display: flex; justify-content: space-between; align-items: center; }\n .permission-item:last-child { border-bottom: none; }\n\n .user-info { display: flex; align-items: center; gap: 12px; flex: 1; }\n .user-info i { font-size: 32px; color: var(--mj-text-muted); }\n .user-details { display: flex; flex-direction: column; }\n .user-name { font-size: 14px; font-weight: 500; color: var(--mj-text-primary); }\n .user-email { font-size: 12px; color: var(--mj-text-secondary); }\n\n .permission-controls { display: flex; align-items: center; gap: 8px; }\n .btn-remove { padding: 6px 8px; background: transparent; border: none; cursor: pointer; border-radius: 3px; color: var(--mj-text-muted); }\n .btn-remove:hover { background: color-mix(in srgb, var(--mj-status-error) 12%, transparent); color: var(--mj-status-error); }\n\n .link-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }\n .link-controls label { font-size: 13px; }\n\n .link-display { display: flex; gap: 8px; }\n `]\n})\nexport class ShareModalComponent extends BaseAngularComponent implements OnInit {\n @Input() Conversation!: MJConversationEntity;\n\n /** @deprecated Use {@link Conversation}. */\n @Input() set conversation(value: MJConversationEntity) {\n this.Conversation = value;\n }\n /** @deprecated Use {@link Conversation}. */\n get conversation(): MJConversationEntity {\n return this.Conversation;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n @Input() IsOpen: boolean = false;\n\n /** @deprecated Use {@link IsOpen}. */\n @Input() set isOpen(value: boolean) {\n this.IsOpen = value;\n }\n /** @deprecated Use {@link IsOpen}. */\n get isOpen(): boolean {\n return this.IsOpen;\n }\n\n @Output() Closed = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Closed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (closed) keeps working. Must stay AFTER Closed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() closed = this.Closed;\n\n public Permissions: SharePermission[] = [];\n\n /** @deprecated Use {@link Permissions}. */\n public get permissions(): SharePermission[] {\n return this.Permissions;\n }\n /** @deprecated Use {@link Permissions}. */\n public set permissions(value: SharePermission[]) {\n this.Permissions = value;\n }\n public NewUserEmail: string = '';\n\n /** @deprecated Use {@link NewUserEmail}. */\n public get newUserEmail(): string {\n return this.NewUserEmail;\n }\n /** @deprecated Use {@link NewUserEmail}. */\n public set newUserEmail(value: string) {\n this.NewUserEmail = value;\n }\n public IsPublicLink: boolean = false;\n\n /** @deprecated Use {@link IsPublicLink}. */\n public get isPublicLink(): boolean {\n return this.IsPublicLink;\n }\n /** @deprecated Use {@link IsPublicLink}. */\n public set isPublicLink(value: boolean) {\n this.IsPublicLink = value;\n }\n public ShareLink: string = '';\n\n /** @deprecated Use {@link ShareLink}. */\n public get shareLink(): string {\n return this.ShareLink;\n }\n /** @deprecated Use {@link ShareLink}. */\n public set shareLink(value: string) {\n this.ShareLink = value;\n }\n\n public InheritFolderAccess: boolean = false;\n\n public AccessLevels = [\n { label: 'Can View', value: 'View' },\n { label: 'Can Edit', value: 'Edit' }\n ];\n\n /** @deprecated Use {@link AccessLevels}. */\n public get accessLevels() {\n return this.AccessLevels;\n }\n /** @deprecated Use {@link AccessLevels}. */\n public set accessLevels(value) {\n this.AccessLevels = value;\n }\n\n private readonly CONVERSATIONS_RESOURCE_TYPE_ID = '81D4BC3D-9FEB-EF11-B01A-286B35C04427';\n\n constructor(\n private dialogService: DialogService,\n private toastService: ToastService,\n private cdr: ChangeDetectorRef\n ) {\n super();}\n\n ngOnInit() {\n if (this.Conversation) {\n this.InheritFolderAccess = IsInheritingFolderAccess(this.Conversation);\n this.loadPermissions();\n this.updateShareLink();\n }\n }\n\n /**\n * True when the current user owns the conversation. Only the owner may change whether it inherits its\n * folder's access; the server refuses anyone else (`MJConversationEntityServer`).\n */\n public get IsConversationOwner(): boolean {\n return !!this.Conversation?.UserID && !!this.CurrentUser && UUIDsEqual(this.Conversation.UserID, this.CurrentUser.ID);\n }\n\n async OnToggleInheritFolderAccess(inherit: boolean): Promise<void> {\n if (!this.Conversation) return;\n const engine = ConversationEngine.Instance;\n if (inherit && !(await ConfirmInheritFolderAccess(this.dialogService, engine, this.Conversation.ProjectID))) {\n this.InheritFolderAccess = false;\n this.cdr.detectChanges();\n return;\n }\n try {\n let saved = false;\n if (engine?.SetConversationFolderInheritance && engine.GetConversation(this.Conversation.ID)) {\n saved = await engine.SetConversationFolderInheritance(\n this.Conversation.ID,\n inherit,\n this.CurrentUser\n );\n } else {\n this.Conversation.AdditionalData = BuildUpdatedAdditionalDataForFolderInheritance(\n this.Conversation.AdditionalData,\n inherit\n );\n saved = await this.Conversation.Save();\n }\n if (!saved) {\n this.InheritFolderAccess = !inherit;\n this.toastService.error('Failed to update folder access inheritance');\n } else {\n this.toastService.success(\n inherit\n ? 'Folder access inheritance enabled'\n : 'Folder access restricted for this conversation'\n );\n }\n } catch (err) {\n console.error('Failed to update folder inheritance:', err);\n this.InheritFolderAccess = !inherit;\n this.toastService.error('Failed to update folder access inheritance');\n } finally {\n this.cdr.detectChanges();\n }\n }\n\n private async loadPermissions(): Promise<void> {\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJResourcePermissionEntity>({\n EntityName: 'MJ: Resource Permissions',\n ExtraFilter: `ResourceTypeID='${this.CONVERSATIONS_RESOURCE_TYPE_ID}' AND ResourceRecordID='${this.Conversation.ID}' AND Status='Approved'`,\n ResultType: 'entity_object'\n });\n\n if (result.Success && result.Results) {\n const permissionPromises = result.Results.map(async (perm) => {\n if (perm.UserID) {\n const userRv = RunView.FromMetadataProvider(this.ProviderToUse);\n const userResult = await userRv.RunView<MJUserEntity>({\n EntityName: 'MJ: Users',\n ExtraFilter: `ID='${perm.UserID}'`,\n ResultType: 'entity_object'\n });\n\n if (userResult.Success && userResult.Results && userResult.Results.length > 0) {\n const user = userResult.Results[0];\n return {\n permissionId: perm.ID,\n userId: perm.UserID,\n userEmail: user.Email,\n userName: user.Name,\n permissionLevel: perm.PermissionLevel || 'View'\n } as SharePermission;\n }\n }\n return null;\n });\n\n const resolvedPermissions = await Promise.all(permissionPromises);\n this.Permissions = resolvedPermissions.filter(p => p !== null) as SharePermission[];\n }\n } catch (error) {\n console.error('Failed to load permissions:', error);\n } finally {\n this.cdr.detectChanges();\n }\n }\n\n GetAccessLevel(permission: SharePermission): string {\n return permission.permissionLevel;\n }\n\n /** @deprecated Use {@link GetAccessLevel}. */\n getAccessLevel(permission: SharePermission): string {\n return this.GetAccessLevel(permission);\n }\n\n async OnAccessLevelChange(permission: SharePermission, level: 'View' | 'Edit' | 'Owner'): Promise<void> {\n permission.permissionLevel = level;\n await this.savePermission(permission);\n }\n\n /** @deprecated Use {@link OnAccessLevelChange}. */\n async onAccessLevelChange(permission: SharePermission, level: 'View' | 'Edit' | 'Owner'): Promise<void> {\n return this.OnAccessLevelChange(permission, level);\n }\n\n async OnAddUser(): Promise<void> {\n const email = this.NewUserEmail.trim();\n if (!email) return;\n\n // Simple email validation\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) {\n await this.dialogService.alert('Invalid Email', 'Please enter a valid email address');\n return;\n }\n\n // Check if user already has access\n if (this.Permissions.some(p => p.userEmail === email)) {\n await this.dialogService.alert('User Already Has Access', 'This user already has access');\n return;\n }\n\n try {\n // Look up user by email\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const userResult = await rv.RunView<MJUserEntity>({\n EntityName: 'MJ: Users',\n ExtraFilter: `Email='${email}'`,\n ResultType: 'entity_object'\n });\n\n if (!userResult.Success || !userResult.Results || userResult.Results.length === 0) {\n await this.dialogService.alert('User Not Found', 'No user found with that email address');\n return;\n }\n\n const user = userResult.Results[0];\n const newPermission: SharePermission = {\n permissionId: null,\n userId: user.ID,\n userEmail: user.Email,\n userName: user.Name,\n permissionLevel: 'View'\n };\n\n await this.savePermission(newPermission);\n this.Permissions.push(newPermission);\n this.NewUserEmail = '';\n this.toastService.success(`Access granted to ${user.Email}`);\n this.cdr.detectChanges();\n } catch (error) {\n console.error('Failed to add user:', error);\n this.toastService.error('Failed to add user');\n }\n }\n\n /** @deprecated Use {@link OnAddUser}. */\n async onAddUser(): Promise<void> {\n return this.OnAddUser();\n }\n\n async OnRemoveUser(permission: SharePermission): Promise<void> {\n const confirmed = await this.dialogService.confirm({\n title: 'Remove Access',\n message: `Remove access for ${permission.userEmail}?`,\n okText: 'Remove',\n cancelText: 'Cancel'\n });\n\n if (!confirmed) return;\n\n try {\n if (permission.permissionId) {\n const md = this.ProviderToUse;\n const permEntity = await md.GetEntityObject<MJResourcePermissionEntity>('MJ: Resource Permissions');\n await permEntity.Load(permission.permissionId);\n\n const deleteResult = await permEntity.Delete();\n if (!deleteResult) {\n throw new Error('Failed to delete permission');\n }\n }\n\n this.Permissions = this.Permissions.filter(p => p.userId !== permission.userId);\n this.toastService.success(`Access removed for ${permission.userEmail}`);\n } catch (error) {\n console.error('Failed to remove user:', error);\n this.toastService.error('Failed to remove user');\n }\n }\n\n /** @deprecated Use {@link OnRemoveUser}. */\n async onRemoveUser(permission: SharePermission): Promise<void> {\n return this.OnRemoveUser(permission);\n }\n\n private async savePermission(permission: SharePermission): Promise<void> {\n try {\n const md = this.ProviderToUse;\n const permEntity = await md.GetEntityObject<MJResourcePermissionEntity>('MJ: Resource Permissions');\n\n if (permission.permissionId) {\n // Update existing permission\n await permEntity.Load(permission.permissionId);\n permEntity.PermissionLevel = permission.permissionLevel;\n } else {\n // Create new permission\n permEntity.ResourceTypeID = this.CONVERSATIONS_RESOURCE_TYPE_ID;\n permEntity.ResourceRecordID = this.Conversation.ID;\n permEntity.Type = 'User';\n permEntity.UserID = permission.userId;\n permEntity.PermissionLevel = permission.permissionLevel;\n permEntity.Status = 'Approved';\n }\n\n const saveResult = await permEntity.Save();\n if (!saveResult) {\n throw new Error('Failed to save permission');\n }\n\n // Update the permission ID if it was a new permission\n if (!permission.permissionId) {\n permission.permissionId = permEntity.ID;\n }\n } catch (error) {\n console.error('Failed to save permission:', error);\n throw error;\n }\n }\n\n async OnTogglePublicLink(): Promise<void> {\n try {\n // Note: Public link functionality uses the conversation ID directly.\n // For enhanced security with unique tokens, password protection, and expiration,\n // future migration should add: PublicAccessToken, PublicAccessPassword, PublicAccessExpiresAt fields\n this.updateShareLink();\n } catch (error) {\n console.error('Failed to toggle public link:', error);\n await this.dialogService.alert('Error', 'Failed to update sharing settings');\n }\n }\n\n /** @deprecated Use {@link OnTogglePublicLink}. */\n async onTogglePublicLink(): Promise<void> {\n return this.OnTogglePublicLink();\n }\n\n private updateShareLink(): void {\n if (this.IsPublicLink && this.Conversation) {\n // Generate shareable link\n const baseUrl = window.location.origin;\n this.ShareLink = `${baseUrl}/chat/${this.Conversation.ID}`;\n } else {\n this.ShareLink = '';\n }\n }\n\n async OnCopyLink(): Promise<void> {\n try {\n await navigator.clipboard.writeText(this.ShareLink);\n this.toastService.success('Link copied to clipboard');\n } catch (err) {\n console.error('Failed to copy link:', err);\n this.toastService.error('Failed to copy link');\n }\n }\n\n /** @deprecated Use {@link OnCopyLink}. */\n async onCopyLink(): Promise<void> {\n return this.OnCopyLink();\n }\n\n OnClose(): void {\n this.Closed.emit();\n }\n\n /** @deprecated Use {@link OnClose}. */\n onClose(): void {\n return this.OnClose();\n }\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { CompositeKey, UserInfo } from '@memberjunction/core';
|
|
3
|
+
import { MJAIAgentEntityExtended } from '@memberjunction/ai-core-plus';
|
|
3
4
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
5
|
import { NavigationTab } from '../../models/conversation-state.model';
|
|
5
6
|
import { BeforeFolderEditEventArgs, AfterFolderEditEventArgs } from '../../events/chat-events';
|
|
@@ -40,6 +41,10 @@ export declare class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
40
41
|
set isMobileView(value: boolean);
|
|
41
42
|
/** @deprecated Use {@link IsMobileView}. */
|
|
42
43
|
get isMobileView(): boolean;
|
|
44
|
+
/** Show the My Agents section at the top of the sidebar (default true). */
|
|
45
|
+
ShowMyAgents: boolean;
|
|
46
|
+
/** Currently active/pinned agent ID in the selected conversation, highlighted in My Agents. */
|
|
47
|
+
ActiveAgentId: string | null;
|
|
43
48
|
/** Show the Routines section at the bottom of the sidebar (bubbled from the workspace; default true). */
|
|
44
49
|
ShowRoutines: boolean;
|
|
45
50
|
/** Show the list's search box. */
|
|
@@ -161,6 +166,14 @@ export declare class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
161
166
|
* initialise in order, and the other way round this captures undefined.
|
|
162
167
|
*/
|
|
163
168
|
afterFolderEdit: EventEmitter<AfterFolderEditEventArgs>;
|
|
169
|
+
/** User clicked one of their personal agent instances in My Agents to open/focus its thread. */
|
|
170
|
+
StartChatWithAgent: EventEmitter<MJAIAgentEntityExtended>;
|
|
171
|
+
/** User explicitly clicked the hover '+' icon on an instance to spin up a fresh chat thread. */
|
|
172
|
+
StartNewChatWithAgent: EventEmitter<MJAIAgentEntityExtended>;
|
|
173
|
+
/** User chose "Chat to Onboard" for an instantiable template agent. */
|
|
174
|
+
StartOnboardingWithTemplate: EventEmitter<MJAIAgentEntityExtended>;
|
|
175
|
+
/** Emitted after a personal agent instance is created, tailored, or archived from the sidebar modal. */
|
|
176
|
+
AgentInstanceChanged: EventEmitter<MJAIAgentEntityExtended | null>;
|
|
164
177
|
OnPinSidebarRequested(): void;
|
|
165
178
|
/** @deprecated Use {@link OnPinSidebarRequested}. */
|
|
166
179
|
onPinSidebarRequested(): void;
|
|
@@ -168,6 +181,6 @@ export declare class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
168
181
|
/** @deprecated Use {@link OnUnpinSidebarRequested}. */
|
|
169
182
|
onUnpinSidebarRequested(): void;
|
|
170
183
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationSidebarComponent, never>;
|
|
171
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConversationSidebarComponent, "mj-conversation-sidebar", never, { "ActiveTab": { "alias": "ActiveTab"; "required": false; }; "activeTab": { "alias": "activeTab"; "required": false; }; "EnvironmentId": { "alias": "EnvironmentId"; "required": false; }; "environmentId": { "alias": "environmentId"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "SelectedConversationId": { "alias": "SelectedConversationId"; "required": false; }; "selectedConversationId": { "alias": "selectedConversationId"; "required": false; }; "RenamedConversationId": { "alias": "RenamedConversationId"; "required": false; }; "renamedConversationId": { "alias": "renamedConversationId"; "required": false; }; "IsSidebarPinned": { "alias": "IsSidebarPinned"; "required": false; }; "isSidebarPinned": { "alias": "isSidebarPinned"; "required": false; }; "IsMobileView": { "alias": "IsMobileView"; "required": false; }; "isMobileView": { "alias": "isMobileView"; "required": false; }; "ShowRoutines": { "alias": "ShowRoutines"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "ShowNewConversationButton": { "alias": "ShowNewConversationButton"; "required": false; }; "showNewConversationButton": { "alias": "showNewConversationButton"; "required": false; }; "ShowHeaderMenu": { "alias": "ShowHeaderMenu"; "required": false; }; "showHeaderMenu": { "alias": "showHeaderMenu"; "required": false; }; "ShowSectionHeaders": { "alias": "ShowSectionHeaders"; "required": false; }; "showSectionHeaders": { "alias": "showSectionHeaders"; "required": false; }; "FolderEditLabel": { "alias": "FolderEditLabel"; "required": false; }; "folderEditLabel": { "alias": "folderEditLabel"; "required": false; }; }, { "ConversationSelected": "ConversationSelected"; "conversationSelected": "conversationSelected"; "OpenEntityRecord": "OpenEntityRecord"; "openEntityRecord": "openEntityRecord"; "NewConversationRequested": "NewConversationRequested"; "newConversationRequested": "newConversationRequested"; "PinSidebarRequested": "PinSidebarRequested"; "pinSidebarRequested": "pinSidebarRequested"; "UnpinSidebarRequested": "UnpinSidebarRequested"; "unpinSidebarRequested": "unpinSidebarRequested"; "ConversationDeleted": "ConversationDeleted"; "conversationDeleted": "conversationDeleted"; "RefreshRequested": "RefreshRequested"; "refreshRequested": "refreshRequested"; "BeforeFolderEdit": "BeforeFolderEdit"; "beforeFolderEdit": "beforeFolderEdit"; "AfterFolderEdit": "AfterFolderEdit"; "afterFolderEdit": "afterFolderEdit"; }, never, never, false, never>;
|
|
184
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConversationSidebarComponent, "mj-conversation-sidebar", never, { "ActiveTab": { "alias": "ActiveTab"; "required": false; }; "activeTab": { "alias": "activeTab"; "required": false; }; "EnvironmentId": { "alias": "EnvironmentId"; "required": false; }; "environmentId": { "alias": "environmentId"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "SelectedConversationId": { "alias": "SelectedConversationId"; "required": false; }; "selectedConversationId": { "alias": "selectedConversationId"; "required": false; }; "RenamedConversationId": { "alias": "RenamedConversationId"; "required": false; }; "renamedConversationId": { "alias": "renamedConversationId"; "required": false; }; "IsSidebarPinned": { "alias": "IsSidebarPinned"; "required": false; }; "isSidebarPinned": { "alias": "isSidebarPinned"; "required": false; }; "IsMobileView": { "alias": "IsMobileView"; "required": false; }; "isMobileView": { "alias": "isMobileView"; "required": false; }; "ShowMyAgents": { "alias": "ShowMyAgents"; "required": false; }; "ActiveAgentId": { "alias": "ActiveAgentId"; "required": false; }; "ShowRoutines": { "alias": "ShowRoutines"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "ShowNewConversationButton": { "alias": "ShowNewConversationButton"; "required": false; }; "showNewConversationButton": { "alias": "showNewConversationButton"; "required": false; }; "ShowHeaderMenu": { "alias": "ShowHeaderMenu"; "required": false; }; "showHeaderMenu": { "alias": "showHeaderMenu"; "required": false; }; "ShowSectionHeaders": { "alias": "ShowSectionHeaders"; "required": false; }; "showSectionHeaders": { "alias": "showSectionHeaders"; "required": false; }; "FolderEditLabel": { "alias": "FolderEditLabel"; "required": false; }; "folderEditLabel": { "alias": "folderEditLabel"; "required": false; }; }, { "ConversationSelected": "ConversationSelected"; "conversationSelected": "conversationSelected"; "OpenEntityRecord": "OpenEntityRecord"; "openEntityRecord": "openEntityRecord"; "NewConversationRequested": "NewConversationRequested"; "newConversationRequested": "newConversationRequested"; "PinSidebarRequested": "PinSidebarRequested"; "pinSidebarRequested": "pinSidebarRequested"; "UnpinSidebarRequested": "UnpinSidebarRequested"; "unpinSidebarRequested": "unpinSidebarRequested"; "ConversationDeleted": "ConversationDeleted"; "conversationDeleted": "conversationDeleted"; "RefreshRequested": "RefreshRequested"; "refreshRequested": "refreshRequested"; "BeforeFolderEdit": "BeforeFolderEdit"; "beforeFolderEdit": "beforeFolderEdit"; "AfterFolderEdit": "AfterFolderEdit"; "afterFolderEdit": "afterFolderEdit"; "StartChatWithAgent": "StartChatWithAgent"; "StartNewChatWithAgent": "StartNewChatWithAgent"; "StartOnboardingWithTemplate": "StartOnboardingWithTemplate"; "AgentInstanceChanged": "AgentInstanceChanged"; }, never, never, false, never>;
|
|
172
185
|
}
|
|
173
186
|
//# sourceMappingURL=conversation-sidebar.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-sidebar.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/sidebar/conversation-sidebar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;;AAE/F,
|
|
1
|
+
{"version":3,"file":"conversation-sidebar.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/sidebar/conversation-sid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/E,gBAAgB;oBAAkC,MAAM;sBAAgB,YAAY;OAAM;IAEpG;;;;;;OAMG;IACO,gBAAgB;oBATkC,MAAM;sBAAgB,YAAY;OAS3C;IACzC,wBAAwB,qBAA4B;IAE9D;;;;;;OAMG;IACO,wBAAwB,qBAAiC;IACzD,mBAAmB,qBAA4B;IAEzD;;;;;;OAMG;IACO,mBAAmB,qBAA4B;IAC/C,qBAAqB,qBAA4B;IAE3D;;;;;;OAMG;IACO,qBAAqB,qBAA8B;IAC7D;6EACyE;IAC/D,mBAAmB,uBAA8B;IAE3D;;;;;;OAMG;IACO,mBAAmB,uBAA4B;IACzD,2EAA2E;IACjE,gBAAgB,qBAA4B;IAEtD;;;;;;OAMG;IACO,gBAAgB,qBAAyB;IACnD,wGAAwG;IAC9F,gBAAgB,0CAAiD;IAE3E;;;;;;OAMG;IACO,gBAAgB,0CAAyB;IACnD,iHAAiH;IACvG,eAAe,yCAAgD;IAEzE;;;;;;OAMG;IACO,eAAe,yCAAwB;IAEjD,gGAAgG;IACtF,kBAAkB,wCAA+C;IAC3E,gGAAgG;IACtF,qBAAqB,wCAA+C;IAC9E,uEAAuE;IAC7D,2BAA2B,wCAA+C;IACpF,wGAAwG;IAC9F,oBAAoB,+CAAsD;IAEpF,qBAAqB,IAAI,IAAI;IAI7B,qDAAqD;IACrD,qBAAqB,IAAI,IAAI;IAI7B,uBAAuB,IAAI,IAAI;IAI/B,uDAAuD;IACvD,uBAAuB,IAAI,IAAI;yCAvPpB,4BAA4B;2CAA5B,4BAA4B;CA0PxC"}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
2
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./
|
|
5
|
-
import * as i2 from "
|
|
6
|
-
import * as i3 from "../
|
|
4
|
+
import * as i1 from "./my-agents-section.component";
|
|
5
|
+
import * as i2 from "./routines-section.component";
|
|
6
|
+
import * as i3 from "../conversation/conversation-list.component";
|
|
7
|
+
import * as i4 from "../collection/collection-tree.component";
|
|
7
8
|
function ConversationSidebarComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8
9
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
9
|
-
i0.ɵɵelementStart(0, "
|
|
10
|
-
i0.ɵɵlistener("
|
|
10
|
+
i0.ɵɵelementStart(0, "mj-my-agents-section", 3);
|
|
11
|
+
i0.ɵɵlistener("StartChatWithAgent", function ConversationSidebarComponent_Conditional_1_Template_mj_my_agents_section_StartChatWithAgent_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.StartChatWithAgent.emit($event)); })("StartNewChatWithAgent", function ConversationSidebarComponent_Conditional_1_Template_mj_my_agents_section_StartNewChatWithAgent_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.StartNewChatWithAgent.emit($event)); })("StartOnboardingWithTemplate", function ConversationSidebarComponent_Conditional_1_Template_mj_my_agents_section_StartOnboardingWithTemplate_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.StartOnboardingWithTemplate.emit($event)); })("AgentInstanceChanged", function ConversationSidebarComponent_Conditional_1_Template_mj_my_agents_section_AgentInstanceChanged_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.AgentInstanceChanged.emit($event)); });
|
|
12
|
+
i0.ɵɵelementEnd();
|
|
13
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "mj-conversation-list", 4);
|
|
14
|
+
i0.ɵɵlistener("conversationSelected", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_conversationSelected_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.conversationSelected.emit($event)); })("conversationDeleted", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_conversationDeleted_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.conversationDeleted.emit($event)); })("newConversationRequested", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_newConversationRequested_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.newConversationRequested.emit()); })("refreshRequested", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_refreshRequested_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.refreshRequested.emit()); })("pinSidebarRequested", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_pinSidebarRequested_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onPinSidebarRequested()); })("unpinSidebarRequested", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_unpinSidebarRequested_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onUnpinSidebarRequested()); })("BeforeFolderEdit", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_BeforeFolderEdit_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BeforeFolderEdit.emit($event)); })("AfterFolderEdit", function ConversationSidebarComponent_Conditional_1_Template_mj_conversation_list_AfterFolderEdit_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.AfterFolderEdit.emit($event)); });
|
|
11
15
|
i0.ɵɵelementEnd()();
|
|
12
16
|
} if (rf & 2) {
|
|
13
17
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
14
|
-
i0.ɵɵ
|
|
18
|
+
i0.ɵɵproperty("Provider", ctx_r1.Provider)("CurrentUser", ctx_r1.currentUser)("ShowMyAgents", ctx_r1.ShowMyAgents)("ActiveAgentId", ctx_r1.ActiveAgentId);
|
|
19
|
+
i0.ɵɵadvance(2);
|
|
15
20
|
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("selectedConversationId", ctx_r1.selectedConversationId)("renamedConversationId", ctx_r1.renamedConversationId)("isSidebarPinned", ctx_r1.isSidebarPinned)("isMobileView", ctx_r1.isMobileView)("showSearch", ctx_r1.showSearch)("showNewConversationButton", ctx_r1.showNewConversationButton)("showHeaderMenu", ctx_r1.showHeaderMenu)("showSectionHeaders", ctx_r1.showSectionHeaders)("FolderEditLabel", ctx_r1.FolderEditLabel);
|
|
16
21
|
} }
|
|
17
22
|
function ConversationSidebarComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
18
23
|
i0.ɵɵelementStart(0, "div", 1);
|
|
19
|
-
i0.ɵɵelement(1, "mj-collection-tree",
|
|
24
|
+
i0.ɵɵelement(1, "mj-collection-tree", 5);
|
|
20
25
|
i0.ɵɵelementEnd();
|
|
21
26
|
} if (rf & 2) {
|
|
22
27
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -87,6 +92,10 @@ export class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
87
92
|
get isMobileView() {
|
|
88
93
|
return this.IsMobileView;
|
|
89
94
|
}
|
|
95
|
+
/** Show the My Agents section at the top of the sidebar (default true). */
|
|
96
|
+
ShowMyAgents = true;
|
|
97
|
+
/** Currently active/pinned agent ID in the selected conversation, highlighted in My Agents. */
|
|
98
|
+
ActiveAgentId = null;
|
|
90
99
|
/** Show the Routines section at the bottom of the sidebar (bubbled from the workspace; default true). */
|
|
91
100
|
ShowRoutines = true;
|
|
92
101
|
// ── White-label chrome toggles, passed through to the conversation list
|
|
@@ -220,6 +229,14 @@ export class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
220
229
|
* initialise in order, and the other way round this captures undefined.
|
|
221
230
|
*/
|
|
222
231
|
afterFolderEdit = this.AfterFolderEdit;
|
|
232
|
+
/** User clicked one of their personal agent instances in My Agents to open/focus its thread. */
|
|
233
|
+
StartChatWithAgent = new EventEmitter();
|
|
234
|
+
/** User explicitly clicked the hover '+' icon on an instance to spin up a fresh chat thread. */
|
|
235
|
+
StartNewChatWithAgent = new EventEmitter();
|
|
236
|
+
/** User chose "Chat to Onboard" for an instantiable template agent. */
|
|
237
|
+
StartOnboardingWithTemplate = new EventEmitter();
|
|
238
|
+
/** Emitted after a personal agent instance is created, tailored, or archived from the sidebar modal. */
|
|
239
|
+
AgentInstanceChanged = new EventEmitter();
|
|
223
240
|
OnPinSidebarRequested() {
|
|
224
241
|
this.PinSidebarRequested.emit();
|
|
225
242
|
}
|
|
@@ -235,9 +252,9 @@ export class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
235
252
|
return this.OnUnpinSidebarRequested();
|
|
236
253
|
}
|
|
237
254
|
static ɵfac = /*@__PURE__*/ (() => { let ɵConversationSidebarComponent_BaseFactory; return function ConversationSidebarComponent_Factory(__ngFactoryType__) { return (ɵConversationSidebarComponent_BaseFactory || (ɵConversationSidebarComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ConversationSidebarComponent)))(__ngFactoryType__ || ConversationSidebarComponent); }; })();
|
|
238
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationSidebarComponent, selectors: [["mj-conversation-sidebar"]], inputs: { ActiveTab: "ActiveTab", activeTab: "activeTab", EnvironmentId: "EnvironmentId", environmentId: "environmentId", CurrentUser: "CurrentUser", currentUser: "currentUser", SelectedConversationId: "SelectedConversationId", selectedConversationId: "selectedConversationId", RenamedConversationId: "RenamedConversationId", renamedConversationId: "renamedConversationId", IsSidebarPinned: "IsSidebarPinned", isSidebarPinned: "isSidebarPinned", IsMobileView: "IsMobileView", isMobileView: "isMobileView", ShowRoutines: "ShowRoutines", showSearch: "showSearch", ShowNewConversationButton: "ShowNewConversationButton", showNewConversationButton: "showNewConversationButton", ShowHeaderMenu: "ShowHeaderMenu", showHeaderMenu: "showHeaderMenu", ShowSectionHeaders: "ShowSectionHeaders", showSectionHeaders: "showSectionHeaders", FolderEditLabel: "FolderEditLabel", folderEditLabel: "folderEditLabel" }, outputs: { ConversationSelected: "ConversationSelected", conversationSelected: "conversationSelected", OpenEntityRecord: "OpenEntityRecord", openEntityRecord: "openEntityRecord", NewConversationRequested: "NewConversationRequested", newConversationRequested: "newConversationRequested", PinSidebarRequested: "PinSidebarRequested", pinSidebarRequested: "pinSidebarRequested", UnpinSidebarRequested: "UnpinSidebarRequested", unpinSidebarRequested: "unpinSidebarRequested", ConversationDeleted: "ConversationDeleted", conversationDeleted: "conversationDeleted", RefreshRequested: "RefreshRequested", refreshRequested: "refreshRequested", BeforeFolderEdit: "BeforeFolderEdit", beforeFolderEdit: "beforeFolderEdit", AfterFolderEdit: "AfterFolderEdit", afterFolderEdit: "afterFolderEdit" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 4, consts: [[1, "conversation-sidebar"], [1, "sidebar-content"], [3, "openEntityRecord", "openConversation", "Provider", "ShowRoutines"], [3, "conversationSelected", "conversationDeleted", "newConversationRequested", "refreshRequested", "pinSidebarRequested", "unpinSidebarRequested", "BeforeFolderEdit", "AfterFolderEdit", "environmentId", "currentUser", "selectedConversationId", "renamedConversationId", "isSidebarPinned", "isMobileView", "showSearch", "showNewConversationButton", "showHeaderMenu", "showSectionHeaders", "FolderEditLabel"], [3, "environmentId", "currentUser"]], template: function ConversationSidebarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
255
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationSidebarComponent, selectors: [["mj-conversation-sidebar"]], inputs: { ActiveTab: "ActiveTab", activeTab: "activeTab", EnvironmentId: "EnvironmentId", environmentId: "environmentId", CurrentUser: "CurrentUser", currentUser: "currentUser", SelectedConversationId: "SelectedConversationId", selectedConversationId: "selectedConversationId", RenamedConversationId: "RenamedConversationId", renamedConversationId: "renamedConversationId", IsSidebarPinned: "IsSidebarPinned", isSidebarPinned: "isSidebarPinned", IsMobileView: "IsMobileView", isMobileView: "isMobileView", ShowMyAgents: "ShowMyAgents", ActiveAgentId: "ActiveAgentId", ShowRoutines: "ShowRoutines", showSearch: "showSearch", ShowNewConversationButton: "ShowNewConversationButton", showNewConversationButton: "showNewConversationButton", ShowHeaderMenu: "ShowHeaderMenu", showHeaderMenu: "showHeaderMenu", ShowSectionHeaders: "ShowSectionHeaders", showSectionHeaders: "showSectionHeaders", FolderEditLabel: "FolderEditLabel", folderEditLabel: "folderEditLabel" }, outputs: { ConversationSelected: "ConversationSelected", conversationSelected: "conversationSelected", OpenEntityRecord: "OpenEntityRecord", openEntityRecord: "openEntityRecord", NewConversationRequested: "NewConversationRequested", newConversationRequested: "newConversationRequested", PinSidebarRequested: "PinSidebarRequested", pinSidebarRequested: "pinSidebarRequested", UnpinSidebarRequested: "UnpinSidebarRequested", unpinSidebarRequested: "unpinSidebarRequested", ConversationDeleted: "ConversationDeleted", conversationDeleted: "conversationDeleted", RefreshRequested: "RefreshRequested", refreshRequested: "refreshRequested", BeforeFolderEdit: "BeforeFolderEdit", beforeFolderEdit: "beforeFolderEdit", AfterFolderEdit: "AfterFolderEdit", afterFolderEdit: "afterFolderEdit", StartChatWithAgent: "StartChatWithAgent", StartNewChatWithAgent: "StartNewChatWithAgent", StartOnboardingWithTemplate: "StartOnboardingWithTemplate", AgentInstanceChanged: "AgentInstanceChanged" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 4, consts: [[1, "conversation-sidebar"], [1, "sidebar-content"], [3, "openEntityRecord", "openConversation", "Provider", "ShowRoutines"], [3, "StartChatWithAgent", "StartNewChatWithAgent", "StartOnboardingWithTemplate", "AgentInstanceChanged", "Provider", "CurrentUser", "ShowMyAgents", "ActiveAgentId"], [3, "conversationSelected", "conversationDeleted", "newConversationRequested", "refreshRequested", "pinSidebarRequested", "unpinSidebarRequested", "BeforeFolderEdit", "AfterFolderEdit", "environmentId", "currentUser", "selectedConversationId", "renamedConversationId", "isSidebarPinned", "isMobileView", "showSearch", "showNewConversationButton", "showHeaderMenu", "showSectionHeaders", "FolderEditLabel"], [3, "environmentId", "currentUser"]], template: function ConversationSidebarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
239
256
|
i0.ɵɵelementStart(0, "div", 0);
|
|
240
|
-
i0.ɵɵconditionalCreate(1, ConversationSidebarComponent_Conditional_1_Template,
|
|
257
|
+
i0.ɵɵconditionalCreate(1, ConversationSidebarComponent_Conditional_1_Template, 3, 15);
|
|
241
258
|
i0.ɵɵconditionalCreate(2, ConversationSidebarComponent_Conditional_2_Template, 2, 2, "div", 1);
|
|
242
259
|
i0.ɵɵelementStart(3, "mj-conversation-routines-section", 2);
|
|
243
260
|
i0.ɵɵlistener("openEntityRecord", function ConversationSidebarComponent_Template_mj_conversation_routines_section_openEntityRecord_3_listener($event) { return ctx.openEntityRecord.emit($event); })("openConversation", function ConversationSidebarComponent_Template_mj_conversation_routines_section_openConversation_3_listener($event) { return ctx.conversationSelected.emit($event); });
|
|
@@ -249,13 +266,23 @@ export class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
249
266
|
i0.ɵɵconditional(ctx.activeTab === "collections" ? 2 : -1);
|
|
250
267
|
i0.ɵɵadvance();
|
|
251
268
|
i0.ɵɵproperty("Provider", ctx.Provider)("ShowRoutines", ctx.ShowRoutines);
|
|
252
|
-
} }, dependencies: [i1.
|
|
269
|
+
} }, dependencies: [i1.MyAgentsSectionComponent, i2.RoutinesSectionComponent, i3.ConversationListComponent, i4.CollectionTreeComponent], styles: [".conversation-sidebar[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n .sidebar-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n }\n .placeholder[_ngcontent-%COMP%] {\n padding: 24px;\n text-align: center;\n color: var(--mj-text-disabled);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n }\n .placeholder[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n }"] });
|
|
253
270
|
}
|
|
254
271
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationSidebarComponent, [{
|
|
255
272
|
type: Component,
|
|
256
273
|
args: [{ standalone: false, selector: 'mj-conversation-sidebar', template: `
|
|
257
274
|
<div class="conversation-sidebar">
|
|
258
275
|
@if (activeTab === 'conversations') {
|
|
276
|
+
<mj-my-agents-section
|
|
277
|
+
[Provider]="Provider"
|
|
278
|
+
[CurrentUser]="currentUser"
|
|
279
|
+
[ShowMyAgents]="ShowMyAgents"
|
|
280
|
+
[ActiveAgentId]="ActiveAgentId"
|
|
281
|
+
(StartChatWithAgent)="StartChatWithAgent.emit($event)"
|
|
282
|
+
(StartNewChatWithAgent)="StartNewChatWithAgent.emit($event)"
|
|
283
|
+
(StartOnboardingWithTemplate)="StartOnboardingWithTemplate.emit($event)"
|
|
284
|
+
(AgentInstanceChanged)="AgentInstanceChanged.emit($event)">
|
|
285
|
+
</mj-my-agents-section>
|
|
259
286
|
<div class="sidebar-content">
|
|
260
287
|
<mj-conversation-list
|
|
261
288
|
[environmentId]="environmentId"
|
|
@@ -328,6 +355,10 @@ export class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
328
355
|
type: Input
|
|
329
356
|
}], isMobileView: [{
|
|
330
357
|
type: Input
|
|
358
|
+
}], ShowMyAgents: [{
|
|
359
|
+
type: Input
|
|
360
|
+
}], ActiveAgentId: [{
|
|
361
|
+
type: Input
|
|
331
362
|
}], ShowRoutines: [{
|
|
332
363
|
type: Input
|
|
333
364
|
}], showSearch: [{
|
|
@@ -384,6 +415,14 @@ export class ConversationSidebarComponent extends BaseAngularComponent {
|
|
|
384
415
|
type: Output
|
|
385
416
|
}], afterFolderEdit: [{
|
|
386
417
|
type: Output
|
|
418
|
+
}], StartChatWithAgent: [{
|
|
419
|
+
type: Output
|
|
420
|
+
}], StartNewChatWithAgent: [{
|
|
421
|
+
type: Output
|
|
422
|
+
}], StartOnboardingWithTemplate: [{
|
|
423
|
+
type: Output
|
|
424
|
+
}], AgentInstanceChanged: [{
|
|
425
|
+
type: Output
|
|
387
426
|
}] }); })();
|
|
388
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationSidebarComponent, { className: "ConversationSidebarComponent", filePath: "src/lib/components/sidebar/conversation-sidebar.component.ts", lineNumber:
|
|
427
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationSidebarComponent, { className: "ConversationSidebarComponent", filePath: "src/lib/components/sidebar/conversation-sidebar.component.ts", lineNumber: 94 }); })();
|
|
389
428
|
//# sourceMappingURL=conversation-sidebar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-sidebar.component.js","sourceRoot":"","sources":["../../../../src/lib/components/sidebar/conversation-sidebar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;IAW3D,AADF,8BAA6B,8BAoBwB;IAAjD,AADA,AADA,AADA,AADA,AADA,AADA,AADA,kPAAwB,wCAAiC,KAAC,mOACnC,uCAAgC,KAAC,uOAC5B,sCAA+B,KAAC,uNACxC,8BAAuB,KAAC,6NACrB,8BAAuB,KAAC,iOACtB,gCAAyB,KAAC,6NAC/B,oCAA6B,KAAC,2NAC/B,mCAA4B,KAAC;IAEpD,AADE,iBAAuB,EACn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,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBAGN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kFA1NI,4BAA4B","sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { CompositeKey, UserInfo } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { NavigationTab } from '../../models/conversation-state.model';\nimport { BeforeFolderEditEventArgs, AfterFolderEditEventArgs } from '../../events/chat-events';\n\n@Component({\n standalone: false,\n selector: 'mj-conversation-sidebar',\n template: `\n <div class=\"conversation-sidebar\">\n @if (activeTab === 'conversations') {\n <div class=\"sidebar-content\">\n <mj-conversation-list\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n [showSearch]=\"showSearch\"\n [showNewConversationButton]=\"showNewConversationButton\"\n [showHeaderMenu]=\"showHeaderMenu\"\n [showSectionHeaders]=\"showSectionHeaders\"\n [FolderEditLabel]=\"FolderEditLabel\"\n (conversationSelected)=\"conversationSelected.emit($event)\"\n (conversationDeleted)=\"conversationDeleted.emit($event)\"\n (newConversationRequested)=\"newConversationRequested.emit()\"\n (refreshRequested)=\"refreshRequested.emit()\"\n (pinSidebarRequested)=\"onPinSidebarRequested()\"\n (unpinSidebarRequested)=\"onUnpinSidebarRequested()\"\n (BeforeFolderEdit)=\"BeforeFolderEdit.emit($event)\"\n (AfterFolderEdit)=\"AfterFolderEdit.emit($event)\">\n </mj-conversation-list>\n </div>\n }\n @if (activeTab === 'collections') {\n <div class=\"sidebar-content\">\n <mj-collection-tree\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\">\n </mj-collection-tree>\n </div>\n }\n\n <!-- Routines — pinned at the very bottom of the sidebar. Gated by the\n ShowRoutines opt-out AND the user's Read permission on\n 'MJ: User Routines' (checked inside the section component). -->\n <mj-conversation-routines-section\n [Provider]=\"Provider\"\n [ShowRoutines]=\"ShowRoutines\"\n (openEntityRecord)=\"openEntityRecord.emit($event)\"\n (openConversation)=\"conversationSelected.emit($event)\">\n </mj-conversation-routines-section>\n </div>\n `,\n styles: [`\n .conversation-sidebar {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n .sidebar-content {\n flex: 1;\n overflow-y: auto;\n }\n .placeholder {\n padding: 24px;\n text-align: center;\n color: var(--mj-text-disabled);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n }\n .placeholder p {\n margin: 0;\n font-size: 14px;\n }\n `]\n})\nexport class ConversationSidebarComponent extends BaseAngularComponent {\n @Input() ActiveTab: NavigationTab = 'conversations';\n\n /** @deprecated Use {@link ActiveTab}. */\n @Input() set activeTab(value: NavigationTab) {\n this.ActiveTab = value;\n }\n /** @deprecated Use {@link ActiveTab}. */\n get activeTab(): NavigationTab {\n return this.ActiveTab;\n }\n @Input() EnvironmentId!: string;\n\n /** @deprecated Use {@link EnvironmentId}. */\n @Input() set environmentId(value: string) {\n this.EnvironmentId = value;\n }\n /** @deprecated Use {@link EnvironmentId}. */\n get environmentId(): string {\n return this.EnvironmentId;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n @Input() SelectedConversationId: string | null = null;\n\n /** @deprecated Use {@link SelectedConversationId}. */\n @Input() set selectedConversationId(value: string | null) {\n this.SelectedConversationId = value;\n }\n /** @deprecated Use {@link SelectedConversationId}. */\n get selectedConversationId(): string | null {\n return this.SelectedConversationId;\n }\n @Input() RenamedConversationId: string | null = null;\n\n /** @deprecated Use {@link RenamedConversationId}. */\n @Input() set renamedConversationId(value: string | null) {\n this.RenamedConversationId = value;\n }\n /** @deprecated Use {@link RenamedConversationId}. */\n get renamedConversationId(): string | null {\n return this.RenamedConversationId;\n }\n @Input() IsSidebarPinned: boolean = true;\n\n /** @deprecated Use {@link IsSidebarPinned}. */\n @Input() set isSidebarPinned(value: boolean) {\n this.IsSidebarPinned = value;\n }\n /** @deprecated Use {@link IsSidebarPinned}. */\n get isSidebarPinned(): boolean {\n return this.IsSidebarPinned;\n }\n @Input() IsMobileView: boolean = false;\n\n /** @deprecated Use {@link IsMobileView}. */\n @Input() set isMobileView(value: boolean) {\n this.IsMobileView = value;\n }\n /** @deprecated Use {@link IsMobileView}. */\n get isMobileView(): boolean {\n return this.IsMobileView;\n }\n /** Show the Routines section at the bottom of the sidebar (bubbled from the workspace; default true). */\n @Input() ShowRoutines: boolean = true;\n\n // ── White-label chrome toggles, passed through to the conversation list\n // (all default true = stock rendering; see ConversationListComponent). ──\n /** Show the list's search box. */\n @Input() showSearch: boolean = true;\n /** Show the list's \"New Conversation\" button. */\n @Input() ShowNewConversationButton: boolean = true;\n\n /** @deprecated Use {@link ShowNewConversationButton}. */\n @Input() set showNewConversationButton(value: boolean) {\n this.ShowNewConversationButton = value;\n }\n /** @deprecated Use {@link ShowNewConversationButton}. */\n get showNewConversationButton(): boolean {\n return this.ShowNewConversationButton;\n }\n /** Show the list's ⋯ header options menu. */\n @Input() ShowHeaderMenu: boolean = true;\n\n /** @deprecated Use {@link ShowHeaderMenu}. */\n @Input() set showHeaderMenu(value: boolean) {\n this.ShowHeaderMenu = value;\n }\n /** @deprecated Use {@link ShowHeaderMenu}. */\n get showHeaderMenu(): boolean {\n return this.ShowHeaderMenu;\n }\n /** Show the list's collapsible section headers. */\n @Input() ShowSectionHeaders: boolean = true;\n\n /** @deprecated Use {@link ShowSectionHeaders}. */\n @Input() set showSectionHeaders(value: boolean) {\n this.ShowSectionHeaders = value;\n }\n /** @deprecated Use {@link ShowSectionHeaders}. */\n get showSectionHeaders(): boolean {\n return this.ShowSectionHeaders;\n }\n /** Label shown on the folder right-click menu's edit action (default `'Rename'`). */\n @Input() FolderEditLabel: string = 'Rename';\n\n /** @deprecated Use {@link FolderEditLabel}. */\n @Input() set folderEditLabel(value: string) {\n this.FolderEditLabel = value;\n }\n /** @deprecated Use {@link FolderEditLabel}. */\n get folderEditLabel(): string {\n return this.FolderEditLabel;\n }\n\n @Output() ConversationSelected = new EventEmitter<string>();\n\n /**\n * @deprecated Use {@link ConversationSelected}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (conversationSelected) keeps working. Must stay AFTER ConversationSelected: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() conversationSelected = this.ConversationSelected;\n /** Forwarded from the routines section — a run's linked execution record was clicked. */\n @Output() OpenEntityRecord = new EventEmitter<{ entityName: string; compositeKey: CompositeKey }>();\n\n /**\n * @deprecated Use {@link OpenEntityRecord}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (openEntityRecord) keeps working. Must stay AFTER OpenEntityRecord: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() openEntityRecord = this.OpenEntityRecord;\n @Output() NewConversationRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link NewConversationRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (newConversationRequested) keeps working. Must stay AFTER NewConversationRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() newConversationRequested = this.NewConversationRequested;\n @Output() PinSidebarRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link PinSidebarRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (pinSidebarRequested) keeps working. Must stay AFTER PinSidebarRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() pinSidebarRequested = this.PinSidebarRequested;\n @Output() UnpinSidebarRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link UnpinSidebarRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (unpinSidebarRequested) keeps working. Must stay AFTER UnpinSidebarRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() unpinSidebarRequested = this.UnpinSidebarRequested;\n /** Re-emitted from the conversation list — a conversation was deleted (payload = its ID).\n * Hosts use this to recover when the ACTIVE conversation is deleted. */\n @Output() ConversationDeleted = new EventEmitter<string>();\n\n /**\n * @deprecated Use {@link ConversationDeleted}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (conversationDeleted) keeps working. Must stay AFTER ConversationDeleted: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() conversationDeleted = this.ConversationDeleted;\n /** Re-emitted from the conversation list — the user refreshed the list. */\n @Output() RefreshRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link RefreshRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (refreshRequested) keeps working. Must stay AFTER RefreshRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() refreshRequested = this.RefreshRequested;\n /** Re-emitted from the conversation list — cancelable before opening the built-in folder edit modal. */\n @Output() BeforeFolderEdit = new EventEmitter<BeforeFolderEditEventArgs>();\n\n /**\n * @deprecated Use {@link BeforeFolderEdit}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (beforeFolderEdit) keeps working. Must stay AFTER BeforeFolderEdit: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() beforeFolderEdit = this.BeforeFolderEdit;\n /** Re-emitted from the conversation list — fired after a folder's edits are saved through the built-in modal. */\n @Output() AfterFolderEdit = new EventEmitter<AfterFolderEditEventArgs>();\n\n /**\n * @deprecated Use {@link AfterFolderEdit}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (afterFolderEdit) keeps working. Must stay AFTER AfterFolderEdit: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() afterFolderEdit = this.AfterFolderEdit;\n\n OnPinSidebarRequested(): void {\n this.PinSidebarRequested.emit();\n }\n\n /** @deprecated Use {@link OnPinSidebarRequested}. */\n onPinSidebarRequested(): void {\n return this.OnPinSidebarRequested();\n }\n\n OnUnpinSidebarRequested(): void {\n this.UnpinSidebarRequested.emit();\n }\n\n /** @deprecated Use {@link OnUnpinSidebarRequested}. */\n onUnpinSidebarRequested(): void {\n return this.OnUnpinSidebarRequested();\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"conversation-sidebar.component.js","sourceRoot":"","sources":["../../../../src/lib/components/sidebar/conversation-sidebar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;IAU7D,+CAQ6D;IAA3D,AADA,AADA,AADA,8OAAsB,sCAA+B,KAAC,uOAC7B,yCAAkC,KAAC,mPAC7B,+CAAwC,KAAC,qOAChD,wCAAiC,KAAC;IAC5D,iBAAuB;IAErB,AADF,8BAA6B,8BAoBwB;IAAjD,AADA,AADA,AADA,AADA,AADA,AADA,AADA,kPAAwB,wCAAiC,KAAC,mOACnC,uCAAgC,KAAC,uOAC5B,sCAA+B,KAAC,uNACxC,8BAAuB,KAAC,6NACrB,8BAAuB,KAAC,iOACtB,gCAAyB,KAAC,6NAC/B,oCAA6B,KAAC,2NAC/B,mCAA4B,KAAC;IAEpD,AADE,iBAAuB,EACnB;;;IA5BJ,AADA,AADA,AADA,0CAAqB,mCACM,qCACE,uCACE;IAQ7B,eAA+B;IAU/B,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,oDAA+B,mCACJ,yDACsB,uDACF,2CACZ,qCACN,iCACJ,+DAC8B,yCACtB,iDACQ,2CACN;;;IAavC,8BAA6B;IAC3B,wCAGqB;IACvB,iBAAM;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;;kBAOL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAKL,KAAK;;kBAEL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kBAGN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAGN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kFAvOI,4BAA4B","sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { CompositeKey, UserInfo } from '@memberjunction/core';\nimport { MJAIAgentEntityExtended } from '@memberjunction/ai-core-plus';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { NavigationTab } from '../../models/conversation-state.model';\nimport { BeforeFolderEditEventArgs, AfterFolderEditEventArgs } from '../../events/chat-events';\n\n@Component({\n standalone: false,\n selector: 'mj-conversation-sidebar',\n template: `\n <div class=\"conversation-sidebar\">\n @if (activeTab === 'conversations') {\n <mj-my-agents-section\n [Provider]=\"Provider\"\n [CurrentUser]=\"currentUser\"\n [ShowMyAgents]=\"ShowMyAgents\"\n [ActiveAgentId]=\"ActiveAgentId\"\n (StartChatWithAgent)=\"StartChatWithAgent.emit($event)\"\n (StartNewChatWithAgent)=\"StartNewChatWithAgent.emit($event)\"\n (StartOnboardingWithTemplate)=\"StartOnboardingWithTemplate.emit($event)\"\n (AgentInstanceChanged)=\"AgentInstanceChanged.emit($event)\">\n </mj-my-agents-section>\n <div class=\"sidebar-content\">\n <mj-conversation-list\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n [showSearch]=\"showSearch\"\n [showNewConversationButton]=\"showNewConversationButton\"\n [showHeaderMenu]=\"showHeaderMenu\"\n [showSectionHeaders]=\"showSectionHeaders\"\n [FolderEditLabel]=\"FolderEditLabel\"\n (conversationSelected)=\"conversationSelected.emit($event)\"\n (conversationDeleted)=\"conversationDeleted.emit($event)\"\n (newConversationRequested)=\"newConversationRequested.emit()\"\n (refreshRequested)=\"refreshRequested.emit()\"\n (pinSidebarRequested)=\"onPinSidebarRequested()\"\n (unpinSidebarRequested)=\"onUnpinSidebarRequested()\"\n (BeforeFolderEdit)=\"BeforeFolderEdit.emit($event)\"\n (AfterFolderEdit)=\"AfterFolderEdit.emit($event)\">\n </mj-conversation-list>\n </div>\n }\n @if (activeTab === 'collections') {\n <div class=\"sidebar-content\">\n <mj-collection-tree\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\">\n </mj-collection-tree>\n </div>\n }\n\n <!-- Routines — pinned at the very bottom of the sidebar. Gated by the\n ShowRoutines opt-out AND the user's Read permission on\n 'MJ: User Routines' (checked inside the section component). -->\n <mj-conversation-routines-section\n [Provider]=\"Provider\"\n [ShowRoutines]=\"ShowRoutines\"\n (openEntityRecord)=\"openEntityRecord.emit($event)\"\n (openConversation)=\"conversationSelected.emit($event)\">\n </mj-conversation-routines-section>\n </div>\n `,\n styles: [`\n .conversation-sidebar {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n .sidebar-content {\n flex: 1;\n overflow-y: auto;\n }\n .placeholder {\n padding: 24px;\n text-align: center;\n color: var(--mj-text-disabled);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n }\n .placeholder p {\n margin: 0;\n font-size: 14px;\n }\n `]\n})\nexport class ConversationSidebarComponent extends BaseAngularComponent {\n @Input() ActiveTab: NavigationTab = 'conversations';\n\n /** @deprecated Use {@link ActiveTab}. */\n @Input() set activeTab(value: NavigationTab) {\n this.ActiveTab = value;\n }\n /** @deprecated Use {@link ActiveTab}. */\n get activeTab(): NavigationTab {\n return this.ActiveTab;\n }\n @Input() EnvironmentId!: string;\n\n /** @deprecated Use {@link EnvironmentId}. */\n @Input() set environmentId(value: string) {\n this.EnvironmentId = value;\n }\n /** @deprecated Use {@link EnvironmentId}. */\n get environmentId(): string {\n return this.EnvironmentId;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n @Input() SelectedConversationId: string | null = null;\n\n /** @deprecated Use {@link SelectedConversationId}. */\n @Input() set selectedConversationId(value: string | null) {\n this.SelectedConversationId = value;\n }\n /** @deprecated Use {@link SelectedConversationId}. */\n get selectedConversationId(): string | null {\n return this.SelectedConversationId;\n }\n @Input() RenamedConversationId: string | null = null;\n\n /** @deprecated Use {@link RenamedConversationId}. */\n @Input() set renamedConversationId(value: string | null) {\n this.RenamedConversationId = value;\n }\n /** @deprecated Use {@link RenamedConversationId}. */\n get renamedConversationId(): string | null {\n return this.RenamedConversationId;\n }\n @Input() IsSidebarPinned: boolean = true;\n\n /** @deprecated Use {@link IsSidebarPinned}. */\n @Input() set isSidebarPinned(value: boolean) {\n this.IsSidebarPinned = value;\n }\n /** @deprecated Use {@link IsSidebarPinned}. */\n get isSidebarPinned(): boolean {\n return this.IsSidebarPinned;\n }\n @Input() IsMobileView: boolean = false;\n\n /** @deprecated Use {@link IsMobileView}. */\n @Input() set isMobileView(value: boolean) {\n this.IsMobileView = value;\n }\n /** @deprecated Use {@link IsMobileView}. */\n get isMobileView(): boolean {\n return this.IsMobileView;\n }\n /** Show the My Agents section at the top of the sidebar (default true). */\n @Input() ShowMyAgents: boolean = true;\n /** Currently active/pinned agent ID in the selected conversation, highlighted in My Agents. */\n @Input() ActiveAgentId: string | null = null;\n /** Show the Routines section at the bottom of the sidebar (bubbled from the workspace; default true). */\n @Input() ShowRoutines: boolean = true;\n\n // ── White-label chrome toggles, passed through to the conversation list\n // (all default true = stock rendering; see ConversationListComponent). ──\n /** Show the list's search box. */\n @Input() showSearch: boolean = true;\n /** Show the list's \"New Conversation\" button. */\n @Input() ShowNewConversationButton: boolean = true;\n\n /** @deprecated Use {@link ShowNewConversationButton}. */\n @Input() set showNewConversationButton(value: boolean) {\n this.ShowNewConversationButton = value;\n }\n /** @deprecated Use {@link ShowNewConversationButton}. */\n get showNewConversationButton(): boolean {\n return this.ShowNewConversationButton;\n }\n /** Show the list's ⋯ header options menu. */\n @Input() ShowHeaderMenu: boolean = true;\n\n /** @deprecated Use {@link ShowHeaderMenu}. */\n @Input() set showHeaderMenu(value: boolean) {\n this.ShowHeaderMenu = value;\n }\n /** @deprecated Use {@link ShowHeaderMenu}. */\n get showHeaderMenu(): boolean {\n return this.ShowHeaderMenu;\n }\n /** Show the list's collapsible section headers. */\n @Input() ShowSectionHeaders: boolean = true;\n\n /** @deprecated Use {@link ShowSectionHeaders}. */\n @Input() set showSectionHeaders(value: boolean) {\n this.ShowSectionHeaders = value;\n }\n /** @deprecated Use {@link ShowSectionHeaders}. */\n get showSectionHeaders(): boolean {\n return this.ShowSectionHeaders;\n }\n /** Label shown on the folder right-click menu's edit action (default `'Rename'`). */\n @Input() FolderEditLabel: string = 'Rename';\n\n /** @deprecated Use {@link FolderEditLabel}. */\n @Input() set folderEditLabel(value: string) {\n this.FolderEditLabel = value;\n }\n /** @deprecated Use {@link FolderEditLabel}. */\n get folderEditLabel(): string {\n return this.FolderEditLabel;\n }\n\n @Output() ConversationSelected = new EventEmitter<string>();\n\n /**\n * @deprecated Use {@link ConversationSelected}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (conversationSelected) keeps working. Must stay AFTER ConversationSelected: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() conversationSelected = this.ConversationSelected;\n /** Forwarded from the routines section — a run's linked execution record was clicked. */\n @Output() OpenEntityRecord = new EventEmitter<{ entityName: string; compositeKey: CompositeKey }>();\n\n /**\n * @deprecated Use {@link OpenEntityRecord}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (openEntityRecord) keeps working. Must stay AFTER OpenEntityRecord: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() openEntityRecord = this.OpenEntityRecord;\n @Output() NewConversationRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link NewConversationRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (newConversationRequested) keeps working. Must stay AFTER NewConversationRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() newConversationRequested = this.NewConversationRequested;\n @Output() PinSidebarRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link PinSidebarRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (pinSidebarRequested) keeps working. Must stay AFTER PinSidebarRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() pinSidebarRequested = this.PinSidebarRequested;\n @Output() UnpinSidebarRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link UnpinSidebarRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (unpinSidebarRequested) keeps working. Must stay AFTER UnpinSidebarRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() unpinSidebarRequested = this.UnpinSidebarRequested;\n /** Re-emitted from the conversation list — a conversation was deleted (payload = its ID).\n * Hosts use this to recover when the ACTIVE conversation is deleted. */\n @Output() ConversationDeleted = new EventEmitter<string>();\n\n /**\n * @deprecated Use {@link ConversationDeleted}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (conversationDeleted) keeps working. Must stay AFTER ConversationDeleted: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() conversationDeleted = this.ConversationDeleted;\n /** Re-emitted from the conversation list — the user refreshed the list. */\n @Output() RefreshRequested = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link RefreshRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (refreshRequested) keeps working. Must stay AFTER RefreshRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() refreshRequested = this.RefreshRequested;\n /** Re-emitted from the conversation list — cancelable before opening the built-in folder edit modal. */\n @Output() BeforeFolderEdit = new EventEmitter<BeforeFolderEditEventArgs>();\n\n /**\n * @deprecated Use {@link BeforeFolderEdit}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (beforeFolderEdit) keeps working. Must stay AFTER BeforeFolderEdit: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() beforeFolderEdit = this.BeforeFolderEdit;\n /** Re-emitted from the conversation list — fired after a folder's edits are saved through the built-in modal. */\n @Output() AfterFolderEdit = new EventEmitter<AfterFolderEditEventArgs>();\n\n /**\n * @deprecated Use {@link AfterFolderEdit}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (afterFolderEdit) keeps working. Must stay AFTER AfterFolderEdit: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() afterFolderEdit = this.AfterFolderEdit;\n\n /** User clicked one of their personal agent instances in My Agents to open/focus its thread. */\n @Output() StartChatWithAgent = new EventEmitter<MJAIAgentEntityExtended>();\n /** User explicitly clicked the hover '+' icon on an instance to spin up a fresh chat thread. */\n @Output() StartNewChatWithAgent = new EventEmitter<MJAIAgentEntityExtended>();\n /** User chose \"Chat to Onboard\" for an instantiable template agent. */\n @Output() StartOnboardingWithTemplate = new EventEmitter<MJAIAgentEntityExtended>();\n /** Emitted after a personal agent instance is created, tailored, or archived from the sidebar modal. */\n @Output() AgentInstanceChanged = new EventEmitter<MJAIAgentEntityExtended | null>();\n\n OnPinSidebarRequested(): void {\n this.PinSidebarRequested.emit();\n }\n\n /** @deprecated Use {@link OnPinSidebarRequested}. */\n onPinSidebarRequested(): void {\n return this.OnPinSidebarRequested();\n }\n\n OnUnpinSidebarRequested(): void {\n this.UnpinSidebarRequested.emit();\n }\n\n /** @deprecated Use {@link OnUnpinSidebarRequested}. */\n onUnpinSidebarRequested(): void {\n return this.OnUnpinSidebarRequested();\n }\n}"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { UserInfo } from '@memberjunction/core';
|
|
3
|
+
import { MJAIAgentEntityExtended } from '@memberjunction/ai-core-plus';
|
|
4
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface MyAgentDisplayItem {
|
|
7
|
+
Agent: MJAIAgentEntityExtended;
|
|
8
|
+
BaseAgentName: string | null;
|
|
9
|
+
ShowPrimaryStar: boolean;
|
|
10
|
+
AvatarUrl: string | null;
|
|
11
|
+
IconClass: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Grok-Bot-style "My Agents" left-rail section in the Conversations sidebar.
|
|
15
|
+
*
|
|
16
|
+
* Displays:
|
|
17
|
+
* - The user's active personal/shared derived agent instances (*Pepper*, *Cato*, *FDA Clinical Scout*)
|
|
18
|
+
* with custom avatar/icon, base-agent badge, primary star (when multiple instances share a root),
|
|
19
|
+
* click-to-chat, and a Tailor button (`fa-solid fa-sliders`) to edit identity/personality/instructions.
|
|
20
|
+
* - An inviting setup CTA card ("Set up My Chief of Staff") whenever the user has 0 instances for an
|
|
21
|
+
* instantiable template with `InstantiationMode === 'Required'`.
|
|
22
|
+
* - A `+` button to create a new personal agent instance from any instantiable template via
|
|
23
|
+
* `AgentInstanceEditorModalComponent` (supporting both "Chat to Onboard" and Direct Designer).
|
|
24
|
+
*/
|
|
25
|
+
export declare class MyAgentsSectionComponent extends BaseAngularComponent implements OnInit, OnChanges, OnDestroy {
|
|
26
|
+
private readonly cdr;
|
|
27
|
+
private readonly destroy$;
|
|
28
|
+
CurrentUser: UserInfo | null;
|
|
29
|
+
ShowMyAgents: boolean;
|
|
30
|
+
ActiveAgentId: string | null;
|
|
31
|
+
/** User clicked a personal agent row to open/focus its thread (or start one if none exists). */
|
|
32
|
+
StartChatWithAgent: EventEmitter<MJAIAgentEntityExtended>;
|
|
33
|
+
/** User explicitly clicked the hover '+' action to start a brand-new thread with this agent. */
|
|
34
|
+
StartNewChatWithAgent: EventEmitter<MJAIAgentEntityExtended>;
|
|
35
|
+
/** User chose "Chat to Onboard" for a template agent (e.g., Chief of Staff). */
|
|
36
|
+
StartOnboardingWithTemplate: EventEmitter<MJAIAgentEntityExtended>;
|
|
37
|
+
/** Emitted after an instance is created, updated, or archived from the modal. */
|
|
38
|
+
AgentInstanceChanged: EventEmitter<MJAIAgentEntityExtended | null>;
|
|
39
|
+
IsExpanded: boolean;
|
|
40
|
+
MyAgents: MyAgentDisplayItem[];
|
|
41
|
+
UnonboardedRequiredTemplates: MJAIAgentEntityExtended[];
|
|
42
|
+
HasInstantiableTemplates: boolean;
|
|
43
|
+
EditorVisible: boolean;
|
|
44
|
+
EditorMode: 'create' | 'edit';
|
|
45
|
+
EditingAgent: MJAIAgentEntityExtended | null;
|
|
46
|
+
InitialBaseAgentId: string | null;
|
|
47
|
+
private failedAvatars;
|
|
48
|
+
private initialized;
|
|
49
|
+
get EffectiveUser(): UserInfo | null;
|
|
50
|
+
get IsVisible(): boolean;
|
|
51
|
+
ngOnInit(): Promise<void>;
|
|
52
|
+
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
53
|
+
ngOnDestroy(): void;
|
|
54
|
+
ToggleExpanded(): void;
|
|
55
|
+
IsActiveAgent(agentId: string): boolean;
|
|
56
|
+
OpenCreateModal(event?: Event, baseAgentId?: string | null): void;
|
|
57
|
+
OpenEditModal(agent: MJAIAgentEntityExtended, event: Event): void;
|
|
58
|
+
OnAgentRowClick(item: MyAgentDisplayItem): void;
|
|
59
|
+
OnNewChatClick(item: MyAgentDisplayItem, event: Event): void;
|
|
60
|
+
OnAvatarError(agentId: string): void;
|
|
61
|
+
OnEditorSaved(agent: MJAIAgentEntityExtended): void;
|
|
62
|
+
OnEditorArchived(): void;
|
|
63
|
+
OnEditorChatToOnboard(template: MJAIAgentEntityExtended): void;
|
|
64
|
+
private get aiEngine();
|
|
65
|
+
private loadAgents;
|
|
66
|
+
private rebuildDisplayList;
|
|
67
|
+
/**
|
|
68
|
+
* Returns false when `MJ: AI Agents` entity metadata is loaded and `user` does not hold
|
|
69
|
+
* `CanCreate` permission (for example external `Space Participant` users without `UI`
|
|
70
|
+
* agent-instance creation rights), hiding `"Set up My Chief of Staff"` and create CTAs.
|
|
71
|
+
*/
|
|
72
|
+
private canUserCreateAgentInstances;
|
|
73
|
+
private normalizeIcon;
|
|
74
|
+
private subscribeToAgentChanges;
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MyAgentsSectionComponent, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MyAgentsSectionComponent, "mj-my-agents-section", never, { "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "ShowMyAgents": { "alias": "ShowMyAgents"; "required": false; }; "ActiveAgentId": { "alias": "ActiveAgentId"; "required": false; }; }, { "StartChatWithAgent": "StartChatWithAgent"; "StartNewChatWithAgent": "StartNewChatWithAgent"; "StartOnboardingWithTemplate": "StartOnboardingWithTemplate"; "AgentInstanceChanged": "AgentInstanceChanged"; }, never, never, false, never>;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=my-agents-section.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-agents-section.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/sidebar/my-agents-section.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,SAAS,EACT,SAAS,EACT,MAAM,EAEN,aAAa,EAEd,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAyC,QAAQ,EAAE,MAAM,s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