@memberjunction/ng-conversations 2.107.0 → 2.108.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 (108) hide show
  1. package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +67 -0
  2. package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -0
  3. package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +725 -0
  4. package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -0
  5. package/dist/lib/components/collection/artifact-create-modal.component.d.ts +39 -0
  6. package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -0
  7. package/dist/lib/components/collection/artifact-create-modal.component.js +351 -0
  8. package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -0
  9. package/dist/lib/components/collection/collection-form-modal.component.d.ts +3 -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 +60 -10
  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 +43 -0
  14. package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -0
  15. package/dist/lib/components/collection/collection-share-modal.component.js +728 -0
  16. package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -0
  17. package/dist/lib/components/collection/collection-tree.component.d.ts +8 -1
  18. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
  19. package/dist/lib/components/collection/collection-tree.component.js +217 -115
  20. package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
  21. package/dist/lib/components/collection/collection-view.component.d.ts +2 -1
  22. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  23. package/dist/lib/components/collection/collection-view.component.js +52 -34
  24. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  25. package/dist/lib/components/collection/collections-full-view.component.d.ts +45 -9
  26. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  27. package/dist/lib/components/collection/collections-full-view.component.js +586 -220
  28. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  29. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +42 -15
  30. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  31. package/dist/lib/components/conversation/conversation-chat-area.component.js +336 -219
  32. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  33. package/dist/lib/components/message/message-input.component.d.ts +7 -1
  34. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  35. package/dist/lib/components/message/message-input.component.js +65 -10
  36. package/dist/lib/components/message/message-input.component.js.map +1 -1
  37. package/dist/lib/components/message/message-item.component.d.ts +39 -5
  38. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  39. package/dist/lib/components/message/message-item.component.js +259 -137
  40. package/dist/lib/components/message/message-item.component.js.map +1 -1
  41. package/dist/lib/components/message/message-list.component.d.ts +5 -1
  42. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  43. package/dist/lib/components/message/message-list.component.js +26 -12
  44. package/dist/lib/components/message/message-list.component.js.map +1 -1
  45. package/dist/lib/components/message/suggested-responses.component.d.ts +55 -0
  46. package/dist/lib/components/message/suggested-responses.component.d.ts.map +1 -0
  47. package/dist/lib/components/message/suggested-responses.component.js +207 -0
  48. package/dist/lib/components/message/suggested-responses.component.js.map +1 -0
  49. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  50. package/dist/lib/components/search/search-panel.component.js +245 -113
  51. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  52. package/dist/lib/components/shared/user-picker.component.d.ts +29 -0
  53. package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -0
  54. package/dist/lib/components/shared/user-picker.component.js +229 -0
  55. package/dist/lib/components/shared/user-picker.component.js.map +1 -0
  56. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +7 -1
  57. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
  58. package/dist/lib/components/tasks/tasks-dropdown.component.js +36 -6
  59. package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
  60. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +19 -2
  61. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  62. package/dist/lib/components/workspace/conversation-workspace.component.js +167 -58
  63. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  64. package/dist/lib/conversations.module.d.ts +52 -47
  65. package/dist/lib/conversations.module.d.ts.map +1 -1
  66. package/dist/lib/conversations.module.js +27 -4
  67. package/dist/lib/conversations.module.js.map +1 -1
  68. package/dist/lib/models/conversation-complete-query.model.d.ts +75 -0
  69. package/dist/lib/models/conversation-complete-query.model.d.ts.map +1 -0
  70. package/dist/lib/models/conversation-complete-query.model.js +19 -0
  71. package/dist/lib/models/conversation-complete-query.model.js.map +1 -0
  72. package/dist/lib/models/conversation-state.model.d.ts +27 -0
  73. package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
  74. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  75. package/dist/lib/services/agent-state.service.js +5 -0
  76. package/dist/lib/services/agent-state.service.js.map +1 -1
  77. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  78. package/dist/lib/services/artifact-state.service.js +14 -9
  79. package/dist/lib/services/artifact-state.service.js.map +1 -1
  80. package/dist/lib/services/collection-permission.service.d.ts +96 -0
  81. package/dist/lib/services/collection-permission.service.d.ts.map +1 -0
  82. package/dist/lib/services/collection-permission.service.js +303 -0
  83. package/dist/lib/services/collection-permission.service.js.map +1 -0
  84. package/dist/lib/services/collection-state.service.d.ts +34 -0
  85. package/dist/lib/services/collection-state.service.d.ts.map +1 -0
  86. package/dist/lib/services/collection-state.service.js +50 -0
  87. package/dist/lib/services/collection-state.service.js.map +1 -0
  88. package/dist/lib/services/conversation-agent.service.d.ts +9 -4
  89. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  90. package/dist/lib/services/conversation-agent.service.js +41 -12
  91. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  92. package/dist/lib/services/data-cache.service.d.ts.map +1 -1
  93. package/dist/lib/services/data-cache.service.js +5 -0
  94. package/dist/lib/services/data-cache.service.js.map +1 -1
  95. package/dist/lib/services/mention-autocomplete.service.js +1 -1
  96. package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
  97. package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
  98. package/dist/lib/services/mention-parser.service.js +0 -5
  99. package/dist/lib/services/mention-parser.service.js.map +1 -1
  100. package/dist/lib/services/search.service.d.ts +26 -3
  101. package/dist/lib/services/search.service.d.ts.map +1 -1
  102. package/dist/lib/services/search.service.js +172 -12
  103. package/dist/lib/services/search.service.js.map +1 -1
  104. package/dist/public-api.d.ts +3 -0
  105. package/dist/public-api.d.ts.map +1 -1
  106. package/dist/public-api.js +3 -0
  107. package/dist/public-api.js.map +1 -1
  108. package/package.json +12 -12
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection-share-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-share-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAuD,MAAM,eAAe,CAAC;AAC5H,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI/D,OAAO,EAAE,mBAAmB,EAAoB,MAAM,iCAAiC,CAAC;;;;;;;;;IA2D5C,AADJ,iCAAmC,gBAC8B;IAAtC,iXAAqC;IAA5D,iBAA6D;IAC7D,gCAA+B;IAC3B,wBAAuC;IACvC,uBACJ;IAAA,iBAAO;IACP,gCAA8B;IAAA,iCAAiB;IACnD,AADmD,iBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwMT;4FAIQ,MAAM;kBAAd,KAAK;YACG,UAAU;kBAAlB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,sBAAsB;kBAA9B,KAAK;YAEI,KAAK;kBAAd,MAAM;YACG,SAAS;kBAAlB,MAAM;;kFAPE,6BAA6B"}
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { CollectionEntity } from '@memberjunction/core-entities';
3
3
  import { UserInfo } from '@memberjunction/core';
4
+ import { CollectionPermission, CollectionPermissionService } from '../../services/collection-permission.service';
4
5
  import * as i0 from "@angular/core";
5
6
  interface TreeNode {
6
7
  collection: CollectionEntity;
@@ -9,9 +10,11 @@ interface TreeNode {
9
10
  level: number;
10
11
  }
11
12
  export declare class CollectionTreeComponent implements OnInit {
13
+ private permissionService;
12
14
  environmentId: string;
13
15
  currentUser: UserInfo;
14
16
  selectedCollectionId: string | null;
17
+ userPermissions: Map<string, CollectionPermission>;
15
18
  collectionSelected: EventEmitter<CollectionEntity>;
16
19
  collectionCreated: EventEmitter<CollectionEntity>;
17
20
  collectionDeleted: EventEmitter<CollectionEntity>;
@@ -19,6 +22,7 @@ export declare class CollectionTreeComponent implements OnInit {
19
22
  treeNodes: TreeNode[];
20
23
  draggedNode: TreeNode | null;
21
24
  dragOverNodeId: string | null;
25
+ constructor(permissionService: CollectionPermissionService);
22
26
  ngOnInit(): void;
23
27
  private loadCollections;
24
28
  private buildTree;
@@ -35,8 +39,11 @@ export declare class CollectionTreeComponent implements OnInit {
35
39
  onDragOverRoot(event: DragEvent): void;
36
40
  onDropRoot(event: DragEvent): Promise<void>;
37
41
  private isDescendant;
42
+ canEdit(collection: CollectionEntity): boolean;
43
+ canDelete(collection: CollectionEntity): boolean;
44
+ canCreateAtRoot(): boolean;
38
45
  static ɵfac: i0.ɵɵFactoryDeclaration<CollectionTreeComponent, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<CollectionTreeComponent, "mj-collection-tree", never, { "environmentId": { "alias": "environmentId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "selectedCollectionId": { "alias": "selectedCollectionId"; "required": false; }; }, { "collectionSelected": "collectionSelected"; "collectionCreated": "collectionCreated"; "collectionDeleted": "collectionDeleted"; }, never, never, false, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollectionTreeComponent, "mj-collection-tree", never, { "environmentId": { "alias": "environmentId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "selectedCollectionId": { "alias": "selectedCollectionId"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; }, { "collectionSelected": "collectionSelected"; "collectionCreated": "collectionCreated"; "collectionDeleted": "collectionDeleted"; }, never, never, false, never>;
40
47
  }
41
48
  export {};
42
49
  //# sourceMappingURL=collection-tree.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection-tree.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/collection/collection-tree.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAA+B,MAAM,sBAAsB,CAAC;;AAE7E,UAAU,QAAQ;IAChB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAOD,qBA4Ia,uBAAwB,YAAW,MAAM;IAC3C,aAAa,EAAG,MAAM,CAAC;IACvB,WAAW,EA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,GAAG,OAAO,CAAC,IAAI,CAAC;IAoD1D,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BrE,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI;IAanD,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAOjC,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,GAAG,IAAI;IAkBxD,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,GAAG,IAAI;IAMnD,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IA2CnE,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAYhC,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BjD,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO;IAW9C,SAAS,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO;IAWhD,eAAe,IAAI,OAAO;yCAtTf,uBAAuB;2CAAvB,uBAAuB;CA0TnC"}
@@ -1,139 +1,173 @@
1
1
  import { Component, Input, Output, EventEmitter } from '@angular/core';
2
2
  import { RunView, Metadata, LogError } from '@memberjunction/core';
3
3
  import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/common";
4
+ import * as i1 from "../../services/collection-permission.service";
5
+ import * as i2 from "@angular/common";
5
6
  const _forTrack0 = ($index, $item) => $item.collection.ID;
6
7
  const _c0 = a0 => ({ node: a0 });
7
- function CollectionTreeComponent_For_8_Conditional_2_Template(rf, ctx) { if (rf & 1) {
8
- const _r5 = i0.ɵɵgetCurrentView();
8
+ function CollectionTreeComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
9
+ const _r2 = i0.ɵɵgetCurrentView();
10
+ i0.ɵɵelementStart(0, "button", 6);
11
+ i0.ɵɵlistener("click", function CollectionTreeComponent_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCreateCollection(null)); });
12
+ i0.ɵɵelement(1, "i", 7);
13
+ i0.ɵɵelementEnd();
14
+ } }
15
+ function CollectionTreeComponent_For_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
16
+ const _r6 = i0.ɵɵgetCurrentView();
9
17
  i0.ɵɵelementStart(0, "i", 15);
10
- i0.ɵɵlistener("click", function CollectionTreeComponent_For_8_Conditional_2_Template_i_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const node_r3 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.toggleNode(node_r3, $event)); });
18
+ i0.ɵɵlistener("click", function CollectionTreeComponent_For_7_Conditional_2_Template_i_click_0_listener($event) { i0.ɵɵrestoreView(_r6); const node_r5 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleNode(node_r5, $event)); });
11
19
  i0.ɵɵelementEnd();
12
20
  } if (rf & 2) {
13
- const node_r3 = i0.ɵɵnextContext().$implicit;
14
- i0.ɵɵproperty("ngClass", node_r3.expanded ? "fa-chevron-down" : "fa-chevron-right");
21
+ const node_r5 = i0.ɵɵnextContext().$implicit;
22
+ i0.ɵɵproperty("ngClass", node_r5.expanded ? "fa-chevron-down" : "fa-chevron-right");
15
23
  } }
16
- function CollectionTreeComponent_For_8_Conditional_11_For_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
24
+ function CollectionTreeComponent_For_7_Conditional_7_Template(rf, ctx) { if (rf & 1) {
25
+ const _r7 = i0.ɵɵgetCurrentView();
26
+ i0.ɵɵelementStart(0, "button", 16);
27
+ i0.ɵɵlistener("click", function CollectionTreeComponent_For_7_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const node_r5 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCreateCollection(node_r5.collection.ID)); });
28
+ i0.ɵɵelement(1, "i", 7);
29
+ i0.ɵɵelementEnd();
30
+ } }
31
+ function CollectionTreeComponent_For_7_Conditional_8_Template(rf, ctx) { if (rf & 1) {
32
+ const _r8 = i0.ɵɵgetCurrentView();
33
+ i0.ɵɵelementStart(0, "button", 17);
34
+ i0.ɵɵlistener("click", function CollectionTreeComponent_For_7_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const node_r5 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDeleteCollection(node_r5.collection)); });
35
+ i0.ɵɵelement(1, "i", 18);
36
+ i0.ɵɵelementEnd();
37
+ } }
38
+ function CollectionTreeComponent_For_7_Conditional_9_For_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
17
39
  i0.ɵɵelementContainer(0);
18
40
  } }
19
- function CollectionTreeComponent_For_8_Conditional_11_For_1_Template(rf, ctx) { if (rf & 1) {
20
- i0.ɵɵtemplate(0, CollectionTreeComponent_For_8_Conditional_11_For_1_ng_container_0_Template, 1, 0, "ng-container", 16);
41
+ function CollectionTreeComponent_For_7_Conditional_9_For_1_Template(rf, ctx) { if (rf & 1) {
42
+ i0.ɵɵtemplate(0, CollectionTreeComponent_For_7_Conditional_9_For_1_ng_container_0_Template, 1, 0, "ng-container", 19);
21
43
  } if (rf & 2) {
22
- const child_r6 = ctx.$implicit;
44
+ const child_r9 = ctx.$implicit;
23
45
  i0.ɵɵnextContext(3);
24
- const recursiveTree_r7 = i0.ɵɵreference(10);
25
- i0.ɵɵproperty("ngTemplateOutlet", recursiveTree_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, child_r6));
46
+ const recursiveTree_r10 = i0.ɵɵreference(9);
47
+ i0.ɵɵproperty("ngTemplateOutlet", recursiveTree_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, child_r9));
26
48
  } }
27
- function CollectionTreeComponent_For_8_Conditional_11_Template(rf, ctx) { if (rf & 1) {
28
- i0.ɵɵrepeaterCreate(0, CollectionTreeComponent_For_8_Conditional_11_For_1_Template, 1, 4, "ng-container", null, _forTrack0);
49
+ function CollectionTreeComponent_For_7_Conditional_9_Template(rf, ctx) { if (rf & 1) {
50
+ i0.ɵɵrepeaterCreate(0, CollectionTreeComponent_For_7_Conditional_9_For_1_Template, 1, 4, "ng-container", null, _forTrack0);
29
51
  } if (rf & 2) {
30
- const node_r3 = i0.ɵɵnextContext().$implicit;
31
- i0.ɵɵrepeater(node_r3.children);
52
+ const node_r5 = i0.ɵɵnextContext().$implicit;
53
+ i0.ɵɵrepeater(node_r5.children);
32
54
  } }
33
- function CollectionTreeComponent_For_8_Template(rf, ctx) { if (rf & 1) {
34
- const _r2 = i0.ɵɵgetCurrentView();
35
- i0.ɵɵelementStart(0, "div", 6)(1, "div", 7);
36
- i0.ɵɵlistener("click", function CollectionTreeComponent_For_8_Template_div_click_1_listener() { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onSelectCollection(node_r3.collection)); })("dragstart", function CollectionTreeComponent_For_8_Template_div_dragstart_1_listener($event) { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragStart($event, node_r3)); })("dragend", function CollectionTreeComponent_For_8_Template_div_dragend_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragEnd($event)); })("dragover", function CollectionTreeComponent_For_8_Template_div_dragover_1_listener($event) { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragOver($event, node_r3)); })("dragleave", function CollectionTreeComponent_For_8_Template_div_dragleave_1_listener($event) { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragLeave($event, node_r3)); })("drop", function CollectionTreeComponent_For_8_Template_div_drop_1_listener($event) { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDrop($event, node_r3)); });
37
- i0.ɵɵtemplate(2, CollectionTreeComponent_For_8_Conditional_2_Template, 1, 1, "i", 8);
38
- i0.ɵɵelement(3, "i", 9);
39
- i0.ɵɵelementStart(4, "span", 10);
55
+ function CollectionTreeComponent_For_7_Template(rf, ctx) { if (rf & 1) {
56
+ const _r4 = i0.ɵɵgetCurrentView();
57
+ i0.ɵɵelementStart(0, "div", 5)(1, "div", 8);
58
+ i0.ɵɵlistener("click", function CollectionTreeComponent_For_7_Template_div_click_1_listener() { const node_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSelectCollection(node_r5.collection)); })("dragstart", function CollectionTreeComponent_For_7_Template_div_dragstart_1_listener($event) { const node_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragStart($event, node_r5)); })("dragend", function CollectionTreeComponent_For_7_Template_div_dragend_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragEnd($event)); })("dragover", function CollectionTreeComponent_For_7_Template_div_dragover_1_listener($event) { const node_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragOver($event, node_r5)); })("dragleave", function CollectionTreeComponent_For_7_Template_div_dragleave_1_listener($event) { const node_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragLeave($event, node_r5)); })("drop", function CollectionTreeComponent_For_7_Template_div_drop_1_listener($event) { const node_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDrop($event, node_r5)); });
59
+ i0.ɵɵtemplate(2, CollectionTreeComponent_For_7_Conditional_2_Template, 1, 1, "i", 9);
60
+ i0.ɵɵelement(3, "i", 10);
61
+ i0.ɵɵelementStart(4, "span", 11);
40
62
  i0.ɵɵtext(5);
41
63
  i0.ɵɵelementEnd();
42
- i0.ɵɵelementStart(6, "div", 11);
43
- i0.ɵɵlistener("click", function CollectionTreeComponent_For_8_Template_div_click_6_listener($event) { i0.ɵɵrestoreView(_r2); return i0.ɵɵresetView($event.stopPropagation()); });
44
- i0.ɵɵelementStart(7, "button", 12);
45
- i0.ɵɵlistener("click", function CollectionTreeComponent_For_8_Template_button_click_7_listener() { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onCreateCollection(node_r3.collection.ID)); });
46
- i0.ɵɵelement(8, "i", 4);
47
- i0.ɵɵelementEnd();
48
- i0.ɵɵelementStart(9, "button", 13);
49
- i0.ɵɵlistener("click", function CollectionTreeComponent_For_8_Template_button_click_9_listener() { const node_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDeleteCollection(node_r3.collection)); });
50
- i0.ɵɵelement(10, "i", 14);
51
- i0.ɵɵelementEnd()()();
52
- i0.ɵɵtemplate(11, CollectionTreeComponent_For_8_Conditional_11_Template, 2, 0);
64
+ i0.ɵɵelementStart(6, "div", 12);
65
+ i0.ɵɵlistener("click", function CollectionTreeComponent_For_7_Template_div_click_6_listener($event) { i0.ɵɵrestoreView(_r4); return i0.ɵɵresetView($event.stopPropagation()); });
66
+ i0.ɵɵtemplate(7, CollectionTreeComponent_For_7_Conditional_7_Template, 2, 0, "button", 13)(8, CollectionTreeComponent_For_7_Conditional_8_Template, 2, 0, "button", 14);
67
+ i0.ɵɵelementEnd()();
68
+ i0.ɵɵtemplate(9, CollectionTreeComponent_For_7_Conditional_9_Template, 2, 0);
53
69
  i0.ɵɵelementEnd();
54
70
  } if (rf & 2) {
55
- const node_r3 = ctx.$implicit;
56
- const ctx_r3 = i0.ɵɵnextContext();
71
+ const node_r5 = ctx.$implicit;
72
+ const ctx_r2 = i0.ɵɵnextContext();
57
73
  i0.ɵɵadvance();
58
- i0.ɵɵstyleProp("padding-left", node_r3.level * 20, "px");
59
- i0.ɵɵclassProp("selected", node_r3.collection.ID === ctx_r3.selectedCollectionId)("drag-over", ctx_r3.dragOverNodeId === node_r3.collection.ID)("dragging", (ctx_r3.draggedNode == null ? null : ctx_r3.draggedNode.collection == null ? null : ctx_r3.draggedNode.collection.ID) === node_r3.collection.ID);
74
+ i0.ɵɵstyleProp("padding-left", node_r5.level * 20, "px");
75
+ i0.ɵɵclassProp("selected", node_r5.collection.ID === ctx_r2.selectedCollectionId)("drag-over", ctx_r2.dragOverNodeId === node_r5.collection.ID)("dragging", (ctx_r2.draggedNode == null ? null : ctx_r2.draggedNode.collection == null ? null : ctx_r2.draggedNode.collection.ID) === node_r5.collection.ID);
60
76
  i0.ɵɵproperty("draggable", true);
61
77
  i0.ɵɵadvance();
62
- i0.ɵɵconditional(node_r3.children.length > 0 ? 2 : -1);
78
+ i0.ɵɵconditional(node_r5.children.length > 0 ? 2 : -1);
63
79
  i0.ɵɵadvance();
64
- i0.ɵɵstyleProp("color", node_r3.collection.Color || "#0076B6");
80
+ i0.ɵɵstyleProp("color", node_r5.collection.Color || "#0076B6");
81
+ i0.ɵɵadvance(2);
82
+ i0.ɵɵtextInterpolate(node_r5.collection.Name);
65
83
  i0.ɵɵadvance(2);
66
- i0.ɵɵtextInterpolate(node_r3.collection.Name);
67
- i0.ɵɵadvance(6);
68
- i0.ɵɵconditional(node_r3.expanded ? 11 : -1);
84
+ i0.ɵɵconditional(ctx_r2.canEdit(node_r5.collection) ? 7 : -1);
85
+ i0.ɵɵadvance();
86
+ i0.ɵɵconditional(ctx_r2.canDelete(node_r5.collection) ? 8 : -1);
87
+ i0.ɵɵadvance();
88
+ i0.ɵɵconditional(node_r5.expanded ? 9 : -1);
69
89
  } }
70
- function CollectionTreeComponent_ng_template_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
71
- const _r10 = i0.ɵɵgetCurrentView();
90
+ function CollectionTreeComponent_ng_template_8_Conditional_2_Template(rf, ctx) { if (rf & 1) {
91
+ const _r13 = i0.ɵɵgetCurrentView();
72
92
  i0.ɵɵelementStart(0, "i", 15);
73
- i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_9_Conditional_2_Template_i_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const node_r9 = i0.ɵɵnextContext().node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.toggleNode(node_r9, $event)); });
93
+ i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_8_Conditional_2_Template_i_click_0_listener($event) { i0.ɵɵrestoreView(_r13); const node_r12 = i0.ɵɵnextContext().node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleNode(node_r12, $event)); });
74
94
  i0.ɵɵelementEnd();
75
95
  } if (rf & 2) {
76
- const node_r9 = i0.ɵɵnextContext().node;
77
- i0.ɵɵproperty("ngClass", node_r9.expanded ? "fa-chevron-down" : "fa-chevron-right");
96
+ const node_r12 = i0.ɵɵnextContext().node;
97
+ i0.ɵɵproperty("ngClass", node_r12.expanded ? "fa-chevron-down" : "fa-chevron-right");
98
+ } }
99
+ function CollectionTreeComponent_ng_template_8_Conditional_7_Template(rf, ctx) { if (rf & 1) {
100
+ const _r14 = i0.ɵɵgetCurrentView();
101
+ i0.ɵɵelementStart(0, "button", 16);
102
+ i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_8_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const node_r12 = i0.ɵɵnextContext().node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCreateCollection(node_r12.collection.ID)); });
103
+ i0.ɵɵelement(1, "i", 7);
104
+ i0.ɵɵelementEnd();
105
+ } }
106
+ function CollectionTreeComponent_ng_template_8_Conditional_8_Template(rf, ctx) { if (rf & 1) {
107
+ const _r15 = i0.ɵɵgetCurrentView();
108
+ i0.ɵɵelementStart(0, "button", 17);
109
+ i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_8_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const node_r12 = i0.ɵɵnextContext().node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDeleteCollection(node_r12.collection)); });
110
+ i0.ɵɵelement(1, "i", 18);
111
+ i0.ɵɵelementEnd();
78
112
  } }
79
- function CollectionTreeComponent_ng_template_9_Conditional_11_For_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
113
+ function CollectionTreeComponent_ng_template_8_Conditional_9_For_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
80
114
  i0.ɵɵelementContainer(0);
81
115
  } }
82
- function CollectionTreeComponent_ng_template_9_Conditional_11_For_1_Template(rf, ctx) { if (rf & 1) {
83
- i0.ɵɵtemplate(0, CollectionTreeComponent_ng_template_9_Conditional_11_For_1_ng_container_0_Template, 1, 0, "ng-container", 16);
116
+ function CollectionTreeComponent_ng_template_8_Conditional_9_For_1_Template(rf, ctx) { if (rf & 1) {
117
+ i0.ɵɵtemplate(0, CollectionTreeComponent_ng_template_8_Conditional_9_For_1_ng_container_0_Template, 1, 0, "ng-container", 19);
84
118
  } if (rf & 2) {
85
- const child_r11 = ctx.$implicit;
119
+ const child_r16 = ctx.$implicit;
86
120
  i0.ɵɵnextContext(3);
87
- const recursiveTree_r7 = i0.ɵɵreference(10);
88
- i0.ɵɵproperty("ngTemplateOutlet", recursiveTree_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, child_r11));
121
+ const recursiveTree_r10 = i0.ɵɵreference(9);
122
+ i0.ɵɵproperty("ngTemplateOutlet", recursiveTree_r10)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, child_r16));
89
123
  } }
90
- function CollectionTreeComponent_ng_template_9_Conditional_11_Template(rf, ctx) { if (rf & 1) {
91
- i0.ɵɵrepeaterCreate(0, CollectionTreeComponent_ng_template_9_Conditional_11_For_1_Template, 1, 4, "ng-container", null, _forTrack0);
124
+ function CollectionTreeComponent_ng_template_8_Conditional_9_Template(rf, ctx) { if (rf & 1) {
125
+ i0.ɵɵrepeaterCreate(0, CollectionTreeComponent_ng_template_8_Conditional_9_For_1_Template, 1, 4, "ng-container", null, _forTrack0);
92
126
  } if (rf & 2) {
93
- const node_r9 = i0.ɵɵnextContext().node;
94
- i0.ɵɵrepeater(node_r9.children);
127
+ const node_r12 = i0.ɵɵnextContext().node;
128
+ i0.ɵɵrepeater(node_r12.children);
95
129
  } }
96
- function CollectionTreeComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
97
- const _r8 = i0.ɵɵgetCurrentView();
98
- i0.ɵɵelementStart(0, "div", 6)(1, "div", 7);
99
- i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_9_Template_div_click_1_listener() { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onSelectCollection(node_r9.collection)); })("dragstart", function CollectionTreeComponent_ng_template_9_Template_div_dragstart_1_listener($event) { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragStart($event, node_r9)); })("dragend", function CollectionTreeComponent_ng_template_9_Template_div_dragend_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragEnd($event)); })("dragover", function CollectionTreeComponent_ng_template_9_Template_div_dragover_1_listener($event) { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragOver($event, node_r9)); })("dragleave", function CollectionTreeComponent_ng_template_9_Template_div_dragleave_1_listener($event) { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDragLeave($event, node_r9)); })("drop", function CollectionTreeComponent_ng_template_9_Template_div_drop_1_listener($event) { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDrop($event, node_r9)); });
100
- i0.ɵɵtemplate(2, CollectionTreeComponent_ng_template_9_Conditional_2_Template, 1, 1, "i", 8);
101
- i0.ɵɵelement(3, "i", 9);
102
- i0.ɵɵelementStart(4, "span", 10);
130
+ function CollectionTreeComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
131
+ const _r11 = i0.ɵɵgetCurrentView();
132
+ i0.ɵɵelementStart(0, "div", 5)(1, "div", 8);
133
+ i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_8_Template_div_click_1_listener() { const node_r12 = i0.ɵɵrestoreView(_r11).node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSelectCollection(node_r12.collection)); })("dragstart", function CollectionTreeComponent_ng_template_8_Template_div_dragstart_1_listener($event) { const node_r12 = i0.ɵɵrestoreView(_r11).node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragStart($event, node_r12)); })("dragend", function CollectionTreeComponent_ng_template_8_Template_div_dragend_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragEnd($event)); })("dragover", function CollectionTreeComponent_ng_template_8_Template_div_dragover_1_listener($event) { const node_r12 = i0.ɵɵrestoreView(_r11).node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragOver($event, node_r12)); })("dragleave", function CollectionTreeComponent_ng_template_8_Template_div_dragleave_1_listener($event) { const node_r12 = i0.ɵɵrestoreView(_r11).node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragLeave($event, node_r12)); })("drop", function CollectionTreeComponent_ng_template_8_Template_div_drop_1_listener($event) { const node_r12 = i0.ɵɵrestoreView(_r11).node; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDrop($event, node_r12)); });
134
+ i0.ɵɵtemplate(2, CollectionTreeComponent_ng_template_8_Conditional_2_Template, 1, 1, "i", 9);
135
+ i0.ɵɵelement(3, "i", 10);
136
+ i0.ɵɵelementStart(4, "span", 11);
103
137
  i0.ɵɵtext(5);
104
138
  i0.ɵɵelementEnd();
105
- i0.ɵɵelementStart(6, "div", 11);
106
- i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_9_Template_div_click_6_listener($event) { i0.ɵɵrestoreView(_r8); return i0.ɵɵresetView($event.stopPropagation()); });
107
- i0.ɵɵelementStart(7, "button", 12);
108
- i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_9_Template_button_click_7_listener() { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onCreateCollection(node_r9.collection.ID)); });
109
- i0.ɵɵelement(8, "i", 4);
110
- i0.ɵɵelementEnd();
111
- i0.ɵɵelementStart(9, "button", 13);
112
- i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_9_Template_button_click_9_listener() { const node_r9 = i0.ɵɵrestoreView(_r8).node; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onDeleteCollection(node_r9.collection)); });
113
- i0.ɵɵelement(10, "i", 14);
114
- i0.ɵɵelementEnd()()();
115
- i0.ɵɵtemplate(11, CollectionTreeComponent_ng_template_9_Conditional_11_Template, 2, 0);
139
+ i0.ɵɵelementStart(6, "div", 12);
140
+ i0.ɵɵlistener("click", function CollectionTreeComponent_ng_template_8_Template_div_click_6_listener($event) { i0.ɵɵrestoreView(_r11); return i0.ɵɵresetView($event.stopPropagation()); });
141
+ i0.ɵɵtemplate(7, CollectionTreeComponent_ng_template_8_Conditional_7_Template, 2, 0, "button", 13)(8, CollectionTreeComponent_ng_template_8_Conditional_8_Template, 2, 0, "button", 14);
142
+ i0.ɵɵelementEnd()();
143
+ i0.ɵɵtemplate(9, CollectionTreeComponent_ng_template_8_Conditional_9_Template, 2, 0);
116
144
  i0.ɵɵelementEnd();
117
145
  } if (rf & 2) {
118
- const node_r9 = ctx.node;
119
- const ctx_r3 = i0.ɵɵnextContext();
146
+ const node_r12 = ctx.node;
147
+ const ctx_r2 = i0.ɵɵnextContext();
120
148
  i0.ɵɵadvance();
121
- i0.ɵɵstyleProp("padding-left", node_r9.level * 20, "px");
122
- i0.ɵɵclassProp("selected", node_r9.collection.ID === ctx_r3.selectedCollectionId)("drag-over", ctx_r3.dragOverNodeId === node_r9.collection.ID)("dragging", (ctx_r3.draggedNode == null ? null : ctx_r3.draggedNode.collection == null ? null : ctx_r3.draggedNode.collection.ID) === node_r9.collection.ID);
149
+ i0.ɵɵstyleProp("padding-left", node_r12.level * 20, "px");
150
+ i0.ɵɵclassProp("selected", node_r12.collection.ID === ctx_r2.selectedCollectionId)("drag-over", ctx_r2.dragOverNodeId === node_r12.collection.ID)("dragging", (ctx_r2.draggedNode == null ? null : ctx_r2.draggedNode.collection == null ? null : ctx_r2.draggedNode.collection.ID) === node_r12.collection.ID);
123
151
  i0.ɵɵproperty("draggable", true);
124
152
  i0.ɵɵadvance();
125
- i0.ɵɵconditional(node_r9.children.length > 0 ? 2 : -1);
153
+ i0.ɵɵconditional(node_r12.children.length > 0 ? 2 : -1);
126
154
  i0.ɵɵadvance();
127
- i0.ɵɵstyleProp("color", node_r9.collection.Color || "#0076B6");
155
+ i0.ɵɵstyleProp("color", node_r12.collection.Color || "#0076B6");
156
+ i0.ɵɵadvance(2);
157
+ i0.ɵɵtextInterpolate(node_r12.collection.Name);
128
158
  i0.ɵɵadvance(2);
129
- i0.ɵɵtextInterpolate(node_r9.collection.Name);
130
- i0.ɵɵadvance(6);
131
- i0.ɵɵconditional(node_r9.expanded ? 11 : -1);
159
+ i0.ɵɵconditional(ctx_r2.canEdit(node_r12.collection) ? 7 : -1);
160
+ i0.ɵɵadvance();
161
+ i0.ɵɵconditional(ctx_r2.canDelete(node_r12.collection) ? 8 : -1);
162
+ i0.ɵɵadvance();
163
+ i0.ɵɵconditional(node_r12.expanded ? 9 : -1);
132
164
  } }
133
165
  export class CollectionTreeComponent {
166
+ permissionService;
134
167
  environmentId;
135
168
  currentUser;
136
169
  selectedCollectionId = null;
170
+ userPermissions = new Map();
137
171
  collectionSelected = new EventEmitter();
138
172
  collectionCreated = new EventEmitter();
139
173
  collectionDeleted = new EventEmitter();
@@ -141,6 +175,9 @@ export class CollectionTreeComponent {
141
175
  treeNodes = [];
142
176
  draggedNode = null;
143
177
  dragOverNodeId = null;
178
+ constructor(permissionService) {
179
+ this.permissionService = permissionService;
180
+ }
144
181
  ngOnInit() {
145
182
  this.loadCollections();
146
183
  }
@@ -184,6 +221,20 @@ export class CollectionTreeComponent {
184
221
  this.collectionSelected.emit(collection);
185
222
  }
186
223
  async onCreateCollection(parentId) {
224
+ // Validate permission if creating child collection
225
+ if (parentId) {
226
+ const parentCollection = this.collections.find(c => c.ID === parentId);
227
+ if (parentCollection) {
228
+ // Check if user has Edit permission on parent
229
+ if (parentCollection.OwnerID && parentCollection.OwnerID !== this.currentUser.ID) {
230
+ const permission = await this.permissionService.checkPermission(parentId, this.currentUser.ID, this.currentUser);
231
+ if (!permission?.canEdit) {
232
+ alert('You do not have Edit permission to create a sub-collection.');
233
+ return;
234
+ }
235
+ }
236
+ }
237
+ }
187
238
  const name = prompt('Enter collection name:');
188
239
  if (!name)
189
240
  return;
@@ -192,8 +243,16 @@ export class CollectionTreeComponent {
192
243
  const collection = await md.GetEntityObject('MJ: Collections', this.currentUser);
193
244
  collection.Name = name;
194
245
  collection.EnvironmentID = this.environmentId;
195
- if (parentId)
246
+ if (parentId) {
247
+ // Child collection - inherit parent's owner and set parent
248
+ const parentCollection = this.collections.find(c => c.ID === parentId);
196
249
  collection.ParentID = parentId;
250
+ collection.OwnerID = parentCollection?.OwnerID || this.currentUser.ID;
251
+ }
252
+ else {
253
+ // Root collection - current user becomes owner
254
+ collection.OwnerID = this.currentUser.ID;
255
+ }
197
256
  const saved = await collection.Save();
198
257
  if (saved) {
199
258
  this.collectionCreated.emit(collection);
@@ -206,6 +265,14 @@ export class CollectionTreeComponent {
206
265
  }
207
266
  }
208
267
  async onDeleteCollection(collection) {
268
+ // Validate Delete permission
269
+ if (collection.OwnerID && collection.OwnerID !== this.currentUser.ID) {
270
+ const permission = await this.permissionService.checkPermission(collection.ID, this.currentUser.ID, this.currentUser);
271
+ if (!permission?.canDelete) {
272
+ alert('You do not have Delete permission for this collection.');
273
+ return;
274
+ }
275
+ }
209
276
  if (!confirm(`Delete collection "${collection.Name}"?`))
210
277
  return;
211
278
  try {
@@ -341,27 +408,50 @@ export class CollectionTreeComponent {
341
408
  }
342
409
  return false;
343
410
  }
344
- static ɵfac = function CollectionTreeComponent_Factory(t) { return new (t || CollectionTreeComponent)(); };
345
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionTreeComponent, selectors: [["mj-collection-tree"]], inputs: { environmentId: "environmentId", currentUser: "currentUser", selectedCollectionId: "selectedCollectionId" }, outputs: { collectionSelected: "collectionSelected", collectionCreated: "collectionCreated", collectionDeleted: "collectionDeleted" }, decls: 11, vars: 2, consts: [["recursiveTree", ""], [1, "collection-tree"], [1, "tree-header"], ["title", "New Collection", 1, "btn-new", 3, "click"], [1, "fas", "fa-plus"], [1, "tree-content", 3, "dragover", "drop"], [1, "tree-node-wrapper"], [1, "tree-node", 3, "click", "dragstart", "dragend", "dragover", "dragleave", "drop", "draggable"], [1, "fas", "toggle-icon", 3, "ngClass"], [1, "fas", "fa-folder", "collection-icon"], [1, "collection-name"], [1, "node-actions", 3, "click"], ["title", "Add sub-collection", 1, "node-action-btn", 3, "click"], ["title", "Delete", 1, "node-action-btn", 3, "click"], [1, "fas", "fa-trash"], [1, "fas", "toggle-icon", 3, "click", "ngClass"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function CollectionTreeComponent_Template(rf, ctx) { if (rf & 1) {
411
+ // Permission checking methods
412
+ canEdit(collection) {
413
+ // Backwards compatibility: treat null OwnerID as owned by current user
414
+ if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID) {
415
+ return true;
416
+ }
417
+ // Check permission record
418
+ const permission = this.userPermissions.get(collection.ID);
419
+ return permission?.canEdit || false;
420
+ }
421
+ canDelete(collection) {
422
+ // Backwards compatibility: treat null OwnerID as owned by current user
423
+ if (!collection.OwnerID || collection.OwnerID === this.currentUser.ID) {
424
+ return true;
425
+ }
426
+ // Check permission record
427
+ const permission = this.userPermissions.get(collection.ID);
428
+ return permission?.canDelete || false;
429
+ }
430
+ canCreateAtRoot() {
431
+ // Anyone can create at root level
432
+ return true;
433
+ }
434
+ static ɵfac = function CollectionTreeComponent_Factory(t) { return new (t || CollectionTreeComponent)(i0.ɵɵdirectiveInject(i1.CollectionPermissionService)); };
435
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionTreeComponent, selectors: [["mj-collection-tree"]], inputs: { environmentId: "environmentId", currentUser: "currentUser", selectedCollectionId: "selectedCollectionId", userPermissions: "userPermissions" }, outputs: { collectionSelected: "collectionSelected", collectionCreated: "collectionCreated", collectionDeleted: "collectionDeleted" }, decls: 10, vars: 3, consts: [["recursiveTree", ""], [1, "collection-tree"], [1, "tree-header"], ["title", "New Collection", 1, "btn-new"], [1, "tree-content", 3, "dragover", "drop"], [1, "tree-node-wrapper"], ["title", "New Collection", 1, "btn-new", 3, "click"], [1, "fas", "fa-plus"], [1, "tree-node", 3, "click", "dragstart", "dragend", "dragover", "dragleave", "drop", "draggable"], [1, "fas", "toggle-icon", 3, "ngClass"], [1, "fas", "fa-folder", "collection-icon"], [1, "collection-name"], [1, "node-actions", 3, "click"], ["title", "Add sub-collection", 1, "node-action-btn"], ["title", "Delete", 1, "node-action-btn"], [1, "fas", "toggle-icon", 3, "click", "ngClass"], ["title", "Add sub-collection", 1, "node-action-btn", 3, "click"], ["title", "Delete", 1, "node-action-btn", 3, "click"], [1, "fas", "fa-trash"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function CollectionTreeComponent_Template(rf, ctx) { if (rf & 1) {
346
436
  const _r1 = i0.ɵɵgetCurrentView();
347
437
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h3");
348
438
  i0.ɵɵtext(3, "Collections");
349
439
  i0.ɵɵelementEnd();
350
- i0.ɵɵelementStart(4, "button", 3);
351
- i0.ɵɵlistener("click", function CollectionTreeComponent_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onCreateCollection(null)); });
352
- i0.ɵɵelement(5, "i", 4);
353
- i0.ɵɵelementEnd()();
354
- i0.ɵɵelementStart(6, "div", 5);
355
- i0.ɵɵlistener("dragover", function CollectionTreeComponent_Template_div_dragover_6_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDragOverRoot($event)); })("drop", function CollectionTreeComponent_Template_div_drop_6_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDropRoot($event)); });
356
- i0.ɵɵrepeaterCreate(7, CollectionTreeComponent_For_8_Template, 12, 14, "div", 6, _forTrack0);
440
+ i0.ɵɵtemplate(4, CollectionTreeComponent_Conditional_4_Template, 2, 0, "button", 3);
441
+ i0.ɵɵelementEnd();
442
+ i0.ɵɵelementStart(5, "div", 4);
443
+ i0.ɵɵlistener("dragover", function CollectionTreeComponent_Template_div_dragover_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDragOverRoot($event)); })("drop", function CollectionTreeComponent_Template_div_drop_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDropRoot($event)); });
444
+ i0.ɵɵrepeaterCreate(6, CollectionTreeComponent_For_7_Template, 10, 16, "div", 5, _forTrack0);
357
445
  i0.ɵɵelementEnd()();
358
- i0.ɵɵtemplate(9, CollectionTreeComponent_ng_template_9_Template, 12, 14, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
446
+ i0.ɵɵtemplate(8, CollectionTreeComponent_ng_template_8_Template, 10, 16, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
359
447
  } if (rf & 2) {
360
- i0.ɵɵadvance(6);
448
+ i0.ɵɵadvance(4);
449
+ i0.ɵɵconditional(ctx.canCreateAtRoot() ? 4 : -1);
450
+ i0.ɵɵadvance();
361
451
  i0.ɵɵclassProp("drag-over-root", ctx.dragOverNodeId === "root");
362
452
  i0.ɵɵadvance();
363
453
  i0.ɵɵrepeater(ctx.treeNodes);
364
- } }, dependencies: [i1.NgClass, i1.NgTemplateOutlet], styles: [".collection-tree[_ngcontent-%COMP%] { display: flex; flex-direction: column; height: 100%; }\n .tree-header[_ngcontent-%COMP%] { padding: 16px; border-bottom: 1px solid #D9D9D9; display: flex; justify-content: space-between; align-items: center; }\n .tree-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { margin: 0; font-size: 16px; }\n .btn-new[_ngcontent-%COMP%] { padding: 6px 10px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; }\n .btn-new[_ngcontent-%COMP%]:hover { background: #005A8C; }\n .tree-content[_ngcontent-%COMP%] { flex: 1; overflow-y: auto; position: relative; }\n .tree-content.drag-over-root[_ngcontent-%COMP%] { background: rgba(0, 118, 182, 0.1); }\n .tree-node[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%]:hover { background: #F4F4F4; }\n .tree-node.selected[_ngcontent-%COMP%] { background: #AAE7FD; }\n .tree-node.dragging[_ngcontent-%COMP%] {\n opacity: 0.4;\n cursor: grabbing;\n }\n .tree-node.drag-over[_ngcontent-%COMP%] {\n background: rgba(0, 118, 182, 0.1);\n border: 2px dashed #0076B6;\n border-radius: 4px;\n }\n .toggle-icon[_ngcontent-%COMP%] { font-size: 10px; color: #AAA; cursor: pointer; width: 12px; }\n .collection-icon[_ngcontent-%COMP%] { font-size: 14px; }\n .collection-name[_ngcontent-%COMP%] { flex: 1; font-size: 14px; user-select: none; }\n .node-actions[_ngcontent-%COMP%] { display: none; gap: 4px; }\n .tree-node[_ngcontent-%COMP%]:hover .node-actions[_ngcontent-%COMP%] { display: flex; }\n .node-action-btn[_ngcontent-%COMP%] { padding: 4px 6px; background: transparent; border: none; cursor: pointer; border-radius: 3px; color: #666; }\n .node-action-btn[_ngcontent-%COMP%]:hover { background: rgba(0,0,0,0.1); }"] });
454
+ } }, dependencies: [i2.NgClass, i2.NgTemplateOutlet], styles: [".collection-tree[_ngcontent-%COMP%] { display: flex; flex-direction: column; height: 100%; }\n .tree-header[_ngcontent-%COMP%] { padding: 16px; border-bottom: 1px solid #D9D9D9; display: flex; justify-content: space-between; align-items: center; }\n .tree-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { margin: 0; font-size: 16px; }\n .btn-new[_ngcontent-%COMP%] { padding: 6px 10px; background: #0076B6; color: white; border: none; border-radius: 4px; cursor: pointer; }\n .btn-new[_ngcontent-%COMP%]:hover { background: #005A8C; }\n .tree-content[_ngcontent-%COMP%] { flex: 1; overflow-y: auto; position: relative; }\n .tree-content.drag-over-root[_ngcontent-%COMP%] { background: rgba(0, 118, 182, 0.1); }\n .tree-node[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%]:hover { background: #F4F4F4; }\n .tree-node.selected[_ngcontent-%COMP%] { background: #AAE7FD; }\n .tree-node.dragging[_ngcontent-%COMP%] {\n opacity: 0.4;\n cursor: grabbing;\n }\n .tree-node.drag-over[_ngcontent-%COMP%] {\n background: rgba(0, 118, 182, 0.1);\n border: 2px dashed #0076B6;\n border-radius: 4px;\n }\n .toggle-icon[_ngcontent-%COMP%] { font-size: 10px; color: #AAA; cursor: pointer; width: 12px; }\n .collection-icon[_ngcontent-%COMP%] { font-size: 14px; }\n .collection-name[_ngcontent-%COMP%] { flex: 1; font-size: 14px; user-select: none; }\n .node-actions[_ngcontent-%COMP%] { display: none; gap: 4px; }\n .tree-node[_ngcontent-%COMP%]:hover .node-actions[_ngcontent-%COMP%] { display: flex; }\n .node-action-btn[_ngcontent-%COMP%] { padding: 4px 6px; background: transparent; border: none; cursor: pointer; border-radius: 3px; color: #666; }\n .node-action-btn[_ngcontent-%COMP%]:hover { background: rgba(0,0,0,0.1); }"] });
365
455
  }
366
456
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionTreeComponent, [{
367
457
  type: Component,
@@ -369,9 +459,11 @@ export class CollectionTreeComponent {
369
459
  <div class="collection-tree">
370
460
  <div class="tree-header">
371
461
  <h3>Collections</h3>
372
- <button class="btn-new" (click)="onCreateCollection(null)" title="New Collection">
373
- <i class="fas fa-plus"></i>
374
- </button>
462
+ @if (canCreateAtRoot()) {
463
+ <button class="btn-new" (click)="onCreateCollection(null)" title="New Collection">
464
+ <i class="fas fa-plus"></i>
465
+ </button>
466
+ }
375
467
  </div>
376
468
 
377
469
  <div
@@ -404,12 +496,16 @@ export class CollectionTreeComponent {
404
496
  <i class="fas fa-folder collection-icon" [style.color]="node.collection.Color || '#0076B6'"></i>
405
497
  <span class="collection-name">{{ node.collection.Name }}</span>
406
498
  <div class="node-actions" (click)="$event.stopPropagation()">
407
- <button class="node-action-btn" (click)="onCreateCollection(node.collection.ID)" title="Add sub-collection">
408
- <i class="fas fa-plus"></i>
409
- </button>
410
- <button class="node-action-btn" (click)="onDeleteCollection(node.collection)" title="Delete">
411
- <i class="fas fa-trash"></i>
412
- </button>
499
+ @if (canEdit(node.collection)) {
500
+ <button class="node-action-btn" (click)="onCreateCollection(node.collection.ID)" title="Add sub-collection">
501
+ <i class="fas fa-plus"></i>
502
+ </button>
503
+ }
504
+ @if (canDelete(node.collection)) {
505
+ <button class="node-action-btn" (click)="onDeleteCollection(node.collection)" title="Delete">
506
+ <i class="fas fa-trash"></i>
507
+ </button>
508
+ }
413
509
  </div>
414
510
  </div>
415
511
 
@@ -448,12 +544,16 @@ export class CollectionTreeComponent {
448
544
  <i class="fas fa-folder collection-icon" [style.color]="node.collection.Color || '#0076B6'"></i>
449
545
  <span class="collection-name">{{ node.collection.Name }}</span>
450
546
  <div class="node-actions" (click)="$event.stopPropagation()">
451
- <button class="node-action-btn" (click)="onCreateCollection(node.collection.ID)" title="Add sub-collection">
452
- <i class="fas fa-plus"></i>
453
- </button>
454
- <button class="node-action-btn" (click)="onDeleteCollection(node.collection)" title="Delete">
455
- <i class="fas fa-trash"></i>
456
- </button>
547
+ @if (canEdit(node.collection)) {
548
+ <button class="node-action-btn" (click)="onCreateCollection(node.collection.ID)" title="Add sub-collection">
549
+ <i class="fas fa-plus"></i>
550
+ </button>
551
+ }
552
+ @if (canDelete(node.collection)) {
553
+ <button class="node-action-btn" (click)="onDeleteCollection(node.collection)" title="Delete">
554
+ <i class="fas fa-trash"></i>
555
+ </button>
556
+ }
457
557
  </div>
458
558
  </div>
459
559
 
@@ -465,12 +565,14 @@ export class CollectionTreeComponent {
465
565
  </div>
466
566
  </ng-template>
467
567
  `, 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 "] }]
468
- }], null, { environmentId: [{
568
+ }], () => [{ type: i1.CollectionPermissionService }], { environmentId: [{
469
569
  type: Input
470
570
  }], currentUser: [{
471
571
  type: Input
472
572
  }], selectedCollectionId: [{
473
573
  type: Input
574
+ }], userPermissions: [{
575
+ type: Input
474
576
  }], collectionSelected: [{
475
577
  type: Output
476
578
  }], collectionCreated: [{
@@ -478,5 +580,5 @@ export class CollectionTreeComponent {
478
580
  }], collectionDeleted: [{
479
581
  type: Output
480
582
  }] }); })();
481
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionTreeComponent, { className: "CollectionTreeComponent", filePath: "src/lib/components/collection/collection-tree.component.ts", lineNumber: 157 }); })();
583
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionTreeComponent, { className: "CollectionTreeComponent", filePath: "src/lib/components/collection/collection-tree.component.ts", lineNumber: 168 }); })();
482
584
  //# sourceMappingURL=collection-tree.component.js.map