@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.
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +67 -0
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -0
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +725 -0
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -0
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts +39 -0
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -0
- package/dist/lib/components/collection/artifact-create-modal.component.js +351 -0
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -0
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +3 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +60 -10
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts +43 -0
- package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -0
- package/dist/lib/components/collection/collection-share-modal.component.js +728 -0
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -0
- package/dist/lib/components/collection/collection-tree.component.d.ts +8 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +217 -115
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +2 -1
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +52 -34
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +45 -9
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +586 -220
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +42 -15
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +336 -219
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +7 -1
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +65 -10
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +39 -5
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +259 -137
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +5 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +26 -12
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/message/suggested-responses.component.d.ts +55 -0
- package/dist/lib/components/message/suggested-responses.component.d.ts.map +1 -0
- package/dist/lib/components/message/suggested-responses.component.js +207 -0
- package/dist/lib/components/message/suggested-responses.component.js.map +1 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +245 -113
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts +29 -0
- package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -0
- package/dist/lib/components/shared/user-picker.component.js +229 -0
- package/dist/lib/components/shared/user-picker.component.js.map +1 -0
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +7 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +36 -6
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +19 -2
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +167 -58
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +52 -47
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +27 -4
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.d.ts +75 -0
- package/dist/lib/models/conversation-complete-query.model.d.ts.map +1 -0
- package/dist/lib/models/conversation-complete-query.model.js +19 -0
- package/dist/lib/models/conversation-complete-query.model.js.map +1 -0
- package/dist/lib/models/conversation-state.model.d.ts +27 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +5 -0
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +14 -9
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/collection-permission.service.d.ts +96 -0
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -0
- package/dist/lib/services/collection-permission.service.js +303 -0
- package/dist/lib/services/collection-permission.service.js.map +1 -0
- package/dist/lib/services/collection-state.service.d.ts +34 -0
- package/dist/lib/services/collection-state.service.d.ts.map +1 -0
- package/dist/lib/services/collection-state.service.js +50 -0
- package/dist/lib/services/collection-state.service.js.map +1 -0
- package/dist/lib/services/conversation-agent.service.d.ts +9 -4
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +41 -12
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +5 -0
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.js +1 -1
- package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +0 -5
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +26 -3
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +172 -12
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { WindowModule } from '@progress/kendo-angular-dialog';
|
|
5
|
+
import { ButtonModule } from '@progress/kendo-angular-buttons';
|
|
6
|
+
import { UserPickerComponent } from '../shared/user-picker.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "../../services/collection-permission.service";
|
|
9
|
+
import * as i2 from "@angular/forms";
|
|
10
|
+
import * as i3 from "@progress/kendo-angular-dialog";
|
|
11
|
+
import * as i4 from "@progress/kendo-angular-buttons";
|
|
12
|
+
const _forTrack0 = ($index, $item) => $item.id;
|
|
13
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
15
|
+
i0.ɵɵelementStart(0, "label", 26)(1, "input", 31);
|
|
16
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_17_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.newPermissions.canShare, $event) || (ctx_r1.newPermissions.canShare = $event); return i0.ɵɵresetView($event); });
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
i0.ɵɵelementStart(2, "span", 23);
|
|
19
|
+
i0.ɵɵelement(3, "i", 32);
|
|
20
|
+
i0.ɵɵtext(4, " Share ");
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
22
|
+
i0.ɵɵelementStart(5, "span", 25);
|
|
23
|
+
i0.ɵɵtext(6, "Share with others");
|
|
24
|
+
i0.ɵɵelementEnd()();
|
|
25
|
+
} if (rf & 2) {
|
|
26
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
27
|
+
i0.ɵɵadvance();
|
|
28
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.newPermissions.canShare);
|
|
29
|
+
} }
|
|
30
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
32
|
+
i0.ɵɵelementStart(0, "label", 26)(1, "input", 31);
|
|
33
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_18_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.newPermissions.canEdit, $event) || (ctx_r1.newPermissions.canEdit = $event); return i0.ɵɵresetView($event); });
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
i0.ɵɵelementStart(2, "span", 23);
|
|
36
|
+
i0.ɵɵelement(3, "i", 33);
|
|
37
|
+
i0.ɵɵtext(4, " Edit ");
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
i0.ɵɵelementStart(5, "span", 25);
|
|
40
|
+
i0.ɵɵtext(6, "Add/remove artifacts");
|
|
41
|
+
i0.ɵɵelementEnd()();
|
|
42
|
+
} if (rf & 2) {
|
|
43
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
44
|
+
i0.ɵɵadvance();
|
|
45
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.newPermissions.canEdit);
|
|
46
|
+
} }
|
|
47
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
49
|
+
i0.ɵɵelementStart(0, "label", 26)(1, "input", 31);
|
|
50
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_19_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.newPermissions.canDelete, $event) || (ctx_r1.newPermissions.canDelete = $event); return i0.ɵɵresetView($event); });
|
|
51
|
+
i0.ɵɵelementEnd();
|
|
52
|
+
i0.ɵɵelementStart(2, "span", 23);
|
|
53
|
+
i0.ɵɵelement(3, "i", 34);
|
|
54
|
+
i0.ɵɵtext(4, " Delete ");
|
|
55
|
+
i0.ɵɵelementEnd();
|
|
56
|
+
i0.ɵɵelementStart(5, "span", 25);
|
|
57
|
+
i0.ɵɵtext(6, "Delete collection");
|
|
58
|
+
i0.ɵɵelementEnd()();
|
|
59
|
+
} if (rf & 2) {
|
|
60
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
61
|
+
i0.ɵɵadvance();
|
|
62
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.newPermissions.canDelete);
|
|
63
|
+
} }
|
|
64
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
65
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
66
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 14)(2, "div", 15);
|
|
67
|
+
i0.ɵɵelement(3, "i", 16);
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
i0.ɵɵelementStart(4, "div", 17)(5, "div", 18);
|
|
70
|
+
i0.ɵɵtext(6);
|
|
71
|
+
i0.ɵɵelementEnd();
|
|
72
|
+
i0.ɵɵelementStart(7, "div", 19);
|
|
73
|
+
i0.ɵɵtext(8);
|
|
74
|
+
i0.ɵɵelementEnd()()();
|
|
75
|
+
i0.ɵɵelementStart(9, "div", 20)(10, "label", 21);
|
|
76
|
+
i0.ɵɵelement(11, "input", 22);
|
|
77
|
+
i0.ɵɵelementStart(12, "span", 23);
|
|
78
|
+
i0.ɵɵelement(13, "i", 24);
|
|
79
|
+
i0.ɵɵtext(14, " Read ");
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
i0.ɵɵelementStart(15, "span", 25);
|
|
82
|
+
i0.ɵɵtext(16, "View collection and artifacts");
|
|
83
|
+
i0.ɵɵelementEnd()();
|
|
84
|
+
i0.ɵɵtemplate(17, CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_17_Template, 7, 1, "label", 26)(18, CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_18_Template, 7, 1, "label", 26)(19, CollectionShareModalComponent_Conditional_0_Conditional_7_Conditional_19_Template, 7, 1, "label", 26);
|
|
85
|
+
i0.ɵɵelementEnd();
|
|
86
|
+
i0.ɵɵelementStart(20, "div", 27)(21, "button", 28);
|
|
87
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Conditional_7_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onAddUser()); });
|
|
88
|
+
i0.ɵɵelement(22, "i", 29);
|
|
89
|
+
i0.ɵɵtext(23, " Add User ");
|
|
90
|
+
i0.ɵɵelementEnd();
|
|
91
|
+
i0.ɵɵelementStart(24, "button", 30);
|
|
92
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Conditional_7_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onClearSelection()); });
|
|
93
|
+
i0.ɵɵtext(25, " Cancel ");
|
|
94
|
+
i0.ɵɵelementEnd()()();
|
|
95
|
+
} if (rf & 2) {
|
|
96
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
97
|
+
i0.ɵɵadvance(6);
|
|
98
|
+
i0.ɵɵtextInterpolate(ctx_r1.selectedUser.name);
|
|
99
|
+
i0.ɵɵadvance(2);
|
|
100
|
+
i0.ɵɵtextInterpolate(ctx_r1.selectedUser.email);
|
|
101
|
+
i0.ɵɵadvance(3);
|
|
102
|
+
i0.ɵɵproperty("checked", true);
|
|
103
|
+
i0.ɵɵadvance(6);
|
|
104
|
+
i0.ɵɵconditional(ctx_r1.availablePermissions.includes("Share") ? 17 : -1);
|
|
105
|
+
i0.ɵɵadvance();
|
|
106
|
+
i0.ɵɵconditional(ctx_r1.availablePermissions.includes("Edit") ? 18 : -1);
|
|
107
|
+
i0.ɵɵadvance();
|
|
108
|
+
i0.ɵɵconditional(ctx_r1.availablePermissions.includes("Delete") ? 19 : -1);
|
|
109
|
+
i0.ɵɵadvance(2);
|
|
110
|
+
i0.ɵɵproperty("disabled", !ctx_r1.selectedUser);
|
|
111
|
+
} }
|
|
112
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
113
|
+
i0.ɵɵelementStart(0, "div", 10);
|
|
114
|
+
i0.ɵɵelement(1, "i", 35);
|
|
115
|
+
i0.ɵɵelementStart(2, "p");
|
|
116
|
+
i0.ɵɵtext(3, "Not shared with anyone yet");
|
|
117
|
+
i0.ɵɵelementEnd()();
|
|
118
|
+
} }
|
|
119
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
i0.ɵɵelementStart(0, "span", 39);
|
|
121
|
+
i0.ɵɵtext(1);
|
|
122
|
+
i0.ɵɵelementEnd();
|
|
123
|
+
} if (rf & 2) {
|
|
124
|
+
const permission_r7 = i0.ɵɵnextContext().$implicit;
|
|
125
|
+
i0.ɵɵadvance();
|
|
126
|
+
i0.ɵɵtextInterpolate1("shared by ", permission_r7.sharedByUserName, "");
|
|
127
|
+
} }
|
|
128
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
129
|
+
i0.ɵɵelementStart(0, "span", 43);
|
|
130
|
+
i0.ɵɵelement(1, "i", 32);
|
|
131
|
+
i0.ɵɵtext(2, " Share ");
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
} }
|
|
134
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
+
i0.ɵɵelementStart(0, "span", 43);
|
|
136
|
+
i0.ɵɵelement(1, "i", 33);
|
|
137
|
+
i0.ɵɵtext(2, " Edit ");
|
|
138
|
+
i0.ɵɵelementEnd();
|
|
139
|
+
} }
|
|
140
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
141
|
+
i0.ɵɵelementStart(0, "span", 43);
|
|
142
|
+
i0.ɵɵelement(1, "i", 34);
|
|
143
|
+
i0.ɵɵtext(2, " Delete ");
|
|
144
|
+
i0.ɵɵelementEnd();
|
|
145
|
+
} }
|
|
146
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
147
|
+
i0.ɵɵelementStart(0, "div", 40)(1, "span", 43);
|
|
148
|
+
i0.ɵɵelement(2, "i", 24);
|
|
149
|
+
i0.ɵɵtext(3, " Read ");
|
|
150
|
+
i0.ɵɵelementEnd();
|
|
151
|
+
i0.ɵɵtemplate(4, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Conditional_4_Template, 3, 0, "span", 43)(5, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Conditional_5_Template, 3, 0, "span", 43)(6, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Conditional_6_Template, 3, 0, "span", 43);
|
|
152
|
+
i0.ɵɵelementEnd();
|
|
153
|
+
} if (rf & 2) {
|
|
154
|
+
const permission_r7 = i0.ɵɵnextContext().$implicit;
|
|
155
|
+
i0.ɵɵadvance(4);
|
|
156
|
+
i0.ɵɵconditional(permission_r7.canShare ? 4 : -1);
|
|
157
|
+
i0.ɵɵadvance();
|
|
158
|
+
i0.ɵɵconditional(permission_r7.canEdit ? 5 : -1);
|
|
159
|
+
i0.ɵɵadvance();
|
|
160
|
+
i0.ɵɵconditional(permission_r7.canDelete ? 6 : -1);
|
|
161
|
+
} }
|
|
162
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
163
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
164
|
+
i0.ɵɵelementStart(0, "label", 45)(1, "input", 31);
|
|
165
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_5_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r8); const permission_r7 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(permission_r7.editingPermissions.canShare, $event) || (permission_r7.editingPermissions.canShare = $event); return i0.ɵɵresetView($event); });
|
|
166
|
+
i0.ɵɵelementEnd();
|
|
167
|
+
i0.ɵɵelementStart(2, "span");
|
|
168
|
+
i0.ɵɵtext(3, "Share");
|
|
169
|
+
i0.ɵɵelementEnd()();
|
|
170
|
+
} if (rf & 2) {
|
|
171
|
+
const permission_r7 = i0.ɵɵnextContext(2).$implicit;
|
|
172
|
+
i0.ɵɵadvance();
|
|
173
|
+
i0.ɵɵtwoWayProperty("ngModel", permission_r7.editingPermissions.canShare);
|
|
174
|
+
} }
|
|
175
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
176
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
177
|
+
i0.ɵɵelementStart(0, "label", 45)(1, "input", 31);
|
|
178
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_6_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r9); const permission_r7 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(permission_r7.editingPermissions.canEdit, $event) || (permission_r7.editingPermissions.canEdit = $event); return i0.ɵɵresetView($event); });
|
|
179
|
+
i0.ɵɵelementEnd();
|
|
180
|
+
i0.ɵɵelementStart(2, "span");
|
|
181
|
+
i0.ɵɵtext(3, "Edit");
|
|
182
|
+
i0.ɵɵelementEnd()();
|
|
183
|
+
} if (rf & 2) {
|
|
184
|
+
const permission_r7 = i0.ɵɵnextContext(2).$implicit;
|
|
185
|
+
i0.ɵɵadvance();
|
|
186
|
+
i0.ɵɵtwoWayProperty("ngModel", permission_r7.editingPermissions.canEdit);
|
|
187
|
+
} }
|
|
188
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
189
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
190
|
+
i0.ɵɵelementStart(0, "label", 45)(1, "input", 31);
|
|
191
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_7_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r10); const permission_r7 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(permission_r7.editingPermissions.canDelete, $event) || (permission_r7.editingPermissions.canDelete = $event); return i0.ɵɵresetView($event); });
|
|
192
|
+
i0.ɵɵelementEnd();
|
|
193
|
+
i0.ɵɵelementStart(2, "span");
|
|
194
|
+
i0.ɵɵtext(3, "Delete");
|
|
195
|
+
i0.ɵɵelementEnd()();
|
|
196
|
+
} if (rf & 2) {
|
|
197
|
+
const permission_r7 = i0.ɵɵnextContext(2).$implicit;
|
|
198
|
+
i0.ɵɵadvance();
|
|
199
|
+
i0.ɵɵtwoWayProperty("ngModel", permission_r7.editingPermissions.canDelete);
|
|
200
|
+
} }
|
|
201
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
202
|
+
i0.ɵɵelementStart(0, "div", 41)(1, "label", 44);
|
|
203
|
+
i0.ɵɵelement(2, "input", 22);
|
|
204
|
+
i0.ɵɵelementStart(3, "span");
|
|
205
|
+
i0.ɵɵtext(4, "Read");
|
|
206
|
+
i0.ɵɵelementEnd()();
|
|
207
|
+
i0.ɵɵtemplate(5, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_5_Template, 4, 1, "label", 45)(6, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_6_Template, 4, 1, "label", 45)(7, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Conditional_7_Template, 4, 1, "label", 45);
|
|
208
|
+
i0.ɵɵelementEnd();
|
|
209
|
+
} if (rf & 2) {
|
|
210
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
211
|
+
i0.ɵɵadvance(2);
|
|
212
|
+
i0.ɵɵproperty("checked", true);
|
|
213
|
+
i0.ɵɵadvance(3);
|
|
214
|
+
i0.ɵɵconditional(ctx_r1.availablePermissions.includes("Share") ? 5 : -1);
|
|
215
|
+
i0.ɵɵadvance();
|
|
216
|
+
i0.ɵɵconditional(ctx_r1.availablePermissions.includes("Edit") ? 6 : -1);
|
|
217
|
+
i0.ɵɵadvance();
|
|
218
|
+
i0.ɵɵconditional(ctx_r1.availablePermissions.includes("Delete") ? 7 : -1);
|
|
219
|
+
} }
|
|
220
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
221
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
222
|
+
i0.ɵɵelementStart(0, "button", 46);
|
|
223
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const permission_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onEditPermission(permission_r7)); });
|
|
224
|
+
i0.ɵɵelement(1, "i", 47);
|
|
225
|
+
i0.ɵɵelementEnd();
|
|
226
|
+
i0.ɵɵelementStart(2, "button", 48);
|
|
227
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_1_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r11); const permission_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onRevokePermission(permission_r7)); });
|
|
228
|
+
i0.ɵɵelement(3, "i", 49);
|
|
229
|
+
i0.ɵɵelementEnd();
|
|
230
|
+
} }
|
|
231
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
232
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
233
|
+
i0.ɵɵelementStart(0, "button", 50);
|
|
234
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const permission_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onSavePermission(permission_r7)); });
|
|
235
|
+
i0.ɵɵelement(1, "i", 51);
|
|
236
|
+
i0.ɵɵelementEnd();
|
|
237
|
+
i0.ɵɵelementStart(2, "button", 52);
|
|
238
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_2_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r12); const permission_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onCancelEdit(permission_r7)); });
|
|
239
|
+
i0.ɵɵelement(3, "i", 49);
|
|
240
|
+
i0.ɵɵelementEnd();
|
|
241
|
+
} }
|
|
242
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
243
|
+
i0.ɵɵelementStart(0, "div", 42);
|
|
244
|
+
i0.ɵɵtemplate(1, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_1_Template, 4, 0)(2, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Conditional_2_Template, 4, 0);
|
|
245
|
+
i0.ɵɵelementEnd();
|
|
246
|
+
} if (rf & 2) {
|
|
247
|
+
const permission_r7 = i0.ɵɵnextContext().$implicit;
|
|
248
|
+
i0.ɵɵadvance();
|
|
249
|
+
i0.ɵɵconditional(!permission_r7.isEditing ? 1 : 2);
|
|
250
|
+
} }
|
|
251
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
252
|
+
i0.ɵɵelementStart(0, "div", 36)(1, "div", 15);
|
|
253
|
+
i0.ɵɵelement(2, "i", 16);
|
|
254
|
+
i0.ɵɵelementEnd();
|
|
255
|
+
i0.ɵɵelementStart(3, "div", 37)(4, "div", 38)(5, "span", 18);
|
|
256
|
+
i0.ɵɵtext(6);
|
|
257
|
+
i0.ɵɵelementEnd();
|
|
258
|
+
i0.ɵɵtemplate(7, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_7_Template, 2, 1, "span", 39);
|
|
259
|
+
i0.ɵɵelementEnd();
|
|
260
|
+
i0.ɵɵtemplate(8, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_8_Template, 7, 3, "div", 40)(9, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_9_Template, 8, 4, "div", 41);
|
|
261
|
+
i0.ɵɵelementEnd();
|
|
262
|
+
i0.ɵɵtemplate(10, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Conditional_10_Template, 3, 1, "div", 42);
|
|
263
|
+
i0.ɵɵelementEnd();
|
|
264
|
+
} if (rf & 2) {
|
|
265
|
+
const permission_r7 = ctx.$implicit;
|
|
266
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
267
|
+
i0.ɵɵadvance(6);
|
|
268
|
+
i0.ɵɵtextInterpolate(permission_r7.userName);
|
|
269
|
+
i0.ɵɵadvance();
|
|
270
|
+
i0.ɵɵconditional(permission_r7.sharedByUserName ? 7 : -1);
|
|
271
|
+
i0.ɵɵadvance();
|
|
272
|
+
i0.ɵɵconditional(!permission_r7.isEditing ? 8 : 9);
|
|
273
|
+
i0.ɵɵadvance(2);
|
|
274
|
+
i0.ɵɵconditional(ctx_r1.canModifyPermissions ? 10 : -1);
|
|
275
|
+
} }
|
|
276
|
+
function CollectionShareModalComponent_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
277
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
278
|
+
i0.ɵɵrepeaterCreate(1, CollectionShareModalComponent_Conditional_0_Conditional_13_For_2_Template, 11, 4, "div", 36, _forTrack0);
|
|
279
|
+
i0.ɵɵelementEnd();
|
|
280
|
+
} if (rf & 2) {
|
|
281
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
282
|
+
i0.ɵɵadvance();
|
|
283
|
+
i0.ɵɵrepeater(ctx_r1.permissions);
|
|
284
|
+
} }
|
|
285
|
+
function CollectionShareModalComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
286
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
287
|
+
i0.ɵɵelementStart(0, "kendo-window", 1);
|
|
288
|
+
i0.ɵɵlistener("close", function CollectionShareModalComponent_Conditional_0_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
289
|
+
i0.ɵɵelementStart(1, "div", 2)(2, "div", 3)(3, "h3", 4);
|
|
290
|
+
i0.ɵɵelement(4, "i", 5);
|
|
291
|
+
i0.ɵɵtext(5, " Share with User ");
|
|
292
|
+
i0.ɵɵelementEnd();
|
|
293
|
+
i0.ɵɵelementStart(6, "mj-user-picker", 6);
|
|
294
|
+
i0.ɵɵlistener("userSelected", function CollectionShareModalComponent_Conditional_0_Template_mj_user_picker_userSelected_6_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onUserSelected($event)); });
|
|
295
|
+
i0.ɵɵelementEnd();
|
|
296
|
+
i0.ɵɵtemplate(7, CollectionShareModalComponent_Conditional_0_Conditional_7_Template, 26, 7, "div", 7);
|
|
297
|
+
i0.ɵɵelementEnd();
|
|
298
|
+
i0.ɵɵelementStart(8, "div", 8)(9, "h3", 4);
|
|
299
|
+
i0.ɵɵelement(10, "i", 9);
|
|
300
|
+
i0.ɵɵtext(11);
|
|
301
|
+
i0.ɵɵelementEnd();
|
|
302
|
+
i0.ɵɵtemplate(12, CollectionShareModalComponent_Conditional_0_Conditional_12_Template, 4, 0, "div", 10)(13, CollectionShareModalComponent_Conditional_0_Conditional_13_Template, 3, 0, "div", 11);
|
|
303
|
+
i0.ɵɵelementEnd()();
|
|
304
|
+
i0.ɵɵelementStart(14, "div", 12)(15, "button", 13);
|
|
305
|
+
i0.ɵɵlistener("click", function CollectionShareModalComponent_Conditional_0_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
306
|
+
i0.ɵɵtext(16, "Close");
|
|
307
|
+
i0.ɵɵelementEnd()()();
|
|
308
|
+
} if (rf & 2) {
|
|
309
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
310
|
+
i0.ɵɵproperty("title", "Share: " + ctx_r1.collection.Name)("width", 600)("height", 500)("minWidth", 400)("minHeight", 400);
|
|
311
|
+
i0.ɵɵadvance(6);
|
|
312
|
+
i0.ɵɵproperty("currentUser", ctx_r1.currentUser)("excludeUserIds", ctx_r1.getExcludedUserIds());
|
|
313
|
+
i0.ɵɵadvance();
|
|
314
|
+
i0.ɵɵconditional(ctx_r1.selectedUser ? 7 : -1);
|
|
315
|
+
i0.ɵɵadvance(4);
|
|
316
|
+
i0.ɵɵtextInterpolate1(" Shared With (", ctx_r1.permissions.length, ") ");
|
|
317
|
+
i0.ɵɵadvance();
|
|
318
|
+
i0.ɵɵconditional(ctx_r1.permissions.length === 0 ? 12 : 13);
|
|
319
|
+
} }
|
|
320
|
+
export class CollectionShareModalComponent {
|
|
321
|
+
permissionService;
|
|
322
|
+
cdr;
|
|
323
|
+
isOpen = false;
|
|
324
|
+
collection = null;
|
|
325
|
+
currentUser;
|
|
326
|
+
currentUserPermissions = null;
|
|
327
|
+
saved = new EventEmitter();
|
|
328
|
+
cancelled = new EventEmitter();
|
|
329
|
+
permissions = [];
|
|
330
|
+
selectedUser = null;
|
|
331
|
+
availablePermissions = [];
|
|
332
|
+
canModifyPermissions = false;
|
|
333
|
+
newPermissions = {
|
|
334
|
+
canRead: true,
|
|
335
|
+
canShare: false,
|
|
336
|
+
canEdit: false,
|
|
337
|
+
canDelete: false
|
|
338
|
+
};
|
|
339
|
+
constructor(permissionService, cdr) {
|
|
340
|
+
this.permissionService = permissionService;
|
|
341
|
+
this.cdr = cdr;
|
|
342
|
+
}
|
|
343
|
+
async ngOnInit() {
|
|
344
|
+
if (this.collection) {
|
|
345
|
+
await this.loadPermissions();
|
|
346
|
+
this.updateAvailablePermissions();
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
async ngOnChanges(changes) {
|
|
350
|
+
// Reload permissions when modal opens or collection/permissions change
|
|
351
|
+
const modalOpened = changes['isOpen']?.currentValue === true && changes['isOpen']?.previousValue === false;
|
|
352
|
+
const collectionChanged = changes['collection'] && !changes['collection'].isFirstChange();
|
|
353
|
+
const permissionsChanged = changes['currentUserPermissions'] && !changes['currentUserPermissions'].isFirstChange();
|
|
354
|
+
if ((modalOpened || collectionChanged || permissionsChanged) && this.collection) {
|
|
355
|
+
await this.loadPermissions();
|
|
356
|
+
this.updateAvailablePermissions();
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
async loadPermissions() {
|
|
360
|
+
if (!this.collection)
|
|
361
|
+
return;
|
|
362
|
+
const perms = await this.permissionService.loadPermissions(this.collection.ID, this.currentUser);
|
|
363
|
+
this.permissions = perms.map(p => ({
|
|
364
|
+
...p,
|
|
365
|
+
isEditing: false,
|
|
366
|
+
editingPermissions: {
|
|
367
|
+
canRead: p.canRead,
|
|
368
|
+
canShare: p.canShare,
|
|
369
|
+
canEdit: p.canEdit,
|
|
370
|
+
canDelete: p.canDelete
|
|
371
|
+
}
|
|
372
|
+
}));
|
|
373
|
+
this.cdr.detectChanges();
|
|
374
|
+
}
|
|
375
|
+
updateAvailablePermissions() {
|
|
376
|
+
// User is owner if:
|
|
377
|
+
// 1. OwnerID is null/undefined (backwards compatibility with old collections)
|
|
378
|
+
// 2. OwnerID matches current user ID
|
|
379
|
+
const isOwner = !this.collection?.OwnerID || this.collection.OwnerID === this.currentUser.ID;
|
|
380
|
+
// Allow modification if user is owner OR has Share permission
|
|
381
|
+
this.canModifyPermissions = isOwner || (this.currentUserPermissions?.canShare || false);
|
|
382
|
+
const userPerms = this.currentUserPermissions || {
|
|
383
|
+
canRead: true,
|
|
384
|
+
canShare: false,
|
|
385
|
+
canEdit: false,
|
|
386
|
+
canDelete: false
|
|
387
|
+
};
|
|
388
|
+
this.availablePermissions = this.permissionService.getAvailablePermissions(userPerms, isOwner);
|
|
389
|
+
console.log('Share modal permissions:', {
|
|
390
|
+
collectionId: this.collection?.ID,
|
|
391
|
+
ownerId: this.collection?.OwnerID,
|
|
392
|
+
currentUserId: this.currentUser.ID,
|
|
393
|
+
isOwner,
|
|
394
|
+
availablePermissions: this.availablePermissions
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
getExcludedUserIds() {
|
|
398
|
+
const ids = this.permissions.map(p => p.userId);
|
|
399
|
+
ids.push(this.currentUser.ID); // Can't share with yourself
|
|
400
|
+
if (this.collection?.OwnerID) {
|
|
401
|
+
ids.push(this.collection.OwnerID); // Owner already has all permissions
|
|
402
|
+
}
|
|
403
|
+
return ids;
|
|
404
|
+
}
|
|
405
|
+
onUserSelected(user) {
|
|
406
|
+
this.selectedUser = user;
|
|
407
|
+
this.cdr.detectChanges();
|
|
408
|
+
}
|
|
409
|
+
onClearSelection() {
|
|
410
|
+
this.selectedUser = null;
|
|
411
|
+
this.newPermissions = {
|
|
412
|
+
canRead: true,
|
|
413
|
+
canShare: false,
|
|
414
|
+
canEdit: false,
|
|
415
|
+
canDelete: false
|
|
416
|
+
};
|
|
417
|
+
this.cdr.detectChanges();
|
|
418
|
+
}
|
|
419
|
+
async onAddUser() {
|
|
420
|
+
if (!this.selectedUser || !this.collection)
|
|
421
|
+
return;
|
|
422
|
+
try {
|
|
423
|
+
// User is owner if OwnerID is null (old collections) or matches current user
|
|
424
|
+
const isOwner = !this.collection.OwnerID || this.collection.OwnerID === this.currentUser.ID;
|
|
425
|
+
const userPerms = this.currentUserPermissions || {
|
|
426
|
+
canRead: true,
|
|
427
|
+
canShare: false,
|
|
428
|
+
canEdit: false,
|
|
429
|
+
canDelete: false
|
|
430
|
+
};
|
|
431
|
+
// Validate permissions
|
|
432
|
+
if (!this.permissionService.validatePermissions(this.newPermissions, userPerms, isOwner)) {
|
|
433
|
+
alert('You cannot grant permissions you do not have');
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
// Use cascade grant to apply permissions to all child collections
|
|
437
|
+
await this.permissionService.grantPermissionCascade(this.collection.ID, this.selectedUser.id, this.newPermissions, this.currentUser.ID, this.currentUser);
|
|
438
|
+
await this.loadPermissions();
|
|
439
|
+
this.onClearSelection();
|
|
440
|
+
this.saved.emit();
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
console.error('Error adding user:', error);
|
|
444
|
+
alert('Failed to add user. Please try again.');
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
onEditPermission(permission) {
|
|
448
|
+
permission.isEditing = true;
|
|
449
|
+
this.cdr.detectChanges();
|
|
450
|
+
}
|
|
451
|
+
onCancelEdit(permission) {
|
|
452
|
+
permission.isEditing = false;
|
|
453
|
+
permission.editingPermissions = {
|
|
454
|
+
canRead: permission.canRead,
|
|
455
|
+
canShare: permission.canShare,
|
|
456
|
+
canEdit: permission.canEdit,
|
|
457
|
+
canDelete: permission.canDelete
|
|
458
|
+
};
|
|
459
|
+
this.cdr.detectChanges();
|
|
460
|
+
}
|
|
461
|
+
async onSavePermission(permission) {
|
|
462
|
+
try {
|
|
463
|
+
// User is owner if OwnerID is null (old collections) or matches current user
|
|
464
|
+
const isOwner = !this.collection?.OwnerID || this.collection?.OwnerID === this.currentUser.ID;
|
|
465
|
+
const userPerms = this.currentUserPermissions || {
|
|
466
|
+
canRead: true,
|
|
467
|
+
canShare: false,
|
|
468
|
+
canEdit: false,
|
|
469
|
+
canDelete: false
|
|
470
|
+
};
|
|
471
|
+
// Validate permissions
|
|
472
|
+
if (!this.permissionService.validatePermissions(permission.editingPermissions, userPerms, isOwner)) {
|
|
473
|
+
alert('You cannot grant permissions you do not have');
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
// Use cascade update to apply changes to all child collections
|
|
477
|
+
await this.permissionService.updatePermissionCascade(this.collection.ID, permission.userId, permission.editingPermissions, this.currentUser);
|
|
478
|
+
await this.loadPermissions();
|
|
479
|
+
this.saved.emit();
|
|
480
|
+
}
|
|
481
|
+
catch (error) {
|
|
482
|
+
console.error('Error updating permission:', error);
|
|
483
|
+
alert('Failed to update permissions. Please try again.');
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
async onRevokePermission(permission) {
|
|
487
|
+
if (!confirm(`Remove ${permission.userName}'s access to this collection and all its child collections?`)) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
try {
|
|
491
|
+
// Use cascade revoke to remove access from all child collections
|
|
492
|
+
await this.permissionService.revokePermissionCascade(this.collection.ID, permission.userId, this.currentUser);
|
|
493
|
+
await this.loadPermissions();
|
|
494
|
+
this.saved.emit();
|
|
495
|
+
}
|
|
496
|
+
catch (error) {
|
|
497
|
+
console.error('Error revoking permission:', error);
|
|
498
|
+
alert('Failed to revoke permission. Please try again.');
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
onCancel() {
|
|
502
|
+
this.cancelled.emit();
|
|
503
|
+
}
|
|
504
|
+
static ɵfac = function CollectionShareModalComponent_Factory(t) { return new (t || CollectionShareModalComponent)(i0.ɵɵdirectiveInject(i1.CollectionPermissionService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
505
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionShareModalComponent, selectors: [["mj-collection-share-modal"]], inputs: { isOpen: "isOpen", collection: "collection", currentUser: "currentUser", currentUserPermissions: "currentUserPermissions" }, outputs: { saved: "saved", cancelled: "cancelled" }, standalone: true, features: [i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature], decls: 1, vars: 1, consts: [[3, "title", "width", "height", "minWidth", "minHeight"], [3, "close", "title", "width", "height", "minWidth", "minHeight"], [1, "share-modal-content"], [1, "add-user-section"], [1, "section-title"], [1, "fa-solid", "fa-user-plus"], [3, "userSelected", "currentUser", "excludeUserIds"], [1, "permissions-form"], [1, "permissions-list-section"], [1, "fa-solid", "fa-users"], [1, "empty-state"], [1, "permissions-list"], [1, "modal-actions"], ["kendoButton", "", 3, "click"], [1, "selected-user-info"], [1, "user-avatar"], [1, "fa-solid", "fa-user"], [1, "user-details"], [1, "user-name"], [1, "user-email"], [1, "permissions-grid"], [1, "permission-checkbox", "disabled"], ["type", "checkbox", "disabled", "", 3, "checked"], [1, "permission-label"], [1, "fa-solid", "fa-eye"], [1, "permission-desc"], [1, "permission-checkbox"], [1, "form-actions"], ["kendoButton", "", 1, "btn-primary", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], ["kendoButton", "", 1, "btn-secondary", 3, "click"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-share-nodes"], [1, "fa-solid", "fa-pen-to-square"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-user-slash"], [1, "permission-item"], [1, "permission-details"], [1, "permission-user"], [1, "shared-by"], [1, "permission-badges"], [1, "permissions-edit-grid"], [1, "permission-actions"], [1, "permission-badge"], [1, "permission-checkbox-small", "disabled"], [1, "permission-checkbox-small"], ["kendoButton", "", "title", "Edit", 1, "btn-icon", 3, "click"], [1, "fa-solid", "fa-pen"], ["kendoButton", "", "title", "Remove", 1, "btn-icon", "btn-danger", 3, "click"], [1, "fa-solid", "fa-xmark"], ["kendoButton", "", "title", "Save", 1, "btn-icon", "btn-success", 3, "click"], [1, "fa-solid", "fa-check"], ["kendoButton", "", "title", "Cancel", 1, "btn-icon", 3, "click"]], template: function CollectionShareModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
506
|
+
i0.ɵɵtemplate(0, CollectionShareModalComponent_Conditional_0_Template, 17, 10, "kendo-window", 0);
|
|
507
|
+
} if (rf & 2) {
|
|
508
|
+
i0.ɵɵconditional(ctx.isOpen && ctx.collection ? 0 : -1);
|
|
509
|
+
} }, dependencies: [CommonModule, FormsModule, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgModel, WindowModule, i3.WindowComponent, ButtonModule, i4.ButtonComponent, UserPickerComponent], styles: [".share-modal-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 20px;\n height: 100%;\n overflow-y: auto;\n}\n\n.section-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 16px;\n font-weight: 600;\n color: #1F2937;\n margin: 0 0 16px 0;\n\n i {\n color: #6366F1;\n }\n}\n\n//[_ngcontent-%COMP%] Add[_ngcontent-%COMP%] User[_ngcontent-%COMP%] Section\n.add-user-section[_ngcontent-%COMP%] {\n border-bottom: 1px solid #E5E7EB;\n padding-bottom: 24px;\n}\n\n.selected-user-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 16px 0;\n padding: 12px;\n background: #F9FAFB;\n border-radius: 8px;\n}\n\n.user-avatar[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.user-details[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n\n .user-name {\n font-size: 14px;\n font-weight: 500;\n color: #1F2937;\n }\n\n .user-email {\n font-size: 12px;\n color: #6B7280;\n margin-top: 2px;\n }\n}\n\n.permissions-form[_ngcontent-%COMP%] {\n margin-top: 16px;\n}\n\n.permissions-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 12px;\n margin: 16px 0;\n}\n\n.permission-checkbox[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 12px;\n border: 1px solid #E5E7EB;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n\n &:hover:not(.disabled) {\n border-color: #6366F1;\n background: #F9FAFB;\n }\n\n &.disabled {\n opacity: 0.6;\n cursor: not-allowed;\n background: #F3F4F6;\n }\n\n input[type=\"checkbox\"] {\n margin-right: 8px;\n }\n\n .permission-label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n color: #1F2937;\n font-size: 14px;\n\n i {\n color: #6366F1;\n font-size: 12px;\n }\n }\n\n .permission-desc {\n font-size: 12px;\n color: #6B7280;\n margin-left: 28px;\n }\n}\n\n.form-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n margin-top: 16px;\n}\n\n//[_ngcontent-%COMP%] Permissions[_ngcontent-%COMP%] List[_ngcontent-%COMP%] Section\n.permissions-list-section[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.permissions-list[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.permission-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n transition: background 0.2s;\n\n &:hover {\n background: #F9FAFB;\n }\n}\n\n.permission-details[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.permission-user[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n\n .user-name {\n font-weight: 500;\n color: #1F2937;\n font-size: 14px;\n }\n\n .shared-by {\n font-size: 12px;\n color: #6B7280;\n }\n}\n\n.permission-badges[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.permission-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 4px 8px;\n background: #EEF2FF;\n color: #6366F1;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 500;\n\n i {\n font-size: 10px;\n }\n}\n\n.permissions-edit-grid[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.permission-checkbox-small[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 13px;\n cursor: pointer;\n\n &.disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n input[type=\"checkbox\"] {\n margin: 0;\n }\n\n span {\n color: #1F2937;\n }\n}\n\n.permission-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n}\n\n//[_ngcontent-%COMP%] Empty[_ngcontent-%COMP%] State\n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n color: #9CA3AF;\n\n i {\n font-size: 48px;\n margin-bottom: 12px;\n }\n\n p {\n margin: 0;\n font-size: 14px;\n }\n}\n\n//[_ngcontent-%COMP%] Button[_ngcontent-%COMP%] Styles\n.btn-primary[_ngcontent-%COMP%] {\n background: #6366F1 !important;\n color: white !important;\n border: none !important;\n padding: 8px 16px;\n border-radius: 6px;\n font-weight: 500;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 6px;\n\n &:hover:not(:disabled) {\n background: #5558E3 !important;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n i {\n font-size: 12px;\n }\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n background: white !important;\n color: #6B7280 !important;\n border: 1px solid #E5E7EB !important;\n padding: 8px 16px;\n border-radius: 6px;\n font-weight: 500;\n cursor: pointer;\n\n &:hover {\n background: #F9FAFB !important;\n border-color: #D1D5DB !important;\n }\n}\n\n.btn-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 6px;\n border: 1px solid #E5E7EB;\n background: white;\n color: #6B7280;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s;\n\n &:hover {\n background: #F9FAFB;\n border-color: #D1D5DB;\n }\n\n &.btn-success {\n color: #10B981;\n border-color: #10B981;\n\n &:hover {\n background: #ECFDF5;\n }\n }\n\n &.btn-danger {\n color: #EF4444;\n border-color: #EF4444;\n\n &:hover {\n background: #FEF2F2;\n }\n }\n\n i {\n font-size: 14px;\n }\n}\n\n.modal-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n padding: 16px 20px;\n border-top: 1px solid #E5E7EB;\n background: #F9FAFB;\n}"] });
|
|
510
|
+
}
|
|
511
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionShareModalComponent, [{
|
|
512
|
+
type: Component,
|
|
513
|
+
args: [{ selector: 'mj-collection-share-modal', standalone: true, imports: [CommonModule, FormsModule, WindowModule, ButtonModule, UserPickerComponent], template: `
|
|
514
|
+
@if (isOpen && collection) {
|
|
515
|
+
<kendo-window
|
|
516
|
+
[title]="'Share: ' + collection.Name"
|
|
517
|
+
[width]="600"
|
|
518
|
+
[height]="500"
|
|
519
|
+
[minWidth]="400"
|
|
520
|
+
[minHeight]="400"
|
|
521
|
+
(close)="onCancel()"
|
|
522
|
+
>
|
|
523
|
+
<div class="share-modal-content">
|
|
524
|
+
<!-- Add User Section -->
|
|
525
|
+
<div class="add-user-section">
|
|
526
|
+
<h3 class="section-title">
|
|
527
|
+
<i class="fa-solid fa-user-plus"></i>
|
|
528
|
+
Share with User
|
|
529
|
+
</h3>
|
|
530
|
+
|
|
531
|
+
<mj-user-picker
|
|
532
|
+
[currentUser]="currentUser"
|
|
533
|
+
[excludeUserIds]="getExcludedUserIds()"
|
|
534
|
+
(userSelected)="onUserSelected($event)"
|
|
535
|
+
></mj-user-picker>
|
|
536
|
+
|
|
537
|
+
@if (selectedUser) {
|
|
538
|
+
<div class="permissions-form">
|
|
539
|
+
<div class="selected-user-info">
|
|
540
|
+
<div class="user-avatar">
|
|
541
|
+
<i class="fa-solid fa-user"></i>
|
|
542
|
+
</div>
|
|
543
|
+
<div class="user-details">
|
|
544
|
+
<div class="user-name">{{ selectedUser.name }}</div>
|
|
545
|
+
<div class="user-email">{{ selectedUser.email }}</div>
|
|
546
|
+
</div>
|
|
547
|
+
</div>
|
|
548
|
+
|
|
549
|
+
<div class="permissions-grid">
|
|
550
|
+
<label class="permission-checkbox disabled">
|
|
551
|
+
<input type="checkbox" [checked]="true" disabled>
|
|
552
|
+
<span class="permission-label">
|
|
553
|
+
<i class="fa-solid fa-eye"></i>
|
|
554
|
+
Read
|
|
555
|
+
</span>
|
|
556
|
+
<span class="permission-desc">View collection and artifacts</span>
|
|
557
|
+
</label>
|
|
558
|
+
|
|
559
|
+
@if (availablePermissions.includes('Share')) {
|
|
560
|
+
<label class="permission-checkbox">
|
|
561
|
+
<input type="checkbox" [(ngModel)]="newPermissions.canShare">
|
|
562
|
+
<span class="permission-label">
|
|
563
|
+
<i class="fa-solid fa-share-nodes"></i>
|
|
564
|
+
Share
|
|
565
|
+
</span>
|
|
566
|
+
<span class="permission-desc">Share with others</span>
|
|
567
|
+
</label>
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
@if (availablePermissions.includes('Edit')) {
|
|
571
|
+
<label class="permission-checkbox">
|
|
572
|
+
<input type="checkbox" [(ngModel)]="newPermissions.canEdit">
|
|
573
|
+
<span class="permission-label">
|
|
574
|
+
<i class="fa-solid fa-pen-to-square"></i>
|
|
575
|
+
Edit
|
|
576
|
+
</span>
|
|
577
|
+
<span class="permission-desc">Add/remove artifacts</span>
|
|
578
|
+
</label>
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
@if (availablePermissions.includes('Delete')) {
|
|
582
|
+
<label class="permission-checkbox">
|
|
583
|
+
<input type="checkbox" [(ngModel)]="newPermissions.canDelete">
|
|
584
|
+
<span class="permission-label">
|
|
585
|
+
<i class="fa-solid fa-trash"></i>
|
|
586
|
+
Delete
|
|
587
|
+
</span>
|
|
588
|
+
<span class="permission-desc">Delete collection</span>
|
|
589
|
+
</label>
|
|
590
|
+
}
|
|
591
|
+
</div>
|
|
592
|
+
|
|
593
|
+
<div class="form-actions">
|
|
594
|
+
<button kendoButton (click)="onAddUser()" [disabled]="!selectedUser" class="btn-primary">
|
|
595
|
+
<i class="fa-solid fa-plus"></i>
|
|
596
|
+
Add User
|
|
597
|
+
</button>
|
|
598
|
+
<button kendoButton (click)="onClearSelection()" class="btn-secondary">
|
|
599
|
+
Cancel
|
|
600
|
+
</button>
|
|
601
|
+
</div>
|
|
602
|
+
</div>
|
|
603
|
+
}
|
|
604
|
+
</div>
|
|
605
|
+
|
|
606
|
+
<!-- Current Permissions Section -->
|
|
607
|
+
<div class="permissions-list-section">
|
|
608
|
+
<h3 class="section-title">
|
|
609
|
+
<i class="fa-solid fa-users"></i>
|
|
610
|
+
Shared With ({{ permissions.length }})
|
|
611
|
+
</h3>
|
|
612
|
+
|
|
613
|
+
@if (permissions.length === 0) {
|
|
614
|
+
<div class="empty-state">
|
|
615
|
+
<i class="fa-solid fa-user-slash"></i>
|
|
616
|
+
<p>Not shared with anyone yet</p>
|
|
617
|
+
</div>
|
|
618
|
+
} @else {
|
|
619
|
+
<div class="permissions-list">
|
|
620
|
+
@for (permission of permissions; track permission.id) {
|
|
621
|
+
<div class="permission-item">
|
|
622
|
+
<div class="user-avatar">
|
|
623
|
+
<i class="fa-solid fa-user"></i>
|
|
624
|
+
</div>
|
|
625
|
+
<div class="permission-details">
|
|
626
|
+
<div class="permission-user">
|
|
627
|
+
<span class="user-name">{{ permission.userName }}</span>
|
|
628
|
+
@if (permission.sharedByUserName) {
|
|
629
|
+
<span class="shared-by">shared by {{ permission.sharedByUserName }}</span>
|
|
630
|
+
}
|
|
631
|
+
</div>
|
|
632
|
+
|
|
633
|
+
@if (!permission.isEditing) {
|
|
634
|
+
<div class="permission-badges">
|
|
635
|
+
<span class="permission-badge">
|
|
636
|
+
<i class="fa-solid fa-eye"></i> Read
|
|
637
|
+
</span>
|
|
638
|
+
@if (permission.canShare) {
|
|
639
|
+
<span class="permission-badge">
|
|
640
|
+
<i class="fa-solid fa-share-nodes"></i> Share
|
|
641
|
+
</span>
|
|
642
|
+
}
|
|
643
|
+
@if (permission.canEdit) {
|
|
644
|
+
<span class="permission-badge">
|
|
645
|
+
<i class="fa-solid fa-pen-to-square"></i> Edit
|
|
646
|
+
</span>
|
|
647
|
+
}
|
|
648
|
+
@if (permission.canDelete) {
|
|
649
|
+
<span class="permission-badge">
|
|
650
|
+
<i class="fa-solid fa-trash"></i> Delete
|
|
651
|
+
</span>
|
|
652
|
+
}
|
|
653
|
+
</div>
|
|
654
|
+
} @else {
|
|
655
|
+
<div class="permissions-edit-grid">
|
|
656
|
+
<label class="permission-checkbox-small disabled">
|
|
657
|
+
<input type="checkbox" [checked]="true" disabled>
|
|
658
|
+
<span>Read</span>
|
|
659
|
+
</label>
|
|
660
|
+
@if (availablePermissions.includes('Share')) {
|
|
661
|
+
<label class="permission-checkbox-small">
|
|
662
|
+
<input type="checkbox" [(ngModel)]="permission.editingPermissions.canShare">
|
|
663
|
+
<span>Share</span>
|
|
664
|
+
</label>
|
|
665
|
+
}
|
|
666
|
+
@if (availablePermissions.includes('Edit')) {
|
|
667
|
+
<label class="permission-checkbox-small">
|
|
668
|
+
<input type="checkbox" [(ngModel)]="permission.editingPermissions.canEdit">
|
|
669
|
+
<span>Edit</span>
|
|
670
|
+
</label>
|
|
671
|
+
}
|
|
672
|
+
@if (availablePermissions.includes('Delete')) {
|
|
673
|
+
<label class="permission-checkbox-small">
|
|
674
|
+
<input type="checkbox" [(ngModel)]="permission.editingPermissions.canDelete">
|
|
675
|
+
<span>Delete</span>
|
|
676
|
+
</label>
|
|
677
|
+
}
|
|
678
|
+
</div>
|
|
679
|
+
}
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
@if (canModifyPermissions) {
|
|
683
|
+
<div class="permission-actions">
|
|
684
|
+
@if (!permission.isEditing) {
|
|
685
|
+
<button kendoButton class="btn-icon" (click)="onEditPermission(permission)" title="Edit">
|
|
686
|
+
<i class="fa-solid fa-pen"></i>
|
|
687
|
+
</button>
|
|
688
|
+
<button kendoButton class="btn-icon btn-danger" (click)="onRevokePermission(permission)" title="Remove">
|
|
689
|
+
<i class="fa-solid fa-xmark"></i>
|
|
690
|
+
</button>
|
|
691
|
+
} @else {
|
|
692
|
+
<button kendoButton class="btn-icon btn-success" (click)="onSavePermission(permission)" title="Save">
|
|
693
|
+
<i class="fa-solid fa-check"></i>
|
|
694
|
+
</button>
|
|
695
|
+
<button kendoButton class="btn-icon" (click)="onCancelEdit(permission)" title="Cancel">
|
|
696
|
+
<i class="fa-solid fa-xmark"></i>
|
|
697
|
+
</button>
|
|
698
|
+
}
|
|
699
|
+
</div>
|
|
700
|
+
}
|
|
701
|
+
</div>
|
|
702
|
+
}
|
|
703
|
+
</div>
|
|
704
|
+
}
|
|
705
|
+
</div>
|
|
706
|
+
</div>
|
|
707
|
+
|
|
708
|
+
<div class="modal-actions">
|
|
709
|
+
<button kendoButton (click)="onCancel()">Close</button>
|
|
710
|
+
</div>
|
|
711
|
+
</kendo-window>
|
|
712
|
+
}
|
|
713
|
+
`, styles: [".share-modal-content {\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 20px;\n height: 100%;\n overflow-y: auto;\n}\n\n.section-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 16px;\n font-weight: 600;\n color: #1F2937;\n margin: 0 0 16px 0;\n\n i {\n color: #6366F1;\n }\n}\n\n// Add User Section\n.add-user-section {\n border-bottom: 1px solid #E5E7EB;\n padding-bottom: 24px;\n}\n\n.selected-user-info {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 16px 0;\n padding: 12px;\n background: #F9FAFB;\n border-radius: 8px;\n}\n\n.user-avatar {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.user-details {\n flex: 1;\n min-width: 0;\n\n .user-name {\n font-size: 14px;\n font-weight: 500;\n color: #1F2937;\n }\n\n .user-email {\n font-size: 12px;\n color: #6B7280;\n margin-top: 2px;\n }\n}\n\n.permissions-form {\n margin-top: 16px;\n}\n\n.permissions-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 12px;\n margin: 16px 0;\n}\n\n.permission-checkbox {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 12px;\n border: 1px solid #E5E7EB;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n\n &:hover:not(.disabled) {\n border-color: #6366F1;\n background: #F9FAFB;\n }\n\n &.disabled {\n opacity: 0.6;\n cursor: not-allowed;\n background: #F3F4F6;\n }\n\n input[type=\"checkbox\"] {\n margin-right: 8px;\n }\n\n .permission-label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n color: #1F2937;\n font-size: 14px;\n\n i {\n color: #6366F1;\n font-size: 12px;\n }\n }\n\n .permission-desc {\n font-size: 12px;\n color: #6B7280;\n margin-left: 28px;\n }\n}\n\n.form-actions {\n display: flex;\n gap: 8px;\n margin-top: 16px;\n}\n\n// Permissions List Section\n.permissions-list-section {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.permissions-list {\n flex: 1;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.permission-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n transition: background 0.2s;\n\n &:hover {\n background: #F9FAFB;\n }\n}\n\n.permission-details {\n flex: 1;\n min-width: 0;\n}\n\n.permission-user {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n\n .user-name {\n font-weight: 500;\n color: #1F2937;\n font-size: 14px;\n }\n\n .shared-by {\n font-size: 12px;\n color: #6B7280;\n }\n}\n\n.permission-badges {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.permission-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 4px 8px;\n background: #EEF2FF;\n color: #6366F1;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 500;\n\n i {\n font-size: 10px;\n }\n}\n\n.permissions-edit-grid {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.permission-checkbox-small {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 13px;\n cursor: pointer;\n\n &.disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n input[type=\"checkbox\"] {\n margin: 0;\n }\n\n span {\n color: #1F2937;\n }\n}\n\n.permission-actions {\n display: flex;\n gap: 4px;\n}\n\n// Empty State\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n color: #9CA3AF;\n\n i {\n font-size: 48px;\n margin-bottom: 12px;\n }\n\n p {\n margin: 0;\n font-size: 14px;\n }\n}\n\n// Button Styles\n.btn-primary {\n background: #6366F1 !important;\n color: white !important;\n border: none !important;\n padding: 8px 16px;\n border-radius: 6px;\n font-weight: 500;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 6px;\n\n &:hover:not(:disabled) {\n background: #5558E3 !important;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n i {\n font-size: 12px;\n }\n}\n\n.btn-secondary {\n background: white !important;\n color: #6B7280 !important;\n border: 1px solid #E5E7EB !important;\n padding: 8px 16px;\n border-radius: 6px;\n font-weight: 500;\n cursor: pointer;\n\n &:hover {\n background: #F9FAFB !important;\n border-color: #D1D5DB !important;\n }\n}\n\n.btn-icon {\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 6px;\n border: 1px solid #E5E7EB;\n background: white;\n color: #6B7280;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s;\n\n &:hover {\n background: #F9FAFB;\n border-color: #D1D5DB;\n }\n\n &.btn-success {\n color: #10B981;\n border-color: #10B981;\n\n &:hover {\n background: #ECFDF5;\n }\n }\n\n &.btn-danger {\n color: #EF4444;\n border-color: #EF4444;\n\n &:hover {\n background: #FEF2F2;\n }\n }\n\n i {\n font-size: 14px;\n }\n}\n\n.modal-actions {\n display: flex;\n justify-content: flex-end;\n padding: 16px 20px;\n border-top: 1px solid #E5E7EB;\n background: #F9FAFB;\n}\n"] }]
|
|
714
|
+
}], () => [{ type: i1.CollectionPermissionService }, { type: i0.ChangeDetectorRef }], { isOpen: [{
|
|
715
|
+
type: Input
|
|
716
|
+
}], collection: [{
|
|
717
|
+
type: Input
|
|
718
|
+
}], currentUser: [{
|
|
719
|
+
type: Input
|
|
720
|
+
}], currentUserPermissions: [{
|
|
721
|
+
type: Input
|
|
722
|
+
}], saved: [{
|
|
723
|
+
type: Output
|
|
724
|
+
}], cancelled: [{
|
|
725
|
+
type: Output
|
|
726
|
+
}] }); })();
|
|
727
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionShareModalComponent, { className: "CollectionShareModalComponent", filePath: "src/lib/components/collection/collection-share-modal.component.ts", lineNumber: 223 }); })();
|
|
728
|
+
//# sourceMappingURL=collection-share-modal.component.js.map
|