@memberjunction/ng-conversations 6.2.0-edge.6 → 6.2.0-edge.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +1 -0
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +182 -2
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +1295 -462
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +26 -4
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +305 -122
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-mode-picker.component.js +2 -2
- package/dist/lib/components/conversation/conversation-mode-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts +109 -0
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts.map +1 -0
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js +298 -0
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js.map +1 -0
- package/dist/lib/components/message/agent-handoff-card.component.d.ts +102 -0
- package/dist/lib/components/message/agent-handoff-card.component.d.ts.map +1 -0
- package/dist/lib/components/message/agent-handoff-card.component.js +439 -0
- package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -0
- package/dist/lib/components/message/message-input.component.d.ts +80 -53
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +381 -277
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +24 -1
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +556 -426
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +16 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +59 -2
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +27 -2
- package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +183 -16
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +34 -23
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +437 -71
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +6 -3
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js +1 -1
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel-state.d.ts +5 -0
- package/dist/lib/components/realtime/media/media-channel-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel-state.js +27 -1
- package/dist/lib/components/realtime/media/media-channel-state.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +7 -2
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +19 -2
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js +59 -10
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +17 -6
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js +61 -27
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts +27 -3
- package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +199 -103
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +55 -15
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +134 -53
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts +3 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js +8 -4
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +9 -12
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +38 -18
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +27 -4
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts +8 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js +51 -10
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.d.ts +46 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.d.ts.map +1 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.js +64 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel-config.js.map +1 -0
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +131 -9
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +347 -38
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts +7 -0
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +153 -61
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +2 -1
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +9 -4
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +5 -4
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +2 -2
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +11 -7
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
- package/dist/lib/models/agent-turn.model.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +5 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +16 -0
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +7 -1
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +2 -0
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +1 -0
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +1 -0
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +1 -4
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +7 -45
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts +2 -1
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +1 -0
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/utils/agent-handoff-map.d.ts +52 -0
- package/dist/lib/utils/agent-handoff-map.d.ts.map +1 -0
- package/dist/lib/utils/agent-handoff-map.js +270 -0
- package/dist/lib/utils/agent-handoff-map.js.map +1 -0
- package/dist/lib/utils/agent-turn-routing.d.ts +62 -7
- package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -1
- package/dist/lib/utils/agent-turn-routing.js +147 -6
- package/dist/lib/utils/agent-turn-routing.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +17 -9
- package/dist/lib/utils/decision-routing.d.ts.map +1 -1
- package/dist/lib/utils/decision-routing.js +23 -14
- package/dist/lib/utils/decision-routing.js.map +1 -1
- package/dist/lib/utils/folder-move.d.ts +30 -0
- package/dist/lib/utils/folder-move.d.ts.map +1 -0
- package/dist/lib/utils/folder-move.js +47 -0
- package/dist/lib/utils/folder-move.js.map +1 -0
- package/dist/lib/utils/thread-replies.d.ts +34 -0
- package/dist/lib/utils/thread-replies.d.ts.map +1 -0
- package/dist/lib/utils/thread-replies.js +49 -0
- package/dist/lib/utils/thread-replies.js.map +1 -0
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +36 -36
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
2
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
3
|
+
import { ConversationEngine, PROJECTS_RESOURCE_TYPE_ID, ResourcePermissionEngine } from '@memberjunction/core-entities';
|
|
4
|
+
import { RunView } from '@memberjunction/core';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
import * as i1 from "@angular/forms";
|
|
5
7
|
import * as i2 from "@memberjunction/ng-ui-components";
|
|
@@ -20,63 +22,165 @@ function ProjectFormModalComponent_Conditional_17_Template(rf, ctx) { if (rf & 1
|
|
|
20
22
|
i0.ɵɵtext(7, " A shared folder stays shared. To keep something to yourself, create a new private folder and move it there. ");
|
|
21
23
|
i0.ɵɵelementEnd()();
|
|
22
24
|
} }
|
|
25
|
+
function ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
i0.ɵɵelementStart(0, "div", 8);
|
|
27
|
+
i0.ɵɵtext(1);
|
|
28
|
+
i0.ɵɵelementEnd();
|
|
29
|
+
} if (rf & 2) {
|
|
30
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
31
|
+
i0.ɵɵadvance();
|
|
32
|
+
i0.ɵɵtextInterpolate(ctx_r1.ShareError);
|
|
33
|
+
} }
|
|
34
|
+
function ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
i0.ɵɵelementStart(0, "span", 42);
|
|
36
|
+
i0.ɵɵtext(1);
|
|
37
|
+
i0.ɵɵelementEnd();
|
|
38
|
+
} if (rf & 2) {
|
|
39
|
+
const perm_r5 = i0.ɵɵnextContext().$implicit;
|
|
40
|
+
i0.ɵɵadvance();
|
|
41
|
+
i0.ɵɵtextInterpolate(perm_r5.userEmail);
|
|
42
|
+
} }
|
|
43
|
+
function ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
44
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
45
|
+
i0.ɵɵelementStart(0, "div", 39)(1, "div", 40)(2, "span", 41);
|
|
46
|
+
i0.ɵɵtext(3);
|
|
47
|
+
i0.ɵɵelementEnd();
|
|
48
|
+
i0.ɵɵconditionalCreate(4, ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_For_2_Conditional_4_Template, 2, 1, "span", 42);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
i0.ɵɵelementStart(5, "div", 43)(6, "select", 33);
|
|
51
|
+
i0.ɵɵlistener("ngModelChange", function ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_For_2_Template_select_ngModelChange_6_listener($event) { const perm_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnFolderPermissionLevelChange(perm_r5, $event)); });
|
|
52
|
+
i0.ɵɵelementStart(7, "option", 34);
|
|
53
|
+
i0.ɵɵtext(8, "Can View");
|
|
54
|
+
i0.ɵɵelementEnd();
|
|
55
|
+
i0.ɵɵelementStart(9, "option", 35);
|
|
56
|
+
i0.ɵɵtext(10, "Can Edit");
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
i0.ɵɵelementStart(11, "option", 36);
|
|
59
|
+
i0.ɵɵtext(12, "Owner");
|
|
60
|
+
i0.ɵɵelementEnd()();
|
|
61
|
+
i0.ɵɵelementStart(13, "button", 44);
|
|
62
|
+
i0.ɵɵlistener("click", function ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_For_2_Template_button_click_13_listener() { const perm_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnRemoveFolderPermission(perm_r5)); });
|
|
63
|
+
i0.ɵɵelement(14, "i", 45);
|
|
64
|
+
i0.ɵɵelementEnd()()();
|
|
65
|
+
} if (rf & 2) {
|
|
66
|
+
const perm_r5 = ctx.$implicit;
|
|
67
|
+
i0.ɵɵadvance(3);
|
|
68
|
+
i0.ɵɵtextInterpolate(perm_r5.userName || perm_r5.roleName || perm_r5.userEmail);
|
|
69
|
+
i0.ɵɵadvance();
|
|
70
|
+
i0.ɵɵconditional(perm_r5.userEmail && perm_r5.userName ? 4 : -1);
|
|
71
|
+
i0.ɵɵadvance(2);
|
|
72
|
+
i0.ɵɵproperty("ngModel", perm_r5.permissionLevel);
|
|
73
|
+
} }
|
|
74
|
+
function ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
+
i0.ɵɵelementStart(0, "div", 38);
|
|
76
|
+
i0.ɵɵrepeaterCreate(1, ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_For_2_Template, 15, 3, "div", 39, i0.ɵɵrepeaterTrackByIdentity);
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
} if (rf & 2) {
|
|
79
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
80
|
+
i0.ɵɵadvance();
|
|
81
|
+
i0.ɵɵrepeater(ctx_r1.FolderPermissions);
|
|
82
|
+
} }
|
|
83
|
+
function ProjectFormModalComponent_Conditional_18_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
84
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
85
|
+
i0.ɵɵelementStart(0, "div", 30)(1, "div", 31)(2, "input", 32);
|
|
86
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ProjectFormModalComponent_Conditional_18_Conditional_17_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.NewShareEmail, $event) || (ctx_r1.NewShareEmail = $event); return i0.ɵɵresetView($event); });
|
|
87
|
+
i0.ɵɵlistener("keydown.enter", function ProjectFormModalComponent_Conditional_18_Conditional_17_Template_input_keydown_enter_2_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); $event.preventDefault(); return i0.ɵɵresetView(ctx_r1.OnAddFolderUser()); });
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
i0.ɵɵelementStart(3, "select", 33);
|
|
90
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ProjectFormModalComponent_Conditional_18_Conditional_17_Template_select_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.NewShareLevel, $event) || (ctx_r1.NewShareLevel = $event); return i0.ɵɵresetView($event); });
|
|
91
|
+
i0.ɵɵelementStart(4, "option", 34);
|
|
92
|
+
i0.ɵɵtext(5, "Can View");
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
i0.ɵɵelementStart(6, "option", 35);
|
|
95
|
+
i0.ɵɵtext(7, "Can Edit");
|
|
96
|
+
i0.ɵɵelementEnd();
|
|
97
|
+
i0.ɵɵelementStart(8, "option", 36);
|
|
98
|
+
i0.ɵɵtext(9, "Owner");
|
|
99
|
+
i0.ɵɵelementEnd()();
|
|
100
|
+
i0.ɵɵelementStart(10, "button", 37);
|
|
101
|
+
i0.ɵɵlistener("click", function ProjectFormModalComponent_Conditional_18_Conditional_17_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnAddFolderUser()); });
|
|
102
|
+
i0.ɵɵtext(11, " Add ");
|
|
103
|
+
i0.ɵɵelementEnd()();
|
|
104
|
+
i0.ɵɵconditionalCreate(12, ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_12_Template, 2, 1, "div", 8);
|
|
105
|
+
i0.ɵɵconditionalCreate(13, ProjectFormModalComponent_Conditional_18_Conditional_17_Conditional_13_Template, 3, 0, "div", 38);
|
|
106
|
+
i0.ɵɵelementEnd();
|
|
107
|
+
} if (rf & 2) {
|
|
108
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
109
|
+
i0.ɵɵadvance(2);
|
|
110
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewShareEmail);
|
|
111
|
+
i0.ɵɵadvance();
|
|
112
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewShareLevel);
|
|
113
|
+
i0.ɵɵadvance(9);
|
|
114
|
+
i0.ɵɵconditional(ctx_r1.ShareError ? 12 : -1);
|
|
115
|
+
i0.ɵɵadvance();
|
|
116
|
+
i0.ɵɵconditional(ctx_r1.FolderPermissions.length > 0 ? 13 : -1);
|
|
117
|
+
} }
|
|
23
118
|
function ProjectFormModalComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
24
119
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
25
120
|
i0.ɵɵelementStart(0, "fieldset", 11)(1, "legend");
|
|
26
121
|
i0.ɵɵtext(2, "Visibility");
|
|
27
122
|
i0.ɵɵelementEnd();
|
|
28
123
|
i0.ɵɵelementStart(3, "label", 26)(4, "input", 27);
|
|
29
|
-
i0.ɵɵ
|
|
124
|
+
i0.ɵɵlistener("change", function ProjectFormModalComponent_Conditional_18_Template_input_change_4_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SelectVisibility("Private")); });
|
|
30
125
|
i0.ɵɵelementEnd();
|
|
31
126
|
i0.ɵɵelementStart(5, "span");
|
|
32
|
-
i0.ɵɵtext(6, "Only me");
|
|
127
|
+
i0.ɵɵtext(6, "Only me (Private)");
|
|
33
128
|
i0.ɵɵelementEnd()();
|
|
34
|
-
i0.ɵɵelementStart(7, "label", 26)(8, "input",
|
|
35
|
-
i0.ɵɵ
|
|
129
|
+
i0.ɵɵelementStart(7, "label", 26)(8, "input", 28);
|
|
130
|
+
i0.ɵɵlistener("change", function ProjectFormModalComponent_Conditional_18_Template_input_change_8_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SelectVisibility("Shared")); });
|
|
36
131
|
i0.ɵɵelementEnd();
|
|
37
132
|
i0.ɵɵelementStart(9, "span");
|
|
38
|
-
i0.ɵɵtext(10, "
|
|
133
|
+
i0.ɵɵtext(10, "Specific people & roles (Shared)");
|
|
39
134
|
i0.ɵɵelementEnd()();
|
|
40
|
-
i0.ɵɵelementStart(11, "
|
|
41
|
-
i0.ɵɵ
|
|
135
|
+
i0.ɵɵelementStart(11, "label", 26)(12, "input", 29);
|
|
136
|
+
i0.ɵɵlistener("change", function ProjectFormModalComponent_Conditional_18_Template_input_change_12_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SelectVisibility("Public")); });
|
|
137
|
+
i0.ɵɵelementEnd();
|
|
138
|
+
i0.ɵɵelementStart(13, "span");
|
|
139
|
+
i0.ɵɵtext(14, "Everyone (Public)");
|
|
42
140
|
i0.ɵɵelementEnd()();
|
|
141
|
+
i0.ɵɵelementStart(15, "p", 25);
|
|
142
|
+
i0.ɵɵtext(16);
|
|
143
|
+
i0.ɵɵelementEnd()();
|
|
144
|
+
i0.ɵɵconditionalCreate(17, ProjectFormModalComponent_Conditional_18_Conditional_17_Template, 14, 4, "div", 30);
|
|
43
145
|
} if (rf & 2) {
|
|
44
146
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
45
147
|
i0.ɵɵadvance(4);
|
|
46
|
-
i0.ɵɵproperty("
|
|
47
|
-
i0.ɵɵ
|
|
148
|
+
i0.ɵɵproperty("checked", ctx_r1.VisibilityTier === "Private");
|
|
149
|
+
i0.ɵɵadvance(4);
|
|
150
|
+
i0.ɵɵproperty("checked", ctx_r1.VisibilityTier === "Shared");
|
|
48
151
|
i0.ɵɵadvance(4);
|
|
49
|
-
i0.ɵɵproperty("
|
|
50
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.FormData.isPersonal);
|
|
152
|
+
i0.ɵɵproperty("checked", ctx_r1.VisibilityTier === "Public");
|
|
51
153
|
i0.ɵɵadvance(4);
|
|
52
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.
|
|
154
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.VisibilityHint, " ");
|
|
155
|
+
i0.ɵɵadvance();
|
|
156
|
+
i0.ɵɵconditional(ctx_r1.VisibilityTier === "Shared" ? 17 : -1);
|
|
53
157
|
} }
|
|
54
158
|
function ProjectFormModalComponent_For_25_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
-
const
|
|
56
|
-
i0.ɵɵelementStart(0, "button",
|
|
57
|
-
i0.ɵɵlistener("click", function ProjectFormModalComponent_For_25_Template_button_click_0_listener() { const
|
|
159
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
160
|
+
i0.ɵɵelementStart(0, "button", 46);
|
|
161
|
+
i0.ɵɵlistener("click", function ProjectFormModalComponent_For_25_Template_button_click_0_listener() { const color_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectColor(color_r7)); });
|
|
58
162
|
i0.ɵɵelementEnd();
|
|
59
163
|
} if (rf & 2) {
|
|
60
|
-
const
|
|
164
|
+
const color_r7 = ctx.$implicit;
|
|
61
165
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
62
|
-
i0.ɵɵstyleProp("background-color",
|
|
63
|
-
i0.ɵɵclassProp("selected", ctx_r1.formData.color ===
|
|
64
|
-
i0.ɵɵproperty("title",
|
|
166
|
+
i0.ɵɵstyleProp("background-color", color_r7);
|
|
167
|
+
i0.ɵɵclassProp("selected", ctx_r1.formData.color === color_r7);
|
|
168
|
+
i0.ɵɵproperty("title", color_r7);
|
|
65
169
|
} }
|
|
66
170
|
function ProjectFormModalComponent_For_37_Template(rf, ctx) { if (rf & 1) {
|
|
67
|
-
const
|
|
68
|
-
i0.ɵɵelementStart(0, "button",
|
|
69
|
-
i0.ɵɵlistener("click", function ProjectFormModalComponent_For_37_Template_button_click_0_listener() { const
|
|
171
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
172
|
+
i0.ɵɵelementStart(0, "button", 47);
|
|
173
|
+
i0.ɵɵlistener("click", function ProjectFormModalComponent_For_37_Template_button_click_0_listener() { const icon_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectIcon(icon_r9)); });
|
|
70
174
|
i0.ɵɵelement(1, "i");
|
|
71
175
|
i0.ɵɵelementEnd();
|
|
72
176
|
} if (rf & 2) {
|
|
73
|
-
const
|
|
177
|
+
const icon_r9 = ctx.$implicit;
|
|
74
178
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
75
|
-
i0.ɵɵstyleProp("color", ctx_r1.formData.icon ===
|
|
76
|
-
i0.ɵɵclassProp("selected", ctx_r1.formData.icon ===
|
|
77
|
-
i0.ɵɵproperty("title",
|
|
179
|
+
i0.ɵɵstyleProp("color", ctx_r1.formData.icon === icon_r9 ? ctx_r1.formData.color : null);
|
|
180
|
+
i0.ɵɵclassProp("selected", ctx_r1.formData.icon === icon_r9);
|
|
181
|
+
i0.ɵɵproperty("title", icon_r9);
|
|
78
182
|
i0.ɵɵadvance();
|
|
79
|
-
i0.ɵɵclassMap(i0.ɵɵinterpolate1("fa-solid ",
|
|
183
|
+
i0.ɵɵclassMap(i0.ɵɵinterpolate1("fa-solid ", icon_r9));
|
|
80
184
|
} }
|
|
81
185
|
const DEFAULT_PROJECT_COLORS = [
|
|
82
186
|
'#0076B6', // MJ Blue
|
|
@@ -190,7 +294,8 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
190
294
|
// NAMES are user-authored free text, and before OwnerUserID existed every one of
|
|
191
295
|
// them was readable by every user of the environment, which is what prompted
|
|
192
296
|
// this. Existing folders are untouched: they carry NULL, which still means shared.
|
|
193
|
-
isPersonal: true
|
|
297
|
+
isPersonal: true,
|
|
298
|
+
visibility: 'Private'
|
|
194
299
|
};
|
|
195
300
|
/** @deprecated Use {@link FormData}. */
|
|
196
301
|
get formData() {
|
|
@@ -200,6 +305,11 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
200
305
|
set formData(value) {
|
|
201
306
|
this.FormData = value;
|
|
202
307
|
}
|
|
308
|
+
FolderPermissions = [];
|
|
309
|
+
RemovedFolderPermissionIds = [];
|
|
310
|
+
NewShareEmail = '';
|
|
311
|
+
NewShareLevel = 'View';
|
|
312
|
+
ShareError = '';
|
|
203
313
|
ShowNameError = false;
|
|
204
314
|
/** @deprecated Use {@link ShowNameError}. */
|
|
205
315
|
get showNameError() {
|
|
@@ -237,27 +347,37 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
237
347
|
this.AvailableIcons = value;
|
|
238
348
|
}
|
|
239
349
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
350
|
+
* Current three-tier visibility selection (`'Private' | 'Shared' | 'Public'`).
|
|
351
|
+
* Keeps `FormData.isPersonal` in sync (`false` iff `'Public'`).
|
|
352
|
+
*/
|
|
353
|
+
get VisibilityTier() {
|
|
354
|
+
if (!this.FormData.isPersonal) {
|
|
355
|
+
return 'Public';
|
|
356
|
+
}
|
|
357
|
+
return this.FormData.visibility === 'Shared' ? 'Shared' : 'Private';
|
|
358
|
+
}
|
|
359
|
+
set VisibilityTier(tier) {
|
|
360
|
+
this.FormData.visibility = tier;
|
|
361
|
+
this.FormData.isPersonal = tier !== 'Public';
|
|
362
|
+
}
|
|
363
|
+
SelectVisibility(tier) {
|
|
364
|
+
this.VisibilityTier = tier;
|
|
365
|
+
this.ShareError = '';
|
|
366
|
+
this.cdr.detectChanges();
|
|
367
|
+
}
|
|
368
|
+
get VisibilityHint() {
|
|
369
|
+
const tier = this.VisibilityTier;
|
|
370
|
+
if (tier === 'Public') {
|
|
371
|
+
return "Everyone sees this folder in their lists, and any conversation in it whose owner turns on folder access. Once shared, a folder can't be made private again.";
|
|
372
|
+
}
|
|
373
|
+
if (tier === 'Shared') {
|
|
374
|
+
return 'People and roles you add below see this folder in their lists, and any conversation in it whose owner turns on folder access.';
|
|
375
|
+
}
|
|
376
|
+
return 'This folder appears only in your list.';
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* True when this dialog is editing a folder that is currently PUBLIC (`OwnerUserID IS NULL`) —
|
|
380
|
+
* in which case visibility is shown as a statement rather than a control.
|
|
261
381
|
*/
|
|
262
382
|
get VisibilityIsLocked() {
|
|
263
383
|
return this.IsEditMode && !this.Project?.OwnerUserID;
|
|
@@ -280,11 +400,16 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
280
400
|
this.IsEditMode = this.Project != null;
|
|
281
401
|
if (this.Project) {
|
|
282
402
|
this.loadProjectData();
|
|
403
|
+
if (this.Project.ID && this.Project.OwnerUserID) {
|
|
404
|
+
void this.loadFolderPermissions();
|
|
405
|
+
}
|
|
283
406
|
}
|
|
284
407
|
}
|
|
285
408
|
loadProjectData() {
|
|
286
409
|
if (!this.Project)
|
|
287
410
|
return;
|
|
411
|
+
const initialTier = ConversationEngine.Instance?.GetProjectVisibilityTier?.(this.Project) ??
|
|
412
|
+
(this.Project.OwnerUserID ? 'Private' : 'Public');
|
|
288
413
|
this.FormData = {
|
|
289
414
|
name: this.Project.Name || '',
|
|
290
415
|
description: this.Project.Description || '',
|
|
@@ -292,9 +417,121 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
292
417
|
icon: this.Project.Icon || 'fa-folder',
|
|
293
418
|
// Reflect what the folder IS, not the create-time default — otherwise opening
|
|
294
419
|
// a shared folder's settings and pressing Save would silently make it private.
|
|
295
|
-
isPersonal: !!this.Project.OwnerUserID
|
|
420
|
+
isPersonal: !!this.Project.OwnerUserID,
|
|
421
|
+
visibility: initialTier
|
|
296
422
|
};
|
|
297
423
|
}
|
|
424
|
+
async loadFolderPermissions() {
|
|
425
|
+
if (!this.Project?.ID)
|
|
426
|
+
return;
|
|
427
|
+
try {
|
|
428
|
+
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
429
|
+
const result = await rv.RunView({
|
|
430
|
+
EntityName: 'MJ: Resource Permissions',
|
|
431
|
+
ExtraFilter: `ResourceTypeID='${PROJECTS_RESOURCE_TYPE_ID}' AND ResourceRecordID='${this.Project.ID}' AND Status='Approved'`,
|
|
432
|
+
ResultType: 'entity_object'
|
|
433
|
+
});
|
|
434
|
+
if (!result?.Success || !result.Results)
|
|
435
|
+
return;
|
|
436
|
+
const loaded = [];
|
|
437
|
+
for (const perm of result.Results) {
|
|
438
|
+
if (perm.Type === 'Role' && perm.RoleID) {
|
|
439
|
+
loaded.push({
|
|
440
|
+
permissionId: perm.ID,
|
|
441
|
+
type: 'Role',
|
|
442
|
+
roleId: perm.RoleID,
|
|
443
|
+
roleName: perm.Role || perm.RoleID,
|
|
444
|
+
permissionLevel: perm.PermissionLevel || 'View'
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
else if (perm.UserID) {
|
|
448
|
+
let userEmail = '';
|
|
449
|
+
let userName = perm.User || '';
|
|
450
|
+
const userResult = await rv.RunView({
|
|
451
|
+
EntityName: 'MJ: Users',
|
|
452
|
+
ExtraFilter: `ID='${perm.UserID}'`,
|
|
453
|
+
ResultType: 'entity_object'
|
|
454
|
+
});
|
|
455
|
+
if (userResult?.Success && userResult.Results?.length) {
|
|
456
|
+
userEmail = userResult.Results[0].Email || '';
|
|
457
|
+
userName = userResult.Results[0].Name || userName;
|
|
458
|
+
}
|
|
459
|
+
loaded.push({
|
|
460
|
+
permissionId: perm.ID,
|
|
461
|
+
type: 'User',
|
|
462
|
+
userId: perm.UserID,
|
|
463
|
+
userEmail,
|
|
464
|
+
userName: userName || userEmail || perm.UserID,
|
|
465
|
+
permissionLevel: perm.PermissionLevel || 'View'
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
this.FolderPermissions = loaded;
|
|
470
|
+
if (loaded.length > 0 && this.Project.OwnerUserID) {
|
|
471
|
+
this.VisibilityTier = 'Shared';
|
|
472
|
+
}
|
|
473
|
+
this.cdr.detectChanges();
|
|
474
|
+
}
|
|
475
|
+
catch (err) {
|
|
476
|
+
console.warn('Failed to load folder permissions:', err);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
async OnAddFolderUser() {
|
|
480
|
+
const email = this.NewShareEmail.trim();
|
|
481
|
+
this.ShareError = '';
|
|
482
|
+
if (!email)
|
|
483
|
+
return;
|
|
484
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
|
|
485
|
+
this.ShareError = 'Please enter a valid email address.';
|
|
486
|
+
this.cdr.detectChanges();
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (this.FolderPermissions.some((p) => p.userEmail?.toLowerCase() === email.toLowerCase())) {
|
|
490
|
+
this.ShareError = 'This user already has access.';
|
|
491
|
+
this.cdr.detectChanges();
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
try {
|
|
495
|
+
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
496
|
+
const userResult = await rv.RunView({
|
|
497
|
+
EntityName: 'MJ: Users',
|
|
498
|
+
ExtraFilter: `Email='${email.replace(/'/g, "''")}'`,
|
|
499
|
+
ResultType: 'entity_object'
|
|
500
|
+
});
|
|
501
|
+
if (!userResult?.Success || !userResult.Results?.length) {
|
|
502
|
+
this.ShareError = 'No user found with that email address.';
|
|
503
|
+
this.cdr.detectChanges();
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
const user = userResult.Results[0];
|
|
507
|
+
this.FolderPermissions.push({
|
|
508
|
+
permissionId: null,
|
|
509
|
+
type: 'User',
|
|
510
|
+
userId: user.ID,
|
|
511
|
+
userEmail: user.Email,
|
|
512
|
+
userName: user.Name || user.Email,
|
|
513
|
+
permissionLevel: this.NewShareLevel
|
|
514
|
+
});
|
|
515
|
+
this.NewShareEmail = '';
|
|
516
|
+
this.cdr.detectChanges();
|
|
517
|
+
}
|
|
518
|
+
catch (err) {
|
|
519
|
+
console.error('Error looking up user:', err);
|
|
520
|
+
this.ShareError = 'Failed to look up user.';
|
|
521
|
+
this.cdr.detectChanges();
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
OnFolderPermissionLevelChange(perm, level) {
|
|
525
|
+
perm.permissionLevel = level;
|
|
526
|
+
this.cdr.detectChanges();
|
|
527
|
+
}
|
|
528
|
+
OnRemoveFolderPermission(perm) {
|
|
529
|
+
if (perm.permissionId) {
|
|
530
|
+
this.RemovedFolderPermissionIds.push(perm.permissionId);
|
|
531
|
+
}
|
|
532
|
+
this.FolderPermissions = this.FolderPermissions.filter((p) => p !== perm);
|
|
533
|
+
this.cdr.detectChanges();
|
|
534
|
+
}
|
|
298
535
|
SelectColor(color) {
|
|
299
536
|
this.FormData.color = color;
|
|
300
537
|
this.cdr.detectChanges();
|
|
@@ -321,22 +558,19 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
321
558
|
this.ShowNameError = false;
|
|
322
559
|
try {
|
|
323
560
|
const md = this.ProviderToUse;
|
|
324
|
-
// A
|
|
561
|
+
// A Public folder cannot be taken private — the control is not rendered for one
|
|
325
562
|
// (see VisibilityIsLocked). This is the same rule expressed where the write happens,
|
|
326
563
|
// so a future template change, a stale `formData` from a reopened dialog, or anything
|
|
327
564
|
// else that sets the flag cannot quietly appropriate a folder the whole team uses.
|
|
328
|
-
// It resolves to the folder's CURRENT state, so it is a no-op in every other case.
|
|
329
565
|
const isPersonal = this.VisibilityIsLocked ? false : this.FormData.isPersonal;
|
|
330
566
|
const project = this.Project || await md.GetEntityObject('MJ: Projects', this.CurrentUser);
|
|
331
567
|
project.Name = this.FormData.name.trim();
|
|
332
568
|
project.Description = this.FormData.description.trim() || null;
|
|
333
569
|
project.Color = this.FormData.color;
|
|
334
570
|
project.Icon = this.FormData.icon;
|
|
335
|
-
//
|
|
336
|
-
//
|
|
337
|
-
|
|
338
|
-
// offer. See VisibilityIsLocked.
|
|
339
|
-
project.OwnerUserID = isPersonal ? this.CurrentUser.ID : null;
|
|
571
|
+
// Both Private and Shared folders stay owned by their creator (OwnerUserID set).
|
|
572
|
+
// Public folders set OwnerUserID = null so everyone in the environment can view them.
|
|
573
|
+
project.OwnerUserID = isPersonal ? (this.Project?.OwnerUserID || this.CurrentUser.ID) : null;
|
|
340
574
|
if (!this.IsEditMode) {
|
|
341
575
|
project.EnvironmentID = this.EnvironmentId;
|
|
342
576
|
project.IsArchived = false;
|
|
@@ -346,6 +580,7 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
346
580
|
}
|
|
347
581
|
const saved = await project.Save();
|
|
348
582
|
if (saved) {
|
|
583
|
+
await this.syncFolderPermissions(project.ID);
|
|
349
584
|
this.ProjectSaved.emit(project);
|
|
350
585
|
this.DialogRef.Close();
|
|
351
586
|
}
|
|
@@ -362,6 +597,76 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
362
597
|
alert(`Failed to save folder.\n\n${reason}`);
|
|
363
598
|
}
|
|
364
599
|
}
|
|
600
|
+
async syncFolderPermissions(projectId) {
|
|
601
|
+
if (!projectId)
|
|
602
|
+
return;
|
|
603
|
+
const md = this.ProviderToUse;
|
|
604
|
+
const tier = this.VisibilityIsLocked ? 'Public' : this.VisibilityTier;
|
|
605
|
+
const idsToDelete = [...this.RemovedFolderPermissionIds];
|
|
606
|
+
if (tier !== 'Shared') {
|
|
607
|
+
for (const perm of this.FolderPermissions) {
|
|
608
|
+
if (perm.permissionId) {
|
|
609
|
+
idsToDelete.push(perm.permissionId);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
// Save() and Delete() report a refusal on LatestResult and return false. Throwing here sends
|
|
614
|
+
// it to OnSave's catch, which shows the reason and keeps the dialog open instead of closing on
|
|
615
|
+
// a folder whose sharing did not take.
|
|
616
|
+
const refused = (entity, action) => {
|
|
617
|
+
throw new Error(`Could not ${action} a folder permission: ${entity.LatestResult?.CompleteMessage || 'no reason given'}`);
|
|
618
|
+
};
|
|
619
|
+
let changed = false;
|
|
620
|
+
try {
|
|
621
|
+
for (const permId of idsToDelete) {
|
|
622
|
+
const permEntity = await md.GetEntityObject('MJ: Resource Permissions', this.CurrentUser);
|
|
623
|
+
if (await permEntity.Load(permId)) {
|
|
624
|
+
if (!(await permEntity.Delete()))
|
|
625
|
+
refused(permEntity, 'remove');
|
|
626
|
+
changed = true;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
if (tier === 'Shared') {
|
|
630
|
+
for (const perm of this.FolderPermissions) {
|
|
631
|
+
const permEntity = await md.GetEntityObject('MJ: Resource Permissions', this.CurrentUser);
|
|
632
|
+
if (perm.permissionId) {
|
|
633
|
+
if (await permEntity.Load(perm.permissionId)) {
|
|
634
|
+
if (permEntity.PermissionLevel !== perm.permissionLevel) {
|
|
635
|
+
permEntity.PermissionLevel = perm.permissionLevel;
|
|
636
|
+
if (!(await permEntity.Save()))
|
|
637
|
+
refused(permEntity, 'update');
|
|
638
|
+
changed = true;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
permEntity.ResourceTypeID = PROJECTS_RESOURCE_TYPE_ID;
|
|
644
|
+
permEntity.ResourceRecordID = projectId;
|
|
645
|
+
permEntity.Type = perm.type;
|
|
646
|
+
permEntity.UserID = perm.type === 'User' ? (perm.userId ?? null) : null;
|
|
647
|
+
permEntity.RoleID = perm.type === 'Role' ? (perm.roleId ?? null) : null;
|
|
648
|
+
permEntity.PermissionLevel = perm.permissionLevel;
|
|
649
|
+
permEntity.Status = 'Approved';
|
|
650
|
+
if (!(await permEntity.Save()))
|
|
651
|
+
refused(permEntity, 'add');
|
|
652
|
+
perm.permissionId = permEntity.ID;
|
|
653
|
+
changed = true;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
finally {
|
|
659
|
+
// Grants that did land before a refusal are real, so the engine still has to see them.
|
|
660
|
+
if (changed) {
|
|
661
|
+
try {
|
|
662
|
+
await ResourcePermissionEngine.Instance?.Config?.(true, this.CurrentUser);
|
|
663
|
+
}
|
|
664
|
+
catch {
|
|
665
|
+
// Isolated test environments without a global Metadata.Provider may not support engine Config refresh.
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
365
670
|
/** @deprecated Use {@link OnSave}. */
|
|
366
671
|
async onSave() {
|
|
367
672
|
return this.OnSave();
|
|
@@ -370,7 +675,7 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
370
675
|
this.DialogRef.Close();
|
|
371
676
|
}
|
|
372
677
|
static ɵfac = function ProjectFormModalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ProjectFormModalComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
373
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ProjectFormModalComponent, selectors: [["mj-project-form-modal"]], inputs: { DialogRef: "DialogRef", dialogRef: "dialogRef", Project: "Project", project: "project", EnvironmentId: "EnvironmentId", environmentId: "environmentId", CurrentUser: "CurrentUser", currentUser: "currentUser", ParentId: "ParentId", parentId: "parentId" }, outputs: { ProjectSaved: "ProjectSaved", projectSaved: "projectSaved" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 43, vars: 19, consts: [[3, "Close", "Title", "Width", "MinWidth", "Visible"], [1, "project-form"], [1, "folder-preview"], [1, "folder-preview-chip"], [1, "folder-preview-name"], [1, "form-field"], ["for", "projectName", 1, "required"], ["id", "projectName", "type", "text", "placeholder", "e.g. Client work, Research, Ideas", "autofocus", "", 1, "mj-input", "full-width", 3, "ngModelChange", "keydown.enter", "ngModel"], [1, "error-message"], ["for", "projectDescription"], ["id", "projectDescription", "placeholder", "What goes in this folder? (optional)", "rows", "2", 1, "mj-textarea", "full-width", 3, "ngModelChange", "ngModel"], ["aria-describedby", "projectVisibilityHint", 1, "visibility-set"], [1, "color-picker-section"], [1, "color-palette"], ["type", "button", 1, "color-swatch", 3, "selected", "backgroundColor", "title"], [1, "custom-color-input"], ["for", "customColor"], ["id", "customColor", "type", "color", 1, "custom-color-picker", 3, "ngModelChange", "ngModel"], [1, "color-value"], [1, "icon-grid"], ["type", "button", 1, "icon-option", 3, "selected", "color", "title"], ["mjButton", "", "variant", "primary", 3, "click"], ["mjButton", "", 3, "click"], [1, "visibility-locked"], ["aria-hidden", "true", 1, "fa-solid", "fa-users"], ["id", "projectVisibilityHint", 1, "visibility-hint"], [1, "visibility-choice"], ["type", "radio", "name", "projectVisibility", 3, "
|
|
678
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ProjectFormModalComponent, selectors: [["mj-project-form-modal"]], inputs: { DialogRef: "DialogRef", dialogRef: "dialogRef", Project: "Project", project: "project", EnvironmentId: "EnvironmentId", environmentId: "environmentId", CurrentUser: "CurrentUser", currentUser: "currentUser", ParentId: "ParentId", parentId: "parentId" }, outputs: { ProjectSaved: "ProjectSaved", projectSaved: "projectSaved" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 43, vars: 19, consts: [[3, "Close", "Title", "Width", "MinWidth", "Visible"], [1, "project-form"], [1, "folder-preview"], [1, "folder-preview-chip"], [1, "folder-preview-name"], [1, "form-field"], ["for", "projectName", 1, "required"], ["id", "projectName", "type", "text", "placeholder", "e.g. Client work, Research, Ideas", "autofocus", "", 1, "mj-input", "full-width", 3, "ngModelChange", "keydown.enter", "ngModel"], [1, "error-message"], ["for", "projectDescription"], ["id", "projectDescription", "placeholder", "What goes in this folder? (optional)", "rows", "2", 1, "mj-textarea", "full-width", 3, "ngModelChange", "ngModel"], ["aria-describedby", "projectVisibilityHint", 1, "visibility-set"], [1, "color-picker-section"], [1, "color-palette"], ["type", "button", 1, "color-swatch", 3, "selected", "backgroundColor", "title"], [1, "custom-color-input"], ["for", "customColor"], ["id", "customColor", "type", "color", 1, "custom-color-picker", 3, "ngModelChange", "ngModel"], [1, "color-value"], [1, "icon-grid"], ["type", "button", 1, "icon-option", 3, "selected", "color", "title"], ["mjButton", "", "variant", "primary", 3, "click"], ["mjButton", "", 3, "click"], [1, "visibility-locked"], ["aria-hidden", "true", 1, "fa-solid", "fa-users"], ["id", "projectVisibilityHint", 1, "visibility-hint"], [1, "visibility-choice"], ["type", "radio", "name", "projectVisibility", "value", "Private", 3, "change", "checked"], ["type", "radio", "name", "projectVisibility", "value", "Shared", 3, "change", "checked"], ["type", "radio", "name", "projectVisibility", "value", "Public", 3, "change", "checked"], [1, "folder-acl-panel"], [1, "folder-acl-add"], ["type", "email", "placeholder", "Add person by email...", 1, "mj-input", "folder-acl-email", 3, "ngModelChange", "keydown.enter", "ngModel"], [1, "mj-select", "folder-acl-level", 3, "ngModelChange", "ngModel"], ["value", "View"], ["value", "Edit"], ["value", "Owner"], ["type", "button", "mjButton", "", "variant", "flat", 3, "click"], [1, "folder-acl-list"], [1, "folder-acl-row"], [1, "folder-acl-identity"], [1, "folder-acl-name"], [1, "folder-acl-sub"], [1, "folder-acl-actions"], ["type", "button", "title", "Remove access", 1, "folder-acl-remove", 3, "click"], [1, "fa-solid", "fa-times"], ["type", "button", 1, "color-swatch", 3, "click", "title"], ["type", "button", 1, "icon-option", 3, "click", "title"]], template: function ProjectFormModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
374
679
|
i0.ɵɵelementStart(0, "mj-dialog", 0);
|
|
375
680
|
i0.ɵɵlistener("Close", function ProjectFormModalComponent_Template_mj_dialog_Close_0_listener() { return ctx.onCancel(); });
|
|
376
681
|
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "span", 3);
|
|
@@ -395,7 +700,7 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
395
700
|
i0.ɵɵtwoWayListener("ngModelChange", function ProjectFormModalComponent_Template_textarea_ngModelChange_15_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.formData.description, $event) || (ctx.formData.description = $event); return $event; });
|
|
396
701
|
i0.ɵɵelementEnd()();
|
|
397
702
|
i0.ɵɵelementStart(16, "div", 5);
|
|
398
|
-
i0.ɵɵconditionalCreate(17, ProjectFormModalComponent_Conditional_17_Template, 8, 0, "fieldset", 11)(18, ProjectFormModalComponent_Conditional_18_Template,
|
|
703
|
+
i0.ɵɵconditionalCreate(17, ProjectFormModalComponent_Conditional_17_Template, 8, 0, "fieldset", 11)(18, ProjectFormModalComponent_Conditional_18_Template, 18, 5);
|
|
399
704
|
i0.ɵɵelementEnd();
|
|
400
705
|
i0.ɵɵelementStart(19, "div", 5)(20, "label");
|
|
401
706
|
i0.ɵɵtext(21, "Color");
|
|
@@ -452,7 +757,7 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
452
757
|
i0.ɵɵrepeater(ctx.availableIcons);
|
|
453
758
|
i0.ɵɵadvance(4);
|
|
454
759
|
i0.ɵɵtextInterpolate1(" ", ctx.isEditMode ? "Save Changes" : "Create Folder", " ");
|
|
455
|
-
} }, dependencies: [i1.DefaultValueAccessor, i1.
|
|
760
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.MJButtonDirective, i2.MJDialogComponent, i2.MJDialogActionsComponent], styles: [".project-form[_ngcontent-%COMP%] {\n padding: 20px 24px 8px;\n display: flex;\n flex-direction: column;\n gap: 22px;\n }\n\n \n .folder-preview[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n }\n .folder-preview-chip[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n flex-shrink: 0;\n transition: background-color 150ms ease, color 150ms ease;\n }\n .folder-preview-name[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .form-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n color: var(--mj-text-secondary);\n }\n\n .form-field[_ngcontent-%COMP%] label.required[_ngcontent-%COMP%]::after {\n content: '*';\n color: var(--mj-status-error);\n margin-left: 4px;\n }\n\n .full-width[_ngcontent-%COMP%] { width: 100%; }\n\n .error-message[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n font-size: 12px;\n }\n\n \n .visibility-set[_ngcontent-%COMP%] {\n border: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n }\n\n \n\n\n\n .visibility-set[_ngcontent-%COMP%] legend[_ngcontent-%COMP%] {\n padding: 0;\n margin-bottom: 0.15rem;\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n color: var(--mj-text-secondary);\n }\n\n \n\n\n\n .form-field[_ngcontent-%COMP%] .visibility-choice[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n cursor: pointer;\n font-weight: 400;\n font-size: 13px;\n margin: 0;\n \n\n padding: 0.25rem 0;\n }\n\n .visibility-choice[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n margin: 0;\n }\n\n \n\n\n\n .form-field[_ngcontent-%COMP%] .visibility-locked[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 0;\n padding: 0.25rem 0;\n font-weight: 400;\n font-size: 13px;\n color: var(--mj-text-primary);\n }\n\n .visibility-locked[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .visibility-hint[_ngcontent-%COMP%] {\n margin: 0.15rem 0 0;\n \n font-size: 12px;\n line-height: 1.4;\n color: var(--mj-text-muted);\n }\n\n .folder-acl-panel[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 6px;\n padding: 12px;\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface);\n }\n .folder-acl-add[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .folder-acl-email[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n }\n .folder-acl-level[_ngcontent-%COMP%] {\n width: 112px;\n }\n .folder-acl-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n border-top: 1px solid var(--mj-border-subtle);\n padding-top: 8px;\n gap: 6px;\n max-height: 160px;\n overflow-y: auto;\n }\n .folder-acl-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n padding: 4px 0;\n }\n .folder-acl-identity[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n flex: 1;\n }\n .folder-acl-name[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .folder-acl-sub[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n .folder-acl-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .folder-acl-remove[_ngcontent-%COMP%] {\n padding: 4px 6px;\n border: none;\n background: transparent;\n cursor: pointer;\n color: var(--mj-text-muted);\n border-radius: 4px;\n }\n .folder-acl-remove[_ngcontent-%COMP%]:hover {\n color: var(--mj-status-error);\n }\n\n .color-picker-section[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n padding: 14px;\n background: var(--mj-bg-surface);\n }\n\n .color-palette[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 8px;\n margin-bottom: 12px;\n }\n\n .color-swatch[_ngcontent-%COMP%] {\n width: 100%;\n aspect-ratio: 1;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n padding: 0;\n transition: transform 120ms ease, box-shadow 120ms ease;\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mj-text-primary) 8%, transparent);\n }\n\n .color-swatch[_ngcontent-%COMP%]:hover {\n transform: scale(1.12);\n }\n\n .color-swatch.selected[_ngcontent-%COMP%] {\n box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-brand-primary);\n }\n\n .custom-color-input[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding-top: 14px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n\n .custom-color-input[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n }\n\n .custom-color-picker[_ngcontent-%COMP%] {\n width: 44px;\n height: 30px;\n padding: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n }\n\n .color-value[_ngcontent-%COMP%] {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 13px;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n }\n\n \n .icon-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 8px;\n max-height: 184px;\n overflow-y: auto;\n padding: 14px;\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n background: var(--mj-bg-surface);\n }\n\n .icon-option[_ngcontent-%COMP%] {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;\n }\n\n .icon-option[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-strong);\n transform: translateY(-1px);\n }\n\n .icon-option.selected[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 1px var(--mj-brand-primary);\n }\n\n .icon-option[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 17px; }\n\n \n .icon-grid[_ngcontent-%COMP%]::-webkit-scrollbar { width: 8px; }\n .icon-grid[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: transparent;\n }\n .icon-grid[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: var(--mj-border-strong);\n border-radius: 4px;\n }\n .icon-grid[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-disabled);\n }"] });
|
|
456
761
|
}
|
|
457
762
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectFormModalComponent, [{
|
|
458
763
|
type: Component,
|
|
@@ -532,21 +837,82 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
532
837
|
<fieldset class="visibility-set" aria-describedby="projectVisibilityHint">
|
|
533
838
|
<legend>Visibility</legend>
|
|
534
839
|
<label class="visibility-choice">
|
|
535
|
-
<input type="radio" name="projectVisibility"
|
|
536
|
-
[
|
|
537
|
-
|
|
840
|
+
<input type="radio" name="projectVisibility" value="Private"
|
|
841
|
+
[checked]="VisibilityTier === 'Private'"
|
|
842
|
+
(change)="SelectVisibility('Private')" />
|
|
843
|
+
<span>Only me (Private)</span>
|
|
538
844
|
</label>
|
|
539
845
|
<label class="visibility-choice">
|
|
540
|
-
<input type="radio" name="projectVisibility"
|
|
541
|
-
[
|
|
542
|
-
|
|
846
|
+
<input type="radio" name="projectVisibility" value="Shared"
|
|
847
|
+
[checked]="VisibilityTier === 'Shared'"
|
|
848
|
+
(change)="SelectVisibility('Shared')" />
|
|
849
|
+
<span>Specific people & roles (Shared)</span>
|
|
850
|
+
</label>
|
|
851
|
+
<label class="visibility-choice">
|
|
852
|
+
<input type="radio" name="projectVisibility" value="Public"
|
|
853
|
+
[checked]="VisibilityTier === 'Public'"
|
|
854
|
+
(change)="SelectVisibility('Public')" />
|
|
855
|
+
<span>Everyone (Public)</span>
|
|
543
856
|
</label>
|
|
544
857
|
<p class="visibility-hint" id="projectVisibilityHint">
|
|
545
|
-
{{
|
|
546
|
-
? 'Only you can see this folder.'
|
|
547
|
-
: "Everyone can see this folder and its name. They will not see the conversations you keep in it. Once shared, a folder can't be made private again." }}
|
|
858
|
+
{{ VisibilityHint }}
|
|
548
859
|
</p>
|
|
549
860
|
</fieldset>
|
|
861
|
+
|
|
862
|
+
@if (VisibilityTier === 'Shared') {
|
|
863
|
+
<div class="folder-acl-panel">
|
|
864
|
+
<div class="folder-acl-add">
|
|
865
|
+
<input
|
|
866
|
+
type="email"
|
|
867
|
+
[(ngModel)]="NewShareEmail"
|
|
868
|
+
placeholder="Add person by email..."
|
|
869
|
+
class="mj-input folder-acl-email"
|
|
870
|
+
(keydown.enter)="$event.preventDefault(); OnAddFolderUser()" />
|
|
871
|
+
<select [(ngModel)]="NewShareLevel" class="mj-select folder-acl-level">
|
|
872
|
+
<option value="View">Can View</option>
|
|
873
|
+
<option value="Edit">Can Edit</option>
|
|
874
|
+
<option value="Owner">Owner</option>
|
|
875
|
+
</select>
|
|
876
|
+
<button type="button" mjButton variant="flat" (click)="OnAddFolderUser()">
|
|
877
|
+
Add
|
|
878
|
+
</button>
|
|
879
|
+
</div>
|
|
880
|
+
@if (ShareError) {
|
|
881
|
+
<div class="error-message">{{ ShareError }}</div>
|
|
882
|
+
}
|
|
883
|
+
@if (FolderPermissions.length > 0) {
|
|
884
|
+
<div class="folder-acl-list">
|
|
885
|
+
@for (perm of FolderPermissions; track perm) {
|
|
886
|
+
<div class="folder-acl-row">
|
|
887
|
+
<div class="folder-acl-identity">
|
|
888
|
+
<span class="folder-acl-name">{{ perm.userName || perm.roleName || perm.userEmail }}</span>
|
|
889
|
+
@if (perm.userEmail && perm.userName) {
|
|
890
|
+
<span class="folder-acl-sub">{{ perm.userEmail }}</span>
|
|
891
|
+
}
|
|
892
|
+
</div>
|
|
893
|
+
<div class="folder-acl-actions">
|
|
894
|
+
<select
|
|
895
|
+
[ngModel]="perm.permissionLevel"
|
|
896
|
+
(ngModelChange)="OnFolderPermissionLevelChange(perm, $event)"
|
|
897
|
+
class="mj-select folder-acl-level">
|
|
898
|
+
<option value="View">Can View</option>
|
|
899
|
+
<option value="Edit">Can Edit</option>
|
|
900
|
+
<option value="Owner">Owner</option>
|
|
901
|
+
</select>
|
|
902
|
+
<button
|
|
903
|
+
type="button"
|
|
904
|
+
class="folder-acl-remove"
|
|
905
|
+
(click)="OnRemoveFolderPermission(perm)"
|
|
906
|
+
title="Remove access">
|
|
907
|
+
<i class="fa-solid fa-times"></i>
|
|
908
|
+
</button>
|
|
909
|
+
</div>
|
|
910
|
+
</div>
|
|
911
|
+
}
|
|
912
|
+
</div>
|
|
913
|
+
}
|
|
914
|
+
</div>
|
|
915
|
+
}
|
|
550
916
|
}
|
|
551
917
|
</div>
|
|
552
918
|
|
|
@@ -604,7 +970,7 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
604
970
|
<button mjButton (click)="onCancel()">Cancel</button>
|
|
605
971
|
</mj-dialog-actions>
|
|
606
972
|
</mj-dialog>
|
|
607
|
-
`, styles: ["\n .project-form {\n padding: 20px 24px 8px;\n display: flex;\n flex-direction: column;\n gap: 22px;\n }\n\n /* Live preview chip */\n .folder-preview {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n }\n .folder-preview-chip {\n width: 40px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n flex-shrink: 0;\n transition: background-color 150ms ease, color 150ms ease;\n }\n .folder-preview-name {\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .form-field label {\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n color: var(--mj-text-secondary);\n }\n\n .form-field label.required::after {\n content: '*';\n color: var(--mj-status-error);\n margin-left: 4px;\n }\n\n .full-width { width: 100%; }\n\n .error-message {\n color: var(--mj-status-error);\n font-size: 12px;\n }\n\n /* Color Picker */\n .visibility-set {\n border: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n }\n\n /* A <legend> is not matched by the .form-field label rule, so it inherited 16px/400\n and read larger and lighter than every other field label. Restated here rather than\n widening that selector, which would also catch the option labels below.\n (No backticks in this block: it is a template literal.) */\n .visibility-set legend {\n padding: 0;\n margin-bottom: 0.15rem;\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n color: var(--mj-text-secondary);\n }\n\n /* Scoped as .form-field .visibility-choice (0,2,1) so it deliberately outranks the\n .form-field label rule (0,1,1) this sits inside \u2014 at equal specificity that rule\n won on source order and rendered the option text bold.\n (No backticks in here: this block is a template literal.) */\n .form-field .visibility-choice {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n cursor: pointer;\n font-weight: 400;\n font-size: 13px;\n margin: 0;\n /* The rows were the height of the radio alone (~16px). The checkbox this replaced\n sat in a 31px row, so the tap target got smaller when the control got clearer. */\n padding: 0.25rem 0;\n }\n\n .visibility-choice input {\n flex: 0 0 auto;\n margin: 0;\n }\n\n /* The shared-folder statement that stands in for the radios. Matches the option rows\n it replaces \u2014 same size, same weight, same 0.25rem row padding \u2014 so the dialog does\n not visibly reflow between a folder that offers the choice and one that does not.\n (No backticks in here: this block is a template literal.) */\n .form-field .visibility-locked {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 0;\n padding: 0.25rem 0;\n font-weight: 400;\n font-size: 13px;\n color: var(--mj-text-primary);\n }\n\n .visibility-locked i {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .visibility-hint {\n margin: 0.15rem 0 0;\n /* Unsized it inherited 16px and read LARGER than the options it describes. */\n font-size: 12px;\n line-height: 1.4;\n color: var(--mj-text-muted);\n }\n\n .color-picker-section {\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n padding: 14px;\n background: var(--mj-bg-surface);\n }\n\n .color-palette {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 8px;\n margin-bottom: 12px;\n }\n\n .color-swatch {\n width: 100%;\n aspect-ratio: 1;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n padding: 0;\n transition: transform 120ms ease, box-shadow 120ms ease;\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mj-text-primary) 8%, transparent);\n }\n\n .color-swatch:hover {\n transform: scale(1.12);\n }\n\n .color-swatch.selected {\n box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-brand-primary);\n }\n\n .custom-color-input {\n display: flex;\n align-items: center;\n gap: 10px;\n padding-top: 14px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n\n .custom-color-input label {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n }\n\n .custom-color-picker {\n width: 44px;\n height: 30px;\n padding: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n }\n\n .color-value {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 13px;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n }\n\n /* Icon Selector */\n .icon-grid {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 8px;\n max-height: 184px;\n overflow-y: auto;\n padding: 14px;\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n background: var(--mj-bg-surface);\n }\n\n .icon-option {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;\n }\n\n .icon-option:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-strong);\n transform: translateY(-1px);\n }\n\n .icon-option.selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 1px var(--mj-brand-primary);\n }\n\n .icon-option i { font-size: 17px; }\n\n /* Scrollbar */\n .icon-grid::-webkit-scrollbar { width: 8px; }\n .icon-grid::-webkit-scrollbar-track {\n background: transparent;\n }\n .icon-grid::-webkit-scrollbar-thumb {\n background: var(--mj-border-strong);\n border-radius: 4px;\n }\n .icon-grid::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-disabled);\n }\n "] }]
|
|
973
|
+
`, styles: ["\n .project-form {\n padding: 20px 24px 8px;\n display: flex;\n flex-direction: column;\n gap: 22px;\n }\n\n /* Live preview chip */\n .folder-preview {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n }\n .folder-preview-chip {\n width: 40px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n flex-shrink: 0;\n transition: background-color 150ms ease, color 150ms ease;\n }\n .folder-preview-name {\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .form-field label {\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n color: var(--mj-text-secondary);\n }\n\n .form-field label.required::after {\n content: '*';\n color: var(--mj-status-error);\n margin-left: 4px;\n }\n\n .full-width { width: 100%; }\n\n .error-message {\n color: var(--mj-status-error);\n font-size: 12px;\n }\n\n /* Color Picker */\n .visibility-set {\n border: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n }\n\n /* A <legend> is not matched by the .form-field label rule, so it inherited 16px/400\n and read larger and lighter than every other field label. Restated here rather than\n widening that selector, which would also catch the option labels below.\n (No backticks in this block: it is a template literal.) */\n .visibility-set legend {\n padding: 0;\n margin-bottom: 0.15rem;\n font-weight: 600;\n font-size: 13px;\n letter-spacing: 0.01em;\n color: var(--mj-text-secondary);\n }\n\n /* Scoped as .form-field .visibility-choice (0,2,1) so it deliberately outranks the\n .form-field label rule (0,1,1) this sits inside \u2014 at equal specificity that rule\n won on source order and rendered the option text bold.\n (No backticks in here: this block is a template literal.) */\n .form-field .visibility-choice {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n cursor: pointer;\n font-weight: 400;\n font-size: 13px;\n margin: 0;\n /* The rows were the height of the radio alone (~16px). The checkbox this replaced\n sat in a 31px row, so the tap target got smaller when the control got clearer. */\n padding: 0.25rem 0;\n }\n\n .visibility-choice input {\n flex: 0 0 auto;\n margin: 0;\n }\n\n /* The shared-folder statement that stands in for the radios. Matches the option rows\n it replaces \u2014 same size, same weight, same 0.25rem row padding \u2014 so the dialog does\n not visibly reflow between a folder that offers the choice and one that does not.\n (No backticks in here: this block is a template literal.) */\n .form-field .visibility-locked {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 0;\n padding: 0.25rem 0;\n font-weight: 400;\n font-size: 13px;\n color: var(--mj-text-primary);\n }\n\n .visibility-locked i {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .visibility-hint {\n margin: 0.15rem 0 0;\n /* Unsized it inherited 16px and read LARGER than the options it describes. */\n font-size: 12px;\n line-height: 1.4;\n color: var(--mj-text-muted);\n }\n\n .folder-acl-panel {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 6px;\n padding: 12px;\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface);\n }\n .folder-acl-add {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .folder-acl-email {\n flex: 1;\n min-width: 0;\n }\n .folder-acl-level {\n width: 112px;\n }\n .folder-acl-list {\n display: flex;\n flex-direction: column;\n border-top: 1px solid var(--mj-border-subtle);\n padding-top: 8px;\n gap: 6px;\n max-height: 160px;\n overflow-y: auto;\n }\n .folder-acl-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n padding: 4px 0;\n }\n .folder-acl-identity {\n display: flex;\n flex-direction: column;\n min-width: 0;\n flex: 1;\n }\n .folder-acl-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .folder-acl-sub {\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n .folder-acl-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .folder-acl-remove {\n padding: 4px 6px;\n border: none;\n background: transparent;\n cursor: pointer;\n color: var(--mj-text-muted);\n border-radius: 4px;\n }\n .folder-acl-remove:hover {\n color: var(--mj-status-error);\n }\n\n .color-picker-section {\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n padding: 14px;\n background: var(--mj-bg-surface);\n }\n\n .color-palette {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 8px;\n margin-bottom: 12px;\n }\n\n .color-swatch {\n width: 100%;\n aspect-ratio: 1;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n padding: 0;\n transition: transform 120ms ease, box-shadow 120ms ease;\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mj-text-primary) 8%, transparent);\n }\n\n .color-swatch:hover {\n transform: scale(1.12);\n }\n\n .color-swatch.selected {\n box-shadow: 0 0 0 2px var(--mj-bg-surface), 0 0 0 4px var(--mj-brand-primary);\n }\n\n .custom-color-input {\n display: flex;\n align-items: center;\n gap: 10px;\n padding-top: 14px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n\n .custom-color-input label {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n }\n\n .custom-color-picker {\n width: 44px;\n height: 30px;\n padding: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n }\n\n .color-value {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 13px;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n }\n\n /* Icon Selector */\n .icon-grid {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n gap: 8px;\n max-height: 184px;\n overflow-y: auto;\n padding: 14px;\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n background: var(--mj-bg-surface);\n }\n\n .icon-option {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;\n }\n\n .icon-option:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-strong);\n transform: translateY(-1px);\n }\n\n .icon-option.selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 1px var(--mj-brand-primary);\n }\n\n .icon-option i { font-size: 17px; }\n\n /* Scrollbar */\n .icon-grid::-webkit-scrollbar { width: 8px; }\n .icon-grid::-webkit-scrollbar-track {\n background: transparent;\n }\n .icon-grid::-webkit-scrollbar-thumb {\n background: var(--mj-border-strong);\n border-radius: 4px;\n }\n .icon-grid::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-disabled);\n }\n "] }]
|
|
608
974
|
}], () => [{ type: i0.ChangeDetectorRef }], { DialogRef: [{
|
|
609
975
|
type: Input
|
|
610
976
|
}], dialogRef: [{
|
|
@@ -630,5 +996,5 @@ export class ProjectFormModalComponent extends BaseAngularComponent {
|
|
|
630
996
|
}], projectSaved: [{
|
|
631
997
|
type: Output
|
|
632
998
|
}] }); })();
|
|
633
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProjectFormModalComponent, { className: "ProjectFormModalComponent", filePath: "src/lib/components/project/project-form-modal.component.ts", lineNumber:
|
|
999
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProjectFormModalComponent, { className: "ProjectFormModalComponent", filePath: "src/lib/components/project/project-form-modal.component.ts", lineNumber: 625 }); })();
|
|
634
1000
|
//# sourceMappingURL=project-form-modal.component.js.map
|