@memberjunction/ng-conversations 5.4.0 → 5.5.0

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.
Files changed (69) hide show
  1. package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
  2. package/dist/lib/components/agent/agent-process-panel.component.js +3 -2
  3. package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
  4. package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
  5. package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +10 -9
  6. package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
  7. package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
  8. package/dist/lib/components/collection/artifact-create-modal.component.js +3 -2
  9. package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
  10. package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
  11. package/dist/lib/components/collection/collection-form-modal.component.js +4 -3
  12. package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
  13. package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
  14. package/dist/lib/components/collection/collection-share-modal.component.js +5 -4
  15. package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
  16. package/dist/lib/components/collection/collection-tree.component.d.ts +2 -0
  17. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
  18. package/dist/lib/components/collection/collection-tree.component.js +24 -17
  19. package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
  20. package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
  21. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  22. package/dist/lib/components/collection/collections-full-view.component.js +14 -10
  23. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  24. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +21 -7
  25. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  26. package/dist/lib/components/conversation/conversation-chat-area.component.js +44 -14
  27. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  28. package/dist/lib/components/conversation/conversation-list.component.d.ts +3 -0
  29. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
  30. package/dist/lib/components/conversation/conversation-list.component.js +21 -11
  31. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  32. package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
  33. package/dist/lib/components/mention/mention-editor.component.js +4 -3
  34. package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
  35. package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
  36. package/dist/lib/components/message/conversation-message-rating.component.js +3 -2
  37. package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
  38. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  39. package/dist/lib/components/message/message-input.component.js +21 -7
  40. package/dist/lib/components/message/message-input.component.js.map +1 -1
  41. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  42. package/dist/lib/components/message/message-item.component.js +7 -6
  43. package/dist/lib/components/message/message-item.component.js.map +1 -1
  44. package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
  45. package/dist/lib/components/project/project-selector.component.js +3 -2
  46. package/dist/lib/components/project/project-selector.component.js.map +1 -1
  47. package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
  48. package/dist/lib/components/task/tasks-full-view.component.js +4 -3
  49. package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
  50. package/dist/lib/services/agent-state.service.d.ts +4 -0
  51. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  52. package/dist/lib/services/agent-state.service.js +15 -6
  53. package/dist/lib/services/agent-state.service.js.map +1 -1
  54. package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
  55. package/dist/lib/services/artifact-permission.service.js +3 -2
  56. package/dist/lib/services/artifact-permission.service.js.map +1 -1
  57. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  58. package/dist/lib/services/conversation-agent.service.js +5 -4
  59. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  60. package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
  61. package/dist/lib/services/conversation-attachment.service.js +2 -1
  62. package/dist/lib/services/conversation-attachment.service.js.map +1 -1
  63. package/dist/lib/services/conversation-data.service.d.ts.map +1 -1
  64. package/dist/lib/services/conversation-data.service.js +7 -6
  65. package/dist/lib/services/conversation-data.service.js.map +1 -1
  66. package/dist/lib/services/data-cache.service.d.ts.map +1 -1
  67. package/dist/lib/services/data-cache.service.js +9 -8
  68. package/dist/lib/services/data-cache.service.js.map +1 -1
  69. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"file":"collection-tree.component.js","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-tree.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAY,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;;;;;;;IAuBnE,iCAAkF;IAA1D,2LAAS,0BAAmB,IAAI,CAAC,KAAC;IACxD,uBAA2B;IAC7B,iBAAS;;;;IAyBH,6BAGqC;IAAnC,gPAAS,kCAAwB,KAAC;IACpC,iBAAI;;;IAFF,mFAAkE;;;;IAQlE,kCAA4G;IAA5E,+OAAS,gDAAsC,KAAC;IAC9E,uBAA2B;IAC7B,iBAAS;;;;IAGT,kCAA6F;IAA7D,+OAAS,6CAAmC,KAAC;IAC3E,wBAA4B;IAC9B,iBAAS;;;IAOX,wBAAyF;;;IAAzF,qHAA0E;;;;;IAA1B,AAAjC,oDAAiC,iEAAwB;;;IAD1E,0HAEC;;;IAFD,+BAEC;;;;IAvCH,AADF,8BAA+B,aAaG;IAA9B,AADA,AADA,AADA,AADA,AADA,0MAAS,6CAAmC,KAAC,2MAChC,mCAAyB,KAAC,6KAC5B,wB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,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC3D,OAAO,UAAU,EAAE,SAAS,IAAI,KAAK,CAAC;IACxC,CAAC;IAED,eAAe;QACb,kCAAkC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;iHAzTU,uBAAuB;6DAAvB,uBAAuB;;YAjJ5B,AADF,AADF,8BAA6B,aACF,SACnB;YAAA,2BAAW;YAAA,iBAAK;YACpB,4FAAyB;YAK3B,iBAAM;YAEN,8BAI8B;YAA5B,AADA,mJAAY,0BAAsB,KAAC,8HAC3B,sBAAkB,KAAC;YAC3B,4FA4CC;YAEL,AADE,iBAAM,EACF;YAEN,2HAA4C;;YA5DxC,eAIC;YAJD,gDAIC;YAKD,cAAkD;YAAlD,+DAAkD;YAGlD,cA4CC;YA5CD,4BA4CC;;;iFAwFI,uBAAuB;cAvJnC,SAAS;6BACI,KAAK,YACP,oBAAoB,YACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GT;;kBAwCA,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFARI,uBAAuB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { MJCollectionEntity } from '@memberjunction/core-entities';\nimport { UserInfo, RunView, Metadata, LogError } from '@memberjunction/core';\nimport { CollectionPermission, CollectionPermissionService } from '../../services/collection-permission.service';\n\ninterface TreeNode {\n collection: MJCollectionEntity;\n children: TreeNode[];\n expanded: boolean;\n level: number;\n}\n\ninterface DragData {\n collectionId: string;\n parentId: string | null;\n}\n\n@Component({\n standalone: false,\n selector: 'mj-collection-tree',\n template: `\n <div class=\"collection-tree\">\n <div class=\"tree-header\">\n <h3>Collections</h3>\n @if (canCreateAtRoot()) {\n <button class=\"btn-new\" (click)=\"onCreateCollection(null)\" title=\"New Collection\">\n <i class=\"fas fa-plus\"></i>\n </button>\n }\n </div>\n\n <div\n class=\"tree-content\"\n [class.drag-over-root]=\"dragOverNodeId === 'root'\"\n (dragover)=\"onDragOverRoot($event)\"\n (drop)=\"onDropRoot($event)\">\n @for (node of treeNodes; track node.collection.ID) {\n <div class=\"tree-node-wrapper\">\n <div\n class=\"tree-node\"\n [class.selected]=\"node.collection.ID === selectedCollectionId\"\n [class.drag-over]=\"dragOverNodeId === node.collection.ID\"\n [class.dragging]=\"draggedNode?.collection?.ID === node.collection.ID\"\n [style.padding-left.px]=\"node.level * 20\"\n [draggable]=\"true\"\n (click)=\"onSelectCollection(node.collection)\"\n (dragstart)=\"onDragStart($event, node)\"\n (dragend)=\"onDragEnd($event)\"\n (dragover)=\"onDragOver($event, node)\"\n (dragleave)=\"onDragLeave($event, node)\"\n (drop)=\"onDrop($event, node)\">\n @if (node.children.length > 0) {\n <i\n class=\"fas toggle-icon\"\n [ngClass]=\"node.expanded ? 'fa-chevron-down' : 'fa-chevron-right'\"\n (click)=\"toggleNode(node, $event)\">\n </i>\n }\n <i class=\"fas fa-folder collection-icon\" [style.color]=\"node.collection.Color || '#0076B6'\"></i>\n <span class=\"collection-name\">{{ node.collection.Name }}</span>\n <div class=\"node-actions\" (click)=\"$event.stopPropagation()\">\n @if (canEdit(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onCreateCollection(node.collection.ID)\" title=\"Add sub-collection\">\n <i class=\"fas fa-plus\"></i>\n </button>\n }\n @if (canDelete(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onDeleteCollection(node.collection)\" title=\"Delete\">\n <i class=\"fas fa-trash\"></i>\n </button>\n }\n </div>\n </div>\n\n @if (node.expanded) {\n @for (child of node.children; track child.collection.ID) {\n <ng-container *ngTemplateOutlet=\"recursiveTree; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n </div>\n </div>\n\n <ng-template #recursiveTree let-node=\"node\">\n <div class=\"tree-node-wrapper\">\n <div\n class=\"tree-node\"\n [class.selected]=\"node.collection.ID === selectedCollectionId\"\n [class.drag-over]=\"dragOverNodeId === node.collection.ID\"\n [class.dragging]=\"draggedNode?.collection?.ID === node.collection.ID\"\n [style.padding-left.px]=\"node.level * 20\"\n [draggable]=\"true\"\n (click)=\"onSelectCollection(node.collection)\"\n (dragstart)=\"onDragStart($event, node)\"\n (dragend)=\"onDragEnd($event)\"\n (dragover)=\"onDragOver($event, node)\"\n (dragleave)=\"onDragLeave($event, node)\"\n (drop)=\"onDrop($event, node)\">\n @if (node.children.length > 0) {\n <i\n class=\"fas toggle-icon\"\n [ngClass]=\"node.expanded ? 'fa-chevron-down' : 'fa-chevron-right'\"\n (click)=\"toggleNode(node, $event)\">\n </i>\n }\n <i class=\"fas fa-folder collection-icon\" [style.color]=\"node.collection.Color || '#0076B6'\"></i>\n <span class=\"collection-name\">{{ node.collection.Name }}</span>\n <div class=\"node-actions\" (click)=\"$event.stopPropagation()\">\n @if (canEdit(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onCreateCollection(node.collection.ID)\" title=\"Add sub-collection\">\n <i class=\"fas fa-plus\"></i>\n </button>\n }\n @if (canDelete(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onDeleteCollection(node.collection)\" title=\"Delete\">\n <i class=\"fas fa-trash\"></i>\n </button>\n }\n </div>\n </div>\n\n @if (node.expanded) {\n @for (child of node.children; track child.collection.ID) {\n <ng-container *ngTemplateOutlet=\"recursiveTree; context: { node: child }\"></ng-container>\n }\n }\n </div>\n </ng-template>\n `,\n styles: [`\n .collection-tree { display: flex; flex-direction: column; height: 100%; }\n .tree-header { padding: 16px; border-bottom: 1px solid #D9D9D9; display: flex; justify-content: space-between; align-items: center; }\n .tree-header h3 { margin: 0; font-size: 16px; }\n .btn-new { padding: 6px 10px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; }\n .btn-new:hover { background: #005A8C; }\n .tree-content { flex: 1; overflow-y: auto; position: relative; }\n .tree-content.drag-over-root { background: rgba(0, 118, 182, 0.1); }\n .tree-node {\n padding: 8px 12px;\n cursor: move;\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n transition: all 0.2s ease;\n border: 2px solid transparent;\n }\n .tree-node:hover { background: #F4F4F4; }\n .tree-node.selected { background: #AAE7FD; }\n .tree-node.dragging {\n opacity: 0.4;\n cursor: grabbing;\n }\n .tree-node.drag-over {\n background: rgba(0, 118, 182, 0.1);\n border: 2px dashed #0076B6;\n border-radius: 4px;\n }\n .toggle-icon { font-size: 10px; color: #AAA; cursor: pointer; width: 12px; }\n .collection-icon { font-size: 14px; }\n .collection-name { flex: 1; font-size: 14px; user-select: none; }\n .node-actions { display: none; gap: 4px; }\n .tree-node:hover .node-actions { display: flex; }\n .node-action-btn { padding: 4px 6px; background: transparent; border: none; cursor: pointer; border-radius: 3px; color: #666; }\n .node-action-btn:hover { background: rgba(0,0,0,0.1); }\n `]\n})\nexport class CollectionTreeComponent implements OnInit {\n @Input() environmentId!: string;\n @Input() currentUser!: UserInfo;\n @Input() selectedCollectionId: string | null = null;\n @Input() userPermissions: Map<string, CollectionPermission> = new Map();\n\n @Output() collectionSelected = new EventEmitter<MJCollectionEntity>();\n @Output() collectionCreated = new EventEmitter<MJCollectionEntity>();\n @Output() collectionDeleted = new EventEmitter<MJCollectionEntity>();\n\n public collections: MJCollectionEntity[] = [];\n public treeNodes: TreeNode[] = [];\n public draggedNode: TreeNode | null = null;\n public dragOverNodeId: string | null = null;\n\n constructor(private permissionService: CollectionPermissionService) {}\n\n ngOnInit() {\n this.loadCollections();\n }\n\n private async loadCollections(): Promise<void> {\n try {\n const rv = new RunView();\n const result = await rv.RunView<MJCollectionEntity>({\n EntityName: 'MJ: Collections',\n ExtraFilter: `EnvironmentID='${this.environmentId}'`,\n OrderBy: 'Sequence ASC, Name ASC',\n ResultType: 'entity_object'\n }, this.currentUser);\n\n if (result.Success) {\n this.collections = result.Results || [];\n this.buildTree();\n }\n } catch (error) {\n console.error('Error loading collections:', error);\n }\n }\n\n private buildTree(): void {\n const rootCollections = this.collections.filter(c => !c.ParentID);\n this.treeNodes = rootCollections.map(c => this.buildNode(c, 0));\n }\n\n private buildNode(collection: MJCollectionEntity, level: number): TreeNode {\n const children = this.collections.filter(c => c.ParentID === collection.ID);\n return {\n collection,\n children: children.map(c => this.buildNode(c, level + 1)),\n expanded: level === 0,\n level\n };\n }\n\n toggleNode(node: TreeNode, event: Event): void {\n event.stopPropagation();\n node.expanded = !node.expanded;\n }\n\n onSelectCollection(collection: MJCollectionEntity): void {\n this.selectedCollectionId = collection.ID;\n this.collectionSelected.emit(collection);\n }\n\n async onCreateCollection(parentId: string | null): Promise<void> {\n // Validate permission if creating child collection\n if (parentId) {\n const parentCollection = this.collections.find(c => c.ID === parentId);\n if (parentCollection) {\n // Check if user has Edit permission on parent\n if (parentCollection.OwnerID && parentCollection.OwnerID !== this.currentUser.ID) {\n const permission = await this.permissionService.checkPermission(\n parentId,\n this.currentUser.ID,\n this.currentUser\n );\n\n if (!permission?.canEdit) {\n alert('You do not have Edit permission to create a sub-collection.');\n return;\n }\n }\n }\n }\n\n const name = prompt('Enter collection name:');\n if (!name) return;\n\n try {\n const md = new Metadata();\n const collection = await md.GetEntityObject<MJCollectionEntity>('MJ: Collections', this.currentUser);\n\n collection.Name = name;\n collection.EnvironmentID = this.environmentId;\n\n if (parentId) {\n // Child collection - inherit parent's owner and set parent\n const parentCollection = this.collections.find(c => c.ID === parentId);\n collection.ParentID = parentId;\n collection.OwnerID = parentCollection?.OwnerID || this.currentUser.ID;\n } else {\n // Root collection - current user becomes owner\n collection.OwnerID = this.currentUser.ID;\n }\n\n const saved = await collection.Save();\n if (saved) {\n this.collectionCreated.emit(collection);\n await this.loadCollections();\n }\n } catch (error) {\n console.error('Error creating collection:', error);\n alert('Failed to create collection');\n }\n }\n\n async onDeleteCollection(collection: MJCollectionEntity): Promise<void> {\n // Validate Delete permission\n if (collection.OwnerID && collection.OwnerID !== this.currentUser.ID) {\n const permission = await this.permissionService.checkPermission(\n collection.ID,\n this.currentUser.ID,\n this.currentUser\n );\n\n if (!permission?.canDelete) {\n alert('You do not have Delete permission for this collection.');\n return;\n }\n }\n\n if (!confirm(`Delete collection \"${collection.Name}\"?`)) return;\n\n try {\n const deleted = await collection.Delete();\n if (deleted) {\n this.collectionDeleted.emit(collection);\n await this.loadCollections();\n }\n } catch (error) {\n console.error('Error deleting collection:', error);\n alert('Failed to delete collection');\n }\n }\n\n onDragStart(event: DragEvent, node: TreeNode): void {\n this.draggedNode = node;\n const dragData: DragData = {\n collectionId: node.collection.ID,\n parentId: node.collection.ParentID || null\n };\n event.dataTransfer!.effectAllowed = 'move';\n event.dataTransfer!.setData('application/json', JSON.stringify(dragData));\n\n // Add visual feedback\n (event.target as HTMLElement).style.opacity = '0.4';\n }\n\n onDragEnd(event: DragEvent): void {\n // Clean up visual feedback\n (event.target as HTMLElement).style.opacity = '1';\n this.draggedNode = null;\n this.dragOverNodeId = null;\n }\n\n onDragOver(event: DragEvent, targetNode: TreeNode): void {\n event.preventDefault(); // Required to allow drop\n\n if (!this.draggedNode || this.draggedNode.collection.ID === targetNode.collection.ID) {\n event.dataTransfer!.dropEffect = 'none';\n return;\n }\n\n // Check if trying to drop into a descendant\n if (this.isDescendant(targetNode, this.draggedNode)) {\n event.dataTransfer!.dropEffect = 'none';\n return;\n }\n\n event.dataTransfer!.dropEffect = 'move';\n this.dragOverNodeId = targetNode.collection.ID;\n }\n\n onDragLeave(event: DragEvent, targetNode: TreeNode): void {\n if (this.dragOverNodeId === targetNode.collection.ID) {\n this.dragOverNodeId = null;\n }\n }\n\n async onDrop(event: DragEvent, targetNode: TreeNode): Promise<void> {\n event.preventDefault();\n event.stopPropagation();\n\n if (!this.draggedNode) {\n return;\n }\n\n // Don't allow dropping on itself\n if (this.draggedNode.collection.ID === targetNode.collection.ID) {\n this.dragOverNodeId = null;\n return;\n }\n\n // Check if trying to drop into a descendant\n if (this.isDescendant(targetNode, this.draggedNode)) {\n alert('Cannot move a collection into its own descendant');\n this.dragOverNodeId = null;\n return;\n }\n\n try {\n const collection = this.draggedNode.collection;\n const newParentId = targetNode.collection.ID;\n\n // Update the collection's parent\n collection.ParentID = newParentId;\n\n const saved = await collection.Save();\n if (saved) {\n // Reload the tree to reflect changes\n await this.loadCollections();\n } else {\n alert('Failed to move collection');\n }\n } catch (error) {\n LogError(error);\n alert('Error moving collection');\n } finally {\n this.dragOverNodeId = null;\n }\n }\n\n onDragOverRoot(event: DragEvent): void {\n event.preventDefault();\n\n if (!this.draggedNode) {\n event.dataTransfer!.dropEffect = 'none';\n return;\n }\n\n event.dataTransfer!.dropEffect = 'move';\n this.dragOverNodeId = 'root';\n }\n\n async onDropRoot(event: DragEvent): Promise<void> {\n event.preventDefault();\n event.stopPropagation();\n\n if (!this.draggedNode) {\n return;\n }\n\n try {\n const collection = this.draggedNode.collection;\n\n // Move to root level\n collection.ParentID = null;\n\n const saved = await collection.Save();\n if (saved) {\n await this.loadCollections();\n } else {\n alert('Failed to move collection to root');\n }\n } catch (error) {\n LogError(error);\n alert('Error moving collection to root');\n } finally {\n this.dragOverNodeId = null;\n }\n }\n\n private isDescendant(potentialDescendant: TreeNode, ancestor: TreeNode): boolean {\n if (potentialDescendant.collection.ParentID === ancestor.collection.ID) {\n return true;\n }\n\n for (const child of ancestor.children) {\n if (this.isDescendant(potentialDescendant, child)) {\n return true;\n }\n }\n\n return false;\n }\n\n // Permission checking methods\n canEdit(collection: MJCollectionEntity): boolean {\n // Backwards compatibility: treat null OwnerID as owned by current user\n if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID) {\n return true;\n }\n\n // Check permission record\n const permission = this.userPermissions.get(collection.ID);\n return permission?.canEdit || false;\n }\n\n canDelete(collection: MJCollectionEntity): boolean {\n // Backwards compatibility: treat null OwnerID as owned by current user\n if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID) {\n return true;\n }\n\n // Check permission record\n const permission = this.userPermissions.get(collection.ID);\n return permission?.canDelete || false;\n }\n\n canCreateAtRoot(): boolean {\n // Anyone can create at root level\n return true;\n }\n}"]}
1
+ {"version":3,"file":"collection-tree.component.js","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-tree.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAY,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;IAsB1C,iCAAkF;IAA1D,2LAAS,0BAAmB,IAAI,CAAC,KAAC;IACxD,uBAA2B;IAC7B,iBAAS;;;;IAyBH,6BAGqC;IAAnC,gPAAS,kCAAwB,KAAC;IACpC,iBAAI;;;IAFF,mFAAkE;;;;IAQlE,kCAA4G;IAA5E,+OAAS,gDAAsC,KAAC;IAC9E,uBAA2B;IAC7B,iBAAS;;;;IAGT,kCAA6F;IAA7D,+OAAS,6CAAmC,KAAC;IAC3E,wBAA4B;IAC9B,iBAAS;;;IAOX,wBAAyF;;;IAAzF,qHAA0E;;;;;IAA1B,AAAjC,oDAAiC,iEAAwB;;;IAD1E,0HAEC;;;IAFD,+BAEC;;;;IAvCH,AADF,8BAA+B,aAaG;IAA9B,AADA,AADA,AADA,AADA,AADA,0MAAS,6CAAmC,KAAC,2MAChC,mCAAyB,KAAC,6KAC5B,wBAAiB,KAAC,yMACjB,kCAAwB,KAAC,2MACxB,mCAAyB,KAAC,iMAC/B,8BAAoB,KAAC;IAC7B,6FAAgC;IAOhC,wBAAgG;IAChG,gCAA8B;IAAA,YAA0B;IAAA,iBAAO;IAC/D,+BAA6D;IAAnC,mJAAS,wBAAwB,KAAC;IAC1D,mGAAgC;IAKhC,mGAAkC;IAMtC,AADE,iBAAM,EACF;IAEN,qFAAqB;IAKvB,iBAAM;;;;IApCF,c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,CAAC,UAAU,CAAC,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC;YAC/E,OAAO,IAAI,CAAC;QACd,CAAC;QAED,0BAA0B;QAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC3D,OAAO,UAAU,EAAE,SAAS,IAAI,KAAK,CAAC;IACxC,CAAC;IAED,eAAe;QACb,kCAAkC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;iHAjUU,uBAAuB;6DAAvB,uBAAuB;;YAjJ5B,AADF,AADF,8BAA6B,aACF,SACnB;YAAA,2BAAW;YAAA,iBAAK;YACpB,4FAAyB;YAK3B,iBAAM;YAEN,8BAI8B;YAA5B,AADA,mJAAY,0BAAsB,KAAC,8HAC3B,sBAAkB,KAAC;YAC3B,4FA4CC;YAEL,AADE,iBAAM,EACF;YAEN,2HAA4C;;YA5DxC,eAIC;YAJD,gDAIC;YAKD,cAAkD;YAAlD,+DAAkD;YAGlD,cA4CC;YA5CD,4BA4CC;;;iFAwFI,uBAAuB;cAvJnC,SAAS;6BACI,KAAK,YACP,oBAAoB,YACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GT;;kBAwCA,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFARI,uBAAuB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\nimport { MJCollectionEntity } from '@memberjunction/core-entities';\nimport { UserInfo, RunView, Metadata, LogError } from '@memberjunction/core';\nimport { CollectionPermission, CollectionPermissionService } from '../../services/collection-permission.service';\nimport { UUIDsEqual } from '@memberjunction/global';\n\ninterface TreeNode {\n collection: MJCollectionEntity;\n children: TreeNode[];\n expanded: boolean;\n level: number;\n}\n\ninterface DragData {\n collectionId: string;\n parentId: string | null;\n}\n\n@Component({\n standalone: false,\n selector: 'mj-collection-tree',\n template: `\n <div class=\"collection-tree\">\n <div class=\"tree-header\">\n <h3>Collections</h3>\n @if (canCreateAtRoot()) {\n <button class=\"btn-new\" (click)=\"onCreateCollection(null)\" title=\"New Collection\">\n <i class=\"fas fa-plus\"></i>\n </button>\n }\n </div>\n\n <div\n class=\"tree-content\"\n [class.drag-over-root]=\"dragOverNodeId === 'root'\"\n (dragover)=\"onDragOverRoot($event)\"\n (drop)=\"onDropRoot($event)\">\n @for (node of treeNodes; track node.collection.ID) {\n <div class=\"tree-node-wrapper\">\n <div\n class=\"tree-node\"\n [class.selected]=\"IsCollectionSelected(node)\"\n [class.drag-over]=\"dragOverNodeId === node.collection.ID\"\n [class.dragging]=\"IsCollectionDragging(node)\"\n [style.padding-left.px]=\"node.level * 20\"\n [draggable]=\"true\"\n (click)=\"onSelectCollection(node.collection)\"\n (dragstart)=\"onDragStart($event, node)\"\n (dragend)=\"onDragEnd($event)\"\n (dragover)=\"onDragOver($event, node)\"\n (dragleave)=\"onDragLeave($event, node)\"\n (drop)=\"onDrop($event, node)\">\n @if (node.children.length > 0) {\n <i\n class=\"fas toggle-icon\"\n [ngClass]=\"node.expanded ? 'fa-chevron-down' : 'fa-chevron-right'\"\n (click)=\"toggleNode(node, $event)\">\n </i>\n }\n <i class=\"fas fa-folder collection-icon\" [style.color]=\"node.collection.Color || '#0076B6'\"></i>\n <span class=\"collection-name\">{{ node.collection.Name }}</span>\n <div class=\"node-actions\" (click)=\"$event.stopPropagation()\">\n @if (canEdit(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onCreateCollection(node.collection.ID)\" title=\"Add sub-collection\">\n <i class=\"fas fa-plus\"></i>\n </button>\n }\n @if (canDelete(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onDeleteCollection(node.collection)\" title=\"Delete\">\n <i class=\"fas fa-trash\"></i>\n </button>\n }\n </div>\n </div>\n\n @if (node.expanded) {\n @for (child of node.children; track child.collection.ID) {\n <ng-container *ngTemplateOutlet=\"recursiveTree; context: { node: child }\"></ng-container>\n }\n }\n </div>\n }\n </div>\n </div>\n\n <ng-template #recursiveTree let-node=\"node\">\n <div class=\"tree-node-wrapper\">\n <div\n class=\"tree-node\"\n [class.selected]=\"IsCollectionSelected(node)\"\n [class.drag-over]=\"dragOverNodeId === node.collection.ID\"\n [class.dragging]=\"IsCollectionDragging(node)\"\n [style.padding-left.px]=\"node.level * 20\"\n [draggable]=\"true\"\n (click)=\"onSelectCollection(node.collection)\"\n (dragstart)=\"onDragStart($event, node)\"\n (dragend)=\"onDragEnd($event)\"\n (dragover)=\"onDragOver($event, node)\"\n (dragleave)=\"onDragLeave($event, node)\"\n (drop)=\"onDrop($event, node)\">\n @if (node.children.length > 0) {\n <i\n class=\"fas toggle-icon\"\n [ngClass]=\"node.expanded ? 'fa-chevron-down' : 'fa-chevron-right'\"\n (click)=\"toggleNode(node, $event)\">\n </i>\n }\n <i class=\"fas fa-folder collection-icon\" [style.color]=\"node.collection.Color || '#0076B6'\"></i>\n <span class=\"collection-name\">{{ node.collection.Name }}</span>\n <div class=\"node-actions\" (click)=\"$event.stopPropagation()\">\n @if (canEdit(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onCreateCollection(node.collection.ID)\" title=\"Add sub-collection\">\n <i class=\"fas fa-plus\"></i>\n </button>\n }\n @if (canDelete(node.collection)) {\n <button class=\"node-action-btn\" (click)=\"onDeleteCollection(node.collection)\" title=\"Delete\">\n <i class=\"fas fa-trash\"></i>\n </button>\n }\n </div>\n </div>\n\n @if (node.expanded) {\n @for (child of node.children; track child.collection.ID) {\n <ng-container *ngTemplateOutlet=\"recursiveTree; context: { node: child }\"></ng-container>\n }\n }\n </div>\n </ng-template>\n `,\n styles: [`\n .collection-tree { display: flex; flex-direction: column; height: 100%; }\n .tree-header { padding: 16px; border-bottom: 1px solid #D9D9D9; display: flex; justify-content: space-between; align-items: center; }\n .tree-header h3 { margin: 0; font-size: 16px; }\n .btn-new { padding: 6px 10px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; }\n .btn-new:hover { background: #005A8C; }\n .tree-content { flex: 1; overflow-y: auto; position: relative; }\n .tree-content.drag-over-root { background: rgba(0, 118, 182, 0.1); }\n .tree-node {\n padding: 8px 12px;\n cursor: move;\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n transition: all 0.2s ease;\n border: 2px solid transparent;\n }\n .tree-node:hover { background: #F4F4F4; }\n .tree-node.selected { background: #AAE7FD; }\n .tree-node.dragging {\n opacity: 0.4;\n cursor: grabbing;\n }\n .tree-node.drag-over {\n background: rgba(0, 118, 182, 0.1);\n border: 2px dashed #0076B6;\n border-radius: 4px;\n }\n .toggle-icon { font-size: 10px; color: #AAA; cursor: pointer; width: 12px; }\n .collection-icon { font-size: 14px; }\n .collection-name { flex: 1; font-size: 14px; user-select: none; }\n .node-actions { display: none; gap: 4px; }\n .tree-node:hover .node-actions { display: flex; }\n .node-action-btn { padding: 4px 6px; background: transparent; border: none; cursor: pointer; border-radius: 3px; color: #666; }\n .node-action-btn:hover { background: rgba(0,0,0,0.1); }\n `]\n})\nexport class CollectionTreeComponent implements OnInit {\n @Input() environmentId!: string;\n @Input() currentUser!: UserInfo;\n @Input() selectedCollectionId: string | null = null;\n @Input() userPermissions: Map<string, CollectionPermission> = new Map();\n\n @Output() collectionSelected = new EventEmitter<MJCollectionEntity>();\n @Output() collectionCreated = new EventEmitter<MJCollectionEntity>();\n @Output() collectionDeleted = new EventEmitter<MJCollectionEntity>();\n\n public collections: MJCollectionEntity[] = [];\n public treeNodes: TreeNode[] = [];\n public draggedNode: TreeNode | null = null;\n public dragOverNodeId: string | null = null;\n\n constructor(private permissionService: CollectionPermissionService) {}\n\n ngOnInit() {\n this.loadCollections();\n }\n\n private async loadCollections(): Promise<void> {\n try {\n const rv = new RunView();\n const result = await rv.RunView<MJCollectionEntity>({\n EntityName: 'MJ: Collections',\n ExtraFilter: `EnvironmentID='${this.environmentId}'`,\n OrderBy: 'Sequence ASC, Name ASC',\n ResultType: 'entity_object'\n }, this.currentUser);\n\n if (result.Success) {\n this.collections = result.Results || [];\n this.buildTree();\n }\n } catch (error) {\n console.error('Error loading collections:', error);\n }\n }\n\n private buildTree(): void {\n const rootCollections = this.collections.filter(c => !c.ParentID);\n this.treeNodes = rootCollections.map(c => this.buildNode(c, 0));\n }\n\n private buildNode(collection: MJCollectionEntity, level: number): TreeNode {\n const children = this.collections.filter(c => UUIDsEqual(c.ParentID, collection.ID));\n return {\n collection,\n children: children.map(c => this.buildNode(c, level + 1)),\n expanded: level === 0,\n level\n };\n }\n\n toggleNode(node: TreeNode, event: Event): void {\n event.stopPropagation();\n node.expanded = !node.expanded;\n }\n\n IsCollectionSelected(node: TreeNode): boolean {\n return UUIDsEqual(node.collection.ID, this.selectedCollectionId);\n }\n\n IsCollectionDragging(node: TreeNode): boolean {\n return UUIDsEqual(this.draggedNode?.collection?.ID, node.collection.ID);\n }\n\n onSelectCollection(collection: MJCollectionEntity): void {\n this.selectedCollectionId = collection.ID;\n this.collectionSelected.emit(collection);\n }\n\n async onCreateCollection(parentId: string | null): Promise<void> {\n // Validate permission if creating child collection\n if (parentId) {\n const parentCollection = this.collections.find(c => UUIDsEqual(c.ID, parentId));\n if (parentCollection) {\n // Check if user has Edit permission on parent\n if (parentCollection.OwnerID && !UUIDsEqual(parentCollection.OwnerID, this.currentUser.ID)) {\n const permission = await this.permissionService.checkPermission(\n parentId,\n this.currentUser.ID,\n this.currentUser\n );\n\n if (!permission?.canEdit) {\n alert('You do not have Edit permission to create a sub-collection.');\n return;\n }\n }\n }\n }\n\n const name = prompt('Enter collection name:');\n if (!name) return;\n\n try {\n const md = new Metadata();\n const collection = await md.GetEntityObject<MJCollectionEntity>('MJ: Collections', this.currentUser);\n\n collection.Name = name;\n collection.EnvironmentID = this.environmentId;\n\n if (parentId) {\n // Child collection - inherit parent's owner and set parent\n const parentCollection = this.collections.find(c => UUIDsEqual(c.ID, parentId));\n collection.ParentID = parentId;\n collection.OwnerID = parentCollection?.OwnerID || this.currentUser.ID;\n } else {\n // Root collection - current user becomes owner\n collection.OwnerID = this.currentUser.ID;\n }\n\n const saved = await collection.Save();\n if (saved) {\n this.collectionCreated.emit(collection);\n await this.loadCollections();\n }\n } catch (error) {\n console.error('Error creating collection:', error);\n alert('Failed to create collection');\n }\n }\n\n async onDeleteCollection(collection: MJCollectionEntity): Promise<void> {\n // Validate Delete permission\n if (collection.OwnerID && !UUIDsEqual(collection.OwnerID, this.currentUser.ID)) {\n const permission = await this.permissionService.checkPermission(\n collection.ID,\n this.currentUser.ID,\n this.currentUser\n );\n\n if (!permission?.canDelete) {\n alert('You do not have Delete permission for this collection.');\n return;\n }\n }\n\n if (!confirm(`Delete collection \"${collection.Name}\"?`)) return;\n\n try {\n const deleted = await collection.Delete();\n if (deleted) {\n this.collectionDeleted.emit(collection);\n await this.loadCollections();\n }\n } catch (error) {\n console.error('Error deleting collection:', error);\n alert('Failed to delete collection');\n }\n }\n\n onDragStart(event: DragEvent, node: TreeNode): void {\n this.draggedNode = node;\n const dragData: DragData = {\n collectionId: node.collection.ID,\n parentId: node.collection.ParentID || null\n };\n event.dataTransfer!.effectAllowed = 'move';\n event.dataTransfer!.setData('application/json', JSON.stringify(dragData));\n\n // Add visual feedback\n (event.target as HTMLElement).style.opacity = '0.4';\n }\n\n onDragEnd(event: DragEvent): void {\n // Clean up visual feedback\n (event.target as HTMLElement).style.opacity = '1';\n this.draggedNode = null;\n this.dragOverNodeId = null;\n }\n\n onDragOver(event: DragEvent, targetNode: TreeNode): void {\n event.preventDefault(); // Required to allow drop\n\n if (!this.draggedNode || UUIDsEqual(this.draggedNode.collection.ID, targetNode.collection.ID)) {\n event.dataTransfer!.dropEffect = 'none';\n return;\n }\n\n // Check if trying to drop into a descendant\n if (this.isDescendant(targetNode, this.draggedNode)) {\n event.dataTransfer!.dropEffect = 'none';\n return;\n }\n\n event.dataTransfer!.dropEffect = 'move';\n this.dragOverNodeId = targetNode.collection.ID;\n }\n\n onDragLeave(event: DragEvent, targetNode: TreeNode): void {\n if (this.dragOverNodeId === targetNode.collection.ID) {\n this.dragOverNodeId = null;\n }\n }\n\n async onDrop(event: DragEvent, targetNode: TreeNode): Promise<void> {\n event.preventDefault();\n event.stopPropagation();\n\n if (!this.draggedNode) {\n return;\n }\n\n // Don't allow dropping on itself\n if (UUIDsEqual(this.draggedNode.collection.ID, targetNode.collection.ID)) {\n this.dragOverNodeId = null;\n return;\n }\n\n // Check if trying to drop into a descendant\n if (this.isDescendant(targetNode, this.draggedNode)) {\n alert('Cannot move a collection into its own descendant');\n this.dragOverNodeId = null;\n return;\n }\n\n try {\n const collection = this.draggedNode.collection;\n const newParentId = targetNode.collection.ID;\n\n // Update the collection's parent\n collection.ParentID = newParentId;\n\n const saved = await collection.Save();\n if (saved) {\n // Reload the tree to reflect changes\n await this.loadCollections();\n } else {\n alert('Failed to move collection');\n }\n } catch (error) {\n LogError(error);\n alert('Error moving collection');\n } finally {\n this.dragOverNodeId = null;\n }\n }\n\n onDragOverRoot(event: DragEvent): void {\n event.preventDefault();\n\n if (!this.draggedNode) {\n event.dataTransfer!.dropEffect = 'none';\n return;\n }\n\n event.dataTransfer!.dropEffect = 'move';\n this.dragOverNodeId = 'root';\n }\n\n async onDropRoot(event: DragEvent): Promise<void> {\n event.preventDefault();\n event.stopPropagation();\n\n if (!this.draggedNode) {\n return;\n }\n\n try {\n const collection = this.draggedNode.collection;\n\n // Move to root level\n collection.ParentID = null;\n\n const saved = await collection.Save();\n if (saved) {\n await this.loadCollections();\n } else {\n alert('Failed to move collection to root');\n }\n } catch (error) {\n LogError(error);\n alert('Error moving collection to root');\n } finally {\n this.dragOverNodeId = null;\n }\n }\n\n private isDescendant(potentialDescendant: TreeNode, ancestor: TreeNode): boolean {\n if (UUIDsEqual(potentialDescendant.collection.ParentID, ancestor.collection.ID)) {\n return true;\n }\n\n for (const child of ancestor.children) {\n if (this.isDescendant(potentialDescendant, child)) {\n return true;\n }\n }\n\n return false;\n }\n\n // Permission checking methods\n canEdit(collection: MJCollectionEntity): boolean {\n // Backwards compatibility: treat null OwnerID as owned by current user\n if (!collection.OwnerID || UUIDsEqual(collection.OwnerID, this.currentUser.ID)) {\n return true;\n }\n\n // Check permission record\n const permission = this.userPermissions.get(collection.ID);\n return permission?.canEdit || false;\n }\n\n canDelete(collection: MJCollectionEntity): boolean {\n // Backwards compatibility: treat null OwnerID as owned by current user\n if (!collection.OwnerID || UUIDsEqual(collection.OwnerID, this.currentUser.ID)) {\n return true;\n }\n\n // Check permission record\n const permission = this.userPermissions.get(collection.ID);\n return permission?.canDelete || false;\n }\n\n canCreateAtRoot(): boolean {\n // Anyone can create at root level\n return true;\n }\n}"]}
@@ -58,6 +58,7 @@ export declare class CollectionsFullViewComponent implements OnInit, OnDestroy {
58
58
  showSortDropdown: boolean;
59
59
  activeArtifactId: string | null;
60
60
  isSelectMode: boolean;
61
+ IsArtifactActive(item: CollectionViewItem): boolean;
61
62
  showContextMenu: boolean;
62
63
  contextMenuPosition: {
63
64
  x: number;
@@ -1 +1 @@
1
- {"version":3,"file":"collections-full-view.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/collection/collections-full-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAgB,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,uBAAuB,EAA8B,MAAM,+BAA+B,CAAC;AAC1I,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE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EG;IACI,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;IAqBnD;;;;;OAKG;IACI,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IA8BzD;;OAEG;IACI,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAc3E,yDAAyD;IACzD,OAAO,CAAC,wBAAwB;IAYzB,gBAAgB,IAAI,IAAI;IAM/B,0CAA0C;IACnC,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAmChD,uCAAuC;IAEhC,WAAW,IAAI,IAAI;yCAnpCf,4BAA4B;2CAA5B,4BAA4B;CAwpCxC"}
1
+ {"version":3,"file":"collections-full-view.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/collection/collections-full-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAgB,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,uBAAuB,EAA8B,MAAM,+BAA+B,CAAC;AAC1I,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;;AAGnI;;;GAGG;AACH,qBAmwCa,4BAA6B,YAAW,MAAM,EAAE,SAAS;IAkDlE,OAAO,CAAC,aAAa;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IAAI,IAAI;IAM/B,0CAA0C;IACnC,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAmChD,uCAAuC;IAEhC,WAAW,IAAI,IAAI;yCAvpCf,4BAA4B;2CAA5B,4BAA4B;CA4pCxC"}
@@ -1,6 +1,7 @@
1
1
  import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
2
2
  import { RunView, Metadata } from '@memberjunction/core';
3
3
  import { Subject, takeUntil } from 'rxjs';
4
+ import { UUIDsEqual } from '@memberjunction/global';
4
5
  import * as i0 from "@angular/core";
5
6
  import * as i1 from "../../services/dialog.service";
6
7
  import * as i2 from "../../services/artifact-state.service";
@@ -387,7 +388,7 @@ function CollectionsFullViewComponent_Conditional_26_For_2_Template(rf, ctx) { i
387
388
  } if (rf & 2) {
388
389
  const item_r17 = ctx.$implicit;
389
390
  const ctx_r2 = i0.ɵɵnextContext(2);
390
- i0.ɵɵclassProp("selected", item_r17.selected)("active", item_r17.type === "artifact" && (item_r17.artifact == null ? null : item_r17.artifact.ID) === ctx_r2.activeArtifactId);
391
+ i0.ɵɵclassProp("selected", item_r17.selected)("active", item_r17.type === "artifact" && ctx_r2.IsArtifactActive(item_r17));
391
392
  i0.ɵɵadvance();
392
393
  i0.ɵɵconditional(ctx_r2.isSelectMode ? 1 : -1);
393
394
  i0.ɵɵadvance();
@@ -513,7 +514,7 @@ function CollectionsFullViewComponent_Conditional_27_For_24_Template(rf, ctx) {
513
514
  } if (rf & 2) {
514
515
  const item_r22 = ctx.$implicit;
515
516
  const ctx_r2 = i0.ɵɵnextContext(2);
516
- i0.ɵɵclassProp("selected", item_r22.selected)("active", item_r22.type === "artifact" && (item_r22.artifact == null ? null : item_r22.artifact.ID) === ctx_r2.activeArtifactId);
517
+ i0.ɵɵclassProp("selected", item_r22.selected)("active", item_r22.type === "artifact" && ctx_r2.IsArtifactActive(item_r22));
517
518
  i0.ɵɵadvance();
518
519
  i0.ɵɵconditional(ctx_r2.isSelectMode ? 1 : -1);
519
520
  i0.ɵɵadvance(3);
@@ -715,6 +716,9 @@ export class CollectionsFullViewComponent {
715
716
  showSortDropdown = false;
716
717
  activeArtifactId = null; // Track which artifact is currently being viewed
717
718
  isSelectMode = false; // Toggle for selection mode
719
+ IsArtifactActive(item) {
720
+ return UUIDsEqual(item.artifact?.ID, this.activeArtifactId);
721
+ }
718
722
  // Context menu state
719
723
  showContextMenu = false;
720
724
  contextMenuPosition = { x: 0, y: 0 };
@@ -1176,7 +1180,7 @@ export class CollectionsFullViewComponent {
1176
1180
  // Permission validation and checking methods
1177
1181
  async validatePermission(collection, requiredPermission) {
1178
1182
  // Owner has all permissions (including backwards compatibility for null OwnerID)
1179
- if (!collection?.OwnerID || collection.OwnerID === this.currentUser.ID) {
1183
+ if (!collection?.OwnerID || UUIDsEqual(collection.OwnerID, this.currentUser.ID)) {
1180
1184
  return true;
1181
1185
  }
1182
1186
  const permission = this.userPermissions.get(collection.ID);
@@ -1196,7 +1200,7 @@ export class CollectionsFullViewComponent {
1196
1200
  }
1197
1201
  canEdit(collection) {
1198
1202
  // Backwards compatibility: treat null OwnerID as owned by current user
1199
- if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID)
1203
+ if (!collection.OwnerID || UUIDsEqual(collection.OwnerID, this.currentUser.ID))
1200
1204
  return true;
1201
1205
  // Check permission record
1202
1206
  const permission = this.userPermissions.get(collection.ID);
@@ -1204,7 +1208,7 @@ export class CollectionsFullViewComponent {
1204
1208
  }
1205
1209
  canDelete(collection) {
1206
1210
  // Backwards compatibility: treat null OwnerID as owned by current user
1207
- if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID)
1211
+ if (!collection.OwnerID || UUIDsEqual(collection.OwnerID, this.currentUser.ID))
1208
1212
  return true;
1209
1213
  // Check permission record
1210
1214
  const permission = this.userPermissions.get(collection.ID);
@@ -1212,7 +1216,7 @@ export class CollectionsFullViewComponent {
1212
1216
  }
1213
1217
  canShare(collection) {
1214
1218
  // Backwards compatibility: treat null OwnerID as owned by current user
1215
- if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID)
1219
+ if (!collection.OwnerID || UUIDsEqual(collection.OwnerID, this.currentUser.ID))
1216
1220
  return true;
1217
1221
  // Check permission record
1218
1222
  const permission = this.userPermissions.get(collection.ID);
@@ -1241,7 +1245,7 @@ export class CollectionsFullViewComponent {
1241
1245
  }
1242
1246
  isShared(collection) {
1243
1247
  // Collection is shared if user is not the owner and OwnerID is set
1244
- return collection.OwnerID != null && collection.OwnerID !== this.currentUser.ID;
1248
+ return collection.OwnerID != null && !UUIDsEqual(collection.OwnerID, this.currentUser.ID);
1245
1249
  }
1246
1250
  // Sharing methods
1247
1251
  async shareCollection(collection) {
@@ -2017,7 +2021,7 @@ export class CollectionsFullViewComponent {
2017
2021
  <div
2018
2022
  class="grid-item"
2019
2023
  [class.selected]="item.selected"
2020
- [class.active]="item.type === 'artifact' && item.artifact?.ID === activeArtifactId"
2024
+ [class.active]="item.type === 'artifact' && IsArtifactActive(item)"
2021
2025
  (click)="onItemClick(item, $event)"
2022
2026
  (dblclick)="onItemDoubleClick(item, $event)"
2023
2027
  (contextmenu)="onItemContextMenu(item, $event)">
@@ -2151,7 +2155,7 @@ export class CollectionsFullViewComponent {
2151
2155
  <tr
2152
2156
  class="list-item"
2153
2157
  [class.selected]="item.selected"
2154
- [class.active]="item.type === 'artifact' && item.artifact?.ID === activeArtifactId"
2158
+ [class.active]="item.type === 'artifact' && IsArtifactActive(item)"
2155
2159
  (click)="onItemClick(item, $event)"
2156
2160
  (dblclick)="onItemDoubleClick(item, $event)"
2157
2161
  (contextmenu)="onItemContextMenu(item, $event)">
@@ -2291,5 +2295,5 @@ export class CollectionsFullViewComponent {
2291
2295
  type: HostListener,
2292
2296
  args: ['document:keydown.escape']
2293
2297
  }] }); })();
2294
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionsFullViewComponent, { className: "CollectionsFullViewComponent", filePath: "src/lib/components/collection/collections-full-view.component.ts", lineNumber: 1299 }); })();
2298
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionsFullViewComponent, { className: "CollectionsFullViewComponent", filePath: "src/lib/components/collection/collections-full-view.component.ts", lineNumber: 1300 }); })();
2295
2299
  //# sourceMappingURL=collections-full-view.component.js.map