@memberjunction/ng-resource-permissions 5.43.0 → 5.44.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/resource-share-dialog.component.d.ts +2 -0
- package/dist/lib/resource-share-dialog.component.d.ts.map +1 -1
- package/dist/lib/resource-share-dialog.component.js +46 -51
- package/dist/lib/resource-share-dialog.component.js.map +1 -1
- package/dist/lib/user-sharing-center.component.d.ts +5 -1
- package/dist/lib/user-sharing-center.component.d.ts.map +1 -1
- package/dist/lib/user-sharing-center.component.js +130 -129
- package/dist/lib/user-sharing-center.component.js.map +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +10 -4
- package/dist/module.js.map +1 -1
- package/package.json +12 -10
- package/dist/__tests__/exports.test.d.ts +0 -2
- package/dist/__tests__/exports.test.d.ts.map +0 -1
- package/dist/__tests__/exports.test.js +0 -17
- package/dist/__tests__/exports.test.js.map +0 -1
- package/dist/__tests__/index.test.d.ts +0 -2
- package/dist/__tests__/index.test.d.ts.map +0 -1
- package/dist/__tests__/index.test.js +0 -7
- package/dist/__tests__/index.test.js.map +0 -1
|
@@ -2,64 +2,81 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { CompositeKey, LogError, } from '@memberjunction/core';
|
|
4
4
|
import { PermissionEngine } from '@memberjunction/core-entities';
|
|
5
|
-
import { MJDialogService } from '@memberjunction/ng-ui-components';
|
|
5
|
+
import { MJAccordionModule, MJDialogService, MJEmptyStateComponent } from '@memberjunction/ng-ui-components';
|
|
6
6
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@
|
|
8
|
+
import * as i1 from "@memberjunction/ng-ui-components";
|
|
9
|
+
import * as i2 from "@angular/common";
|
|
9
10
|
function UserSharingCenterComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
10
11
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11
|
-
i0.ɵɵ
|
|
12
|
-
i0.ɵɵ
|
|
13
|
-
i0.ɵɵ
|
|
14
|
-
i0.ɵɵ
|
|
12
|
+
i0.ɵɵelementStart(0, "button", 8);
|
|
13
|
+
i0.ɵɵlistener("click", function UserSharingCenterComponent_Conditional_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnClose()); });
|
|
14
|
+
i0.ɵɵelement(1, "i", 9);
|
|
15
|
+
i0.ɵɵelementEnd();
|
|
15
16
|
} }
|
|
16
17
|
function UserSharingCenterComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
-
i0.ɵɵ
|
|
18
|
-
i0.ɵɵ
|
|
18
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
19
|
+
i0.ɵɵelement(1, "i", 10);
|
|
19
20
|
i0.ɵɵtext(2);
|
|
20
|
-
i0.ɵɵ
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
21
22
|
} if (rf & 2) {
|
|
22
23
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23
24
|
i0.ɵɵadvance(2);
|
|
24
25
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.ErrorMessage, " ");
|
|
25
26
|
} }
|
|
26
27
|
function UserSharingCenterComponent_Conditional_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
-
i0.ɵɵ
|
|
28
|
-
i0.ɵɵ
|
|
28
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
29
|
+
i0.ɵɵelement(1, "i", 13);
|
|
29
30
|
i0.ɵɵtext(2, " Loading\u2026 ");
|
|
30
|
-
i0.ɵɵ
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
31
32
|
} }
|
|
32
33
|
function UserSharingCenterComponent_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
-
i0.ɵɵ
|
|
34
|
-
i0.ɵɵdomElement(1, "i", 3);
|
|
35
|
-
i0.ɵɵtext(2, " Nothing has been shared directly with you yet. ");
|
|
36
|
-
i0.ɵɵdomElementEnd();
|
|
34
|
+
i0.ɵɵelement(0, "mj-empty-state", 12);
|
|
37
35
|
} }
|
|
38
|
-
function
|
|
39
|
-
i0.ɵɵ
|
|
36
|
+
function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
+
i0.ɵɵelementStart(0, "span", 18);
|
|
38
|
+
i0.ɵɵelement(1, "i");
|
|
39
|
+
i0.ɵɵelementEnd();
|
|
40
|
+
i0.ɵɵelementStart(2, "span", 19);
|
|
41
|
+
i0.ɵɵtext(3);
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
i0.ɵɵelementStart(4, "span", 20);
|
|
44
|
+
i0.ɵɵtext(5);
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const group_r4 = i0.ɵɵnextContext().$implicit;
|
|
48
|
+
i0.ɵɵadvance();
|
|
49
|
+
i0.ɵɵclassMap(group_r4.Icon);
|
|
50
|
+
i0.ɵɵadvance(2);
|
|
51
|
+
i0.ɵɵtextInterpolate(group_r4.DomainName);
|
|
52
|
+
i0.ɵɵadvance(2);
|
|
53
|
+
i0.ɵɵtextInterpolate(group_r4.Rows.length);
|
|
54
|
+
} }
|
|
55
|
+
function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
56
|
+
i0.ɵɵelementStart(0, "span", 27);
|
|
40
57
|
i0.ɵɵtext(1);
|
|
41
58
|
i0.ɵɵpipe(2, "date");
|
|
42
|
-
i0.ɵɵ
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
43
60
|
} if (rf & 2) {
|
|
44
61
|
const row_r6 = i0.ɵɵnextContext().$implicit;
|
|
45
62
|
i0.ɵɵadvance();
|
|
46
63
|
i0.ɵɵtextInterpolate1("expires ", i0.ɵɵpipeBind2(2, 1, row_r6.ExpiresAt, "mediumDate"));
|
|
47
64
|
} }
|
|
48
|
-
function
|
|
65
|
+
function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
49
66
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
50
|
-
i0.ɵɵ
|
|
51
|
-
i0.ɵɵ
|
|
52
|
-
i0.ɵɵ
|
|
67
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
68
|
+
i0.ɵɵlistener("click", function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_For_2_Template_button_click_0_listener() { const row_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.OnRowClick(row_r6)); });
|
|
69
|
+
i0.ɵɵelementStart(1, "span", 24);
|
|
53
70
|
i0.ɵɵtext(2);
|
|
54
|
-
i0.ɵɵ
|
|
55
|
-
i0.ɵɵ
|
|
71
|
+
i0.ɵɵelementEnd();
|
|
72
|
+
i0.ɵɵelementStart(3, "span", 25);
|
|
56
73
|
i0.ɵɵtext(4);
|
|
57
|
-
i0.ɵɵ
|
|
58
|
-
i0.ɵɵ
|
|
74
|
+
i0.ɵɵelementEnd();
|
|
75
|
+
i0.ɵɵelementStart(5, "span", 26);
|
|
59
76
|
i0.ɵɵtext(6);
|
|
60
|
-
i0.ɵɵ
|
|
61
|
-
i0.ɵɵconditionalCreate(7,
|
|
62
|
-
i0.ɵɵ
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
i0.ɵɵconditionalCreate(7, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_For_2_Conditional_7_Template, 3, 4, "span", 27);
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
63
80
|
} if (rf & 2) {
|
|
64
81
|
const row_r6 = ctx.$implicit;
|
|
65
82
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
@@ -72,10 +89,10 @@ function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Condition
|
|
|
72
89
|
i0.ɵɵadvance();
|
|
73
90
|
i0.ɵɵconditional(row_r6.ExpiresAt ? 7 : -1);
|
|
74
91
|
} }
|
|
75
|
-
function
|
|
76
|
-
i0.ɵɵ
|
|
77
|
-
i0.ɵɵrepeaterCreate(1,
|
|
78
|
-
i0.ɵɵ
|
|
92
|
+
function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
93
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
94
|
+
i0.ɵɵrepeaterCreate(1, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_For_2_Template, 8, 4, "button", 22, i0.ɵɵcomponentInstance().TrackByRow, true);
|
|
95
|
+
i0.ɵɵelementEnd();
|
|
79
96
|
} if (rf & 2) {
|
|
80
97
|
const group_r4 = i0.ɵɵnextContext().$implicit;
|
|
81
98
|
i0.ɵɵadvance();
|
|
@@ -83,86 +100,84 @@ function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Condition
|
|
|
83
100
|
} }
|
|
84
101
|
function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
85
102
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
86
|
-
i0.ɵɵ
|
|
87
|
-
i0.ɵɵ
|
|
88
|
-
i0.ɵɵ
|
|
89
|
-
i0.ɵɵ
|
|
90
|
-
i0.ɵɵtext(4);
|
|
91
|
-
i0.ɵɵdomElementEnd();
|
|
92
|
-
i0.ɵɵdomElementStart(5, "span", 17);
|
|
93
|
-
i0.ɵɵtext(6);
|
|
94
|
-
i0.ɵɵdomElementEnd();
|
|
95
|
-
i0.ɵɵdomElement(7, "i", 18);
|
|
96
|
-
i0.ɵɵdomElementEnd();
|
|
97
|
-
i0.ɵɵconditionalCreate(8, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Conditional_8_Template, 3, 0, "div", 19);
|
|
98
|
-
i0.ɵɵdomElementEnd();
|
|
103
|
+
i0.ɵɵelementStart(0, "mj-accordion-panel", 15);
|
|
104
|
+
i0.ɵɵlistener("ExpandedChange", function UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { const group_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnGroupExpandedChange(group_r4, $event)); });
|
|
105
|
+
i0.ɵɵtemplate(1, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_1_Template, 6, 4, "ng-template", 16)(2, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_ng_template_2_Template, 3, 0, "ng-template", 17);
|
|
106
|
+
i0.ɵɵelementEnd();
|
|
99
107
|
} if (rf & 2) {
|
|
100
108
|
const group_r4 = ctx.$implicit;
|
|
101
|
-
i0.ɵɵ
|
|
102
|
-
i0.ɵɵclassMap(group_r4.Icon);
|
|
103
|
-
i0.ɵɵadvance(2);
|
|
104
|
-
i0.ɵɵtextInterpolate(group_r4.DomainName);
|
|
105
|
-
i0.ɵɵadvance(2);
|
|
106
|
-
i0.ɵɵtextInterpolate(group_r4.Rows.length);
|
|
107
|
-
i0.ɵɵadvance();
|
|
108
|
-
i0.ɵɵclassProp("fa-chevron-down", group_r4.Expanded)("fa-chevron-right", !group_r4.Expanded);
|
|
109
|
-
i0.ɵɵadvance();
|
|
110
|
-
i0.ɵɵconditional(group_r4.Expanded ? 8 : -1);
|
|
109
|
+
i0.ɵɵproperty("FlushBody", true)("Expanded", group_r4.Expanded);
|
|
111
110
|
} }
|
|
112
111
|
function UserSharingCenterComponent_Conditional_11_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
113
|
-
i0.ɵɵrepeaterCreate(0, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Template,
|
|
112
|
+
i0.ɵɵrepeaterCreate(0, UserSharingCenterComponent_Conditional_11_Conditional_2_For_1_Template, 3, 2, "mj-accordion-panel", 14, i0.ɵɵcomponentInstance().TrackByDomain, true);
|
|
114
113
|
} if (rf & 2) {
|
|
115
114
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
116
115
|
i0.ɵɵrepeater(ctx_r1.SharedWithMe);
|
|
117
116
|
} }
|
|
118
117
|
function UserSharingCenterComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
119
|
-
i0.ɵɵconditionalCreate(0, UserSharingCenterComponent_Conditional_11_Conditional_0_Template, 3, 0, "div", 11)(1, UserSharingCenterComponent_Conditional_11_Conditional_1_Template,
|
|
118
|
+
i0.ɵɵconditionalCreate(0, UserSharingCenterComponent_Conditional_11_Conditional_0_Template, 3, 0, "div", 11)(1, UserSharingCenterComponent_Conditional_11_Conditional_1_Template, 1, 0, "mj-empty-state", 12)(2, UserSharingCenterComponent_Conditional_11_Conditional_2_Template, 2, 0);
|
|
120
119
|
} if (rf & 2) {
|
|
121
120
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
122
121
|
i0.ɵɵconditional(ctx_r1.IsLoadingWithMe ? 0 : ctx_r1.SharedWithMe.length === 0 ? 1 : 2);
|
|
123
122
|
} }
|
|
124
123
|
function UserSharingCenterComponent_Conditional_12_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
125
|
-
i0.ɵɵ
|
|
126
|
-
i0.ɵɵ
|
|
124
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
125
|
+
i0.ɵɵelement(1, "i", 13);
|
|
127
126
|
i0.ɵɵtext(2, " Loading\u2026 ");
|
|
128
|
-
i0.ɵɵ
|
|
127
|
+
i0.ɵɵelementEnd();
|
|
129
128
|
} }
|
|
130
129
|
function UserSharingCenterComponent_Conditional_12_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
131
|
-
i0.ɵɵ
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
i0.ɵɵ
|
|
130
|
+
i0.ɵɵelement(0, "mj-empty-state", 28);
|
|
131
|
+
} }
|
|
132
|
+
function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
133
|
+
i0.ɵɵelementStart(0, "span", 18);
|
|
134
|
+
i0.ɵɵelement(1, "i");
|
|
135
|
+
i0.ɵɵelementEnd();
|
|
136
|
+
i0.ɵɵelementStart(2, "span", 19);
|
|
137
|
+
i0.ɵɵtext(3);
|
|
138
|
+
i0.ɵɵelementEnd();
|
|
139
|
+
i0.ɵɵelementStart(4, "span", 20);
|
|
140
|
+
i0.ɵɵtext(5);
|
|
141
|
+
i0.ɵɵelementEnd();
|
|
142
|
+
} if (rf & 2) {
|
|
143
|
+
const group_r8 = i0.ɵɵnextContext().$implicit;
|
|
144
|
+
i0.ɵɵadvance();
|
|
145
|
+
i0.ɵɵclassMap(group_r8.Icon);
|
|
146
|
+
i0.ɵɵadvance(2);
|
|
147
|
+
i0.ɵɵtextInterpolate(group_r8.DomainName);
|
|
148
|
+
i0.ɵɵadvance(2);
|
|
149
|
+
i0.ɵɵtextInterpolate(group_r8.Rows.length);
|
|
135
150
|
} }
|
|
136
|
-
function
|
|
137
|
-
i0.ɵɵ
|
|
151
|
+
function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
+
i0.ɵɵelementStart(0, "span", 27);
|
|
138
153
|
i0.ɵɵtext(1);
|
|
139
154
|
i0.ɵɵpipe(2, "date");
|
|
140
|
-
i0.ɵɵ
|
|
155
|
+
i0.ɵɵelementEnd();
|
|
141
156
|
} if (rf & 2) {
|
|
142
157
|
const row_r10 = i0.ɵɵnextContext().$implicit;
|
|
143
158
|
i0.ɵɵadvance();
|
|
144
159
|
i0.ɵɵtextInterpolate1("expires ", i0.ɵɵpipeBind2(2, 1, row_r10.ExpiresAt, "mediumDate"));
|
|
145
160
|
} }
|
|
146
|
-
function
|
|
161
|
+
function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
147
162
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
148
|
-
i0.ɵɵ
|
|
163
|
+
i0.ɵɵelementStart(0, "div", 29)(1, "span", 24);
|
|
149
164
|
i0.ɵɵtext(2);
|
|
150
|
-
i0.ɵɵ
|
|
151
|
-
i0.ɵɵ
|
|
165
|
+
i0.ɵɵelementEnd();
|
|
166
|
+
i0.ɵɵelementStart(3, "span", 25);
|
|
152
167
|
i0.ɵɵtext(4);
|
|
153
|
-
i0.ɵɵ
|
|
154
|
-
i0.ɵɵ
|
|
155
|
-
i0.ɵɵ
|
|
168
|
+
i0.ɵɵelementEnd();
|
|
169
|
+
i0.ɵɵelementStart(5, "span", 30);
|
|
170
|
+
i0.ɵɵelement(6, "i", 31);
|
|
156
171
|
i0.ɵɵtext(7);
|
|
157
|
-
i0.ɵɵ
|
|
158
|
-
i0.ɵɵ
|
|
172
|
+
i0.ɵɵelementEnd();
|
|
173
|
+
i0.ɵɵelementStart(8, "span", 26);
|
|
159
174
|
i0.ɵɵtext(9);
|
|
160
|
-
i0.ɵɵ
|
|
161
|
-
i0.ɵɵconditionalCreate(10,
|
|
162
|
-
i0.ɵɵ
|
|
163
|
-
i0.ɵɵ
|
|
164
|
-
i0.ɵɵ
|
|
165
|
-
i0.ɵɵ
|
|
175
|
+
i0.ɵɵelementEnd();
|
|
176
|
+
i0.ɵɵconditionalCreate(10, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_For_2_Conditional_10_Template, 3, 4, "span", 27);
|
|
177
|
+
i0.ɵɵelementStart(11, "button", 32);
|
|
178
|
+
i0.ɵɵlistener("click", function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_For_2_Template_button_click_11_listener($event) { const row_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.OnRevoke(row_r10, $event)); });
|
|
179
|
+
i0.ɵɵelement(12, "i", 33);
|
|
180
|
+
i0.ɵɵelementEnd()();
|
|
166
181
|
} if (rf & 2) {
|
|
167
182
|
const row_r10 = ctx.$implicit;
|
|
168
183
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
@@ -177,10 +192,10 @@ function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Condition
|
|
|
177
192
|
i0.ɵɵadvance();
|
|
178
193
|
i0.ɵɵconditional(row_r10.ExpiresAt ? 10 : -1);
|
|
179
194
|
} }
|
|
180
|
-
function
|
|
181
|
-
i0.ɵɵ
|
|
182
|
-
i0.ɵɵrepeaterCreate(1,
|
|
183
|
-
i0.ɵɵ
|
|
195
|
+
function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
196
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
197
|
+
i0.ɵɵrepeaterCreate(1, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_For_2_Template, 13, 5, "div", 29, i0.ɵɵcomponentInstance().TrackByRow, true);
|
|
198
|
+
i0.ɵɵelementEnd();
|
|
184
199
|
} if (rf & 2) {
|
|
185
200
|
const group_r8 = i0.ɵɵnextContext().$implicit;
|
|
186
201
|
i0.ɵɵadvance();
|
|
@@ -188,40 +203,22 @@ function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Condition
|
|
|
188
203
|
} }
|
|
189
204
|
function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
190
205
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
191
|
-
i0.ɵɵ
|
|
192
|
-
i0.ɵɵ
|
|
193
|
-
i0.ɵɵ
|
|
194
|
-
i0.ɵɵ
|
|
195
|
-
i0.ɵɵtext(4);
|
|
196
|
-
i0.ɵɵdomElementEnd();
|
|
197
|
-
i0.ɵɵdomElementStart(5, "span", 17);
|
|
198
|
-
i0.ɵɵtext(6);
|
|
199
|
-
i0.ɵɵdomElementEnd();
|
|
200
|
-
i0.ɵɵdomElement(7, "i", 18);
|
|
201
|
-
i0.ɵɵdomElementEnd();
|
|
202
|
-
i0.ɵɵconditionalCreate(8, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Conditional_8_Template, 3, 0, "div", 19);
|
|
203
|
-
i0.ɵɵdomElementEnd();
|
|
206
|
+
i0.ɵɵelementStart(0, "mj-accordion-panel", 15);
|
|
207
|
+
i0.ɵɵlistener("ExpandedChange", function UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { const group_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnGroupExpandedChange(group_r8, $event)); });
|
|
208
|
+
i0.ɵɵtemplate(1, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_1_Template, 6, 4, "ng-template", 16)(2, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_ng_template_2_Template, 3, 0, "ng-template", 17);
|
|
209
|
+
i0.ɵɵelementEnd();
|
|
204
210
|
} if (rf & 2) {
|
|
205
211
|
const group_r8 = ctx.$implicit;
|
|
206
|
-
i0.ɵɵ
|
|
207
|
-
i0.ɵɵclassMap(group_r8.Icon);
|
|
208
|
-
i0.ɵɵadvance(2);
|
|
209
|
-
i0.ɵɵtextInterpolate(group_r8.DomainName);
|
|
210
|
-
i0.ɵɵadvance(2);
|
|
211
|
-
i0.ɵɵtextInterpolate(group_r8.Rows.length);
|
|
212
|
-
i0.ɵɵadvance();
|
|
213
|
-
i0.ɵɵclassProp("fa-chevron-down", group_r8.Expanded)("fa-chevron-right", !group_r8.Expanded);
|
|
214
|
-
i0.ɵɵadvance();
|
|
215
|
-
i0.ɵɵconditional(group_r8.Expanded ? 8 : -1);
|
|
212
|
+
i0.ɵɵproperty("FlushBody", true)("Expanded", group_r8.Expanded);
|
|
216
213
|
} }
|
|
217
214
|
function UserSharingCenterComponent_Conditional_12_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
-
i0.ɵɵrepeaterCreate(0, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Template,
|
|
215
|
+
i0.ɵɵrepeaterCreate(0, UserSharingCenterComponent_Conditional_12_Conditional_2_For_1_Template, 3, 2, "mj-accordion-panel", 14, i0.ɵɵcomponentInstance().TrackByDomain, true);
|
|
219
216
|
} if (rf & 2) {
|
|
220
217
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
221
218
|
i0.ɵɵrepeater(ctx_r1.SharedByMe);
|
|
222
219
|
} }
|
|
223
220
|
function UserSharingCenterComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
224
|
-
i0.ɵɵconditionalCreate(0, UserSharingCenterComponent_Conditional_12_Conditional_0_Template, 3, 0, "div", 11)(1, UserSharingCenterComponent_Conditional_12_Conditional_1_Template,
|
|
221
|
+
i0.ɵɵconditionalCreate(0, UserSharingCenterComponent_Conditional_12_Conditional_0_Template, 3, 0, "div", 11)(1, UserSharingCenterComponent_Conditional_12_Conditional_1_Template, 1, 0, "mj-empty-state", 28)(2, UserSharingCenterComponent_Conditional_12_Conditional_2_Template, 2, 0);
|
|
225
222
|
} if (rf & 2) {
|
|
226
223
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
227
224
|
i0.ɵɵconditional(ctx_r1.IsLoadingByMe ? 0 : ctx_r1.SharedByMe.length === 0 ? 1 : 2);
|
|
@@ -375,8 +372,12 @@ export class UserSharingCenterComponent extends BaseAngularComponent {
|
|
|
375
372
|
this.setError(`Revoke failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
376
373
|
}
|
|
377
374
|
}
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
/**
|
|
376
|
+
* Apply the expand/collapse state emitted by the accordion panel for a domain
|
|
377
|
+
* group. OnPush, so an explicit detectChanges() is required to reflect the change.
|
|
378
|
+
*/
|
|
379
|
+
OnGroupExpandedChange(group, expanded) {
|
|
380
|
+
group.Expanded = expanded;
|
|
380
381
|
this.cdr.detectChanges();
|
|
381
382
|
}
|
|
382
383
|
ActionsLabel(actions) {
|
|
@@ -481,23 +482,23 @@ export class UserSharingCenterComponent extends BaseAngularComponent {
|
|
|
481
482
|
});
|
|
482
483
|
}
|
|
483
484
|
static ɵfac = /*@__PURE__*/ (() => { let ɵUserSharingCenterComponent_BaseFactory; return function UserSharingCenterComponent_Factory(__ngFactoryType__) { return (ɵUserSharingCenterComponent_BaseFactory || (ɵUserSharingCenterComponent_BaseFactory = i0.ɵɵgetInheritedFactory(UserSharingCenterComponent)))(__ngFactoryType__ || UserSharingCenterComponent); }; })();
|
|
484
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserSharingCenterComponent, selectors: [["mj-user-sharing-center"]], inputs: { ActiveTab: "ActiveTab", ShowCloseButton: "ShowCloseButton", RevokeConfirmTitle: "RevokeConfirmTitle", SharingEntityResolver: "SharingEntityResolver" }, outputs: { ActiveTabChange: "ActiveTabChange", ResourceClicked: "ResourceClicked", CloseRequested: "CloseRequested", PermissionRevoked: "PermissionRevoked", ErrorOccurred: "ErrorOccurred" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 7, consts: [[1, "user-sharing-center"], [1, "tabs"], [1, "tab", 3, "click"], [1, "fa-solid", "fa-inbox"], [1, "fa-solid", "fa-paper-plane"], [1, "spacer"], ["title", "Close", 1, "close"], [1, "error"], ["title", "Close", 1, "close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "loading"], [1, "empty"], [1, "fa-solid", "fa-spinner", "fa-spin"], [
|
|
485
|
-
i0.ɵɵ
|
|
486
|
-
i0.ɵɵ
|
|
487
|
-
i0.ɵɵ
|
|
485
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserSharingCenterComponent, selectors: [["mj-user-sharing-center"]], inputs: { ActiveTab: "ActiveTab", ShowCloseButton: "ShowCloseButton", RevokeConfirmTitle: "RevokeConfirmTitle", SharingEntityResolver: "SharingEntityResolver" }, outputs: { ActiveTabChange: "ActiveTabChange", ResourceClicked: "ResourceClicked", CloseRequested: "CloseRequested", PermissionRevoked: "PermissionRevoked", ErrorOccurred: "ErrorOccurred" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 7, consts: [[1, "user-sharing-center"], [1, "tabs"], [1, "tab", 3, "click"], [1, "fa-solid", "fa-inbox"], [1, "fa-solid", "fa-paper-plane"], [1, "spacer"], ["title", "Close", 1, "close"], [1, "error"], ["title", "Close", 1, "close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "loading"], ["Size", "compact", "Icon", "fa-solid fa-inbox", "Title", "Nothing has been shared directly with you yet.", 1, "empty"], [1, "fa-solid", "fa-spinner", "fa-spin"], ["Size", "sm", 3, "FlushBody", "Expanded"], ["Size", "sm", 3, "ExpandedChange", "FlushBody", "Expanded"], ["mjAccordionTitle", ""], ["mjAccordionBody", ""], [1, "group-icon"], [1, "group-name"], [1, "mj-accordion-badge", "mj-accordion-badge--right"], [1, "rows"], [1, "row"], [1, "row", 3, "click"], [1, "resource"], [1, "resource-type"], [1, "actions"], [1, "expires"], ["Size", "compact", "Icon", "fa-solid fa-paper-plane", "Title", "You haven't shared anything with others yet.", 1, "empty"], [1, "row", "editable"], [1, "grantee"], [1, "fa-solid", "fa-user"], ["title", "Revoke access", 1, "revoke", 3, "click"], [1, "fa-solid", "fa-trash"]], template: function UserSharingCenterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
486
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "button", 2);
|
|
487
|
+
i0.ɵɵlistener("click", function UserSharingCenterComponent_Template_button_click_2_listener() { return ctx.OnTabClick("shared-with-me"); });
|
|
488
|
+
i0.ɵɵelement(3, "i", 3);
|
|
488
489
|
i0.ɵɵtext(4, " Shared with me ");
|
|
489
|
-
i0.ɵɵ
|
|
490
|
-
i0.ɵɵ
|
|
491
|
-
i0.ɵɵ
|
|
492
|
-
i0.ɵɵ
|
|
490
|
+
i0.ɵɵelementEnd();
|
|
491
|
+
i0.ɵɵelementStart(5, "button", 2);
|
|
492
|
+
i0.ɵɵlistener("click", function UserSharingCenterComponent_Template_button_click_5_listener() { return ctx.OnTabClick("shared-by-me"); });
|
|
493
|
+
i0.ɵɵelement(6, "i", 4);
|
|
493
494
|
i0.ɵɵtext(7, " Shared by me ");
|
|
494
|
-
i0.ɵɵ
|
|
495
|
-
i0.ɵɵ
|
|
495
|
+
i0.ɵɵelementEnd();
|
|
496
|
+
i0.ɵɵelement(8, "div", 5);
|
|
496
497
|
i0.ɵɵconditionalCreate(9, UserSharingCenterComponent_Conditional_9_Template, 2, 0, "button", 6);
|
|
497
|
-
i0.ɵɵ
|
|
498
|
+
i0.ɵɵelementEnd();
|
|
498
499
|
i0.ɵɵconditionalCreate(10, UserSharingCenterComponent_Conditional_10_Template, 3, 1, "div", 7);
|
|
499
500
|
i0.ɵɵconditionalCreate(11, UserSharingCenterComponent_Conditional_11_Template, 3, 1)(12, UserSharingCenterComponent_Conditional_12_Template, 3, 1);
|
|
500
|
-
i0.ɵɵ
|
|
501
|
+
i0.ɵɵelementEnd();
|
|
501
502
|
} if (rf & 2) {
|
|
502
503
|
i0.ɵɵadvance(2);
|
|
503
504
|
i0.ɵɵclassProp("active", ctx.ActiveTab === "shared-with-me");
|
|
@@ -509,11 +510,11 @@ export class UserSharingCenterComponent extends BaseAngularComponent {
|
|
|
509
510
|
i0.ɵɵconditional(ctx.ErrorMessage ? 10 : -1);
|
|
510
511
|
i0.ɵɵadvance();
|
|
511
512
|
i0.ɵɵconditional(ctx.ActiveTab === "shared-with-me" ? 11 : 12);
|
|
512
|
-
} }, dependencies: [CommonModule, i1.DatePipe], styles: [".user-sharing-center[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-width: 480px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.tabs[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.tabs[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n}\n\n.tabs[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.tabs[_ngcontent-%COMP%] .tab.active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.tabs[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.tabs[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] {\n border: none;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 28px;\n height: 28px;\n border-radius: 4px;\n font-size: 16px;\n}\n\n.tabs[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.loading[_ngcontent-%COMP%], \n.empty[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 16px;\n gap: 12px;\n color: var(--mj-text-muted);\n font-size: 14px;\n}\n\n.loading[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 28px;\n}\n\n.error[_ngcontent-%COMP%] {\n margin: 12px;\n padding: 10px 12px;\n border-radius: 4px;\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n border: 1px solid var(--mj-status-error-border);\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n
|
|
513
|
+
} }, dependencies: [CommonModule, MJEmptyStateComponent, MJAccordionModule, i1.MJAccordionPanelComponent, i1.MJAccordionTitleDirective, i1.MJAccordionBodyDirective, i2.DatePipe], styles: [".user-sharing-center[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-width: 480px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.tabs[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.tabs[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n}\n\n.tabs[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.tabs[_ngcontent-%COMP%] .tab.active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.tabs[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.tabs[_ngcontent-%COMP%] .close[_ngcontent-%COMP%] {\n border: none;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 28px;\n height: 28px;\n border-radius: 4px;\n font-size: 16px;\n}\n\n.tabs[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.loading[_ngcontent-%COMP%], \n.empty[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 16px;\n gap: 12px;\n color: var(--mj-text-muted);\n font-size: 14px;\n}\n\n.loading[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 28px;\n}\n\n.error[_ngcontent-%COMP%] {\n margin: 12px;\n padding: 10px 12px;\n border-radius: 4px;\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n border: 1px solid var(--mj-status-error-border);\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n\n\n\n\n.group-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n width: 18px;\n text-align: center;\n}\n\n.group-name[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n\n\n\n.rows[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n\n.row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto auto auto;\n align-items: center;\n gap: 12px;\n padding: 8px 16px 8px 44px;\n background: transparent;\n border: none;\n color: var(--mj-text-primary);\n cursor: pointer;\n text-align: left;\n font-size: 13px;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.row[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.row.editable[_ngcontent-%COMP%] {\n grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;\n cursor: default;\n}\n\n.row.editable[_ngcontent-%COMP%]:hover {\n background: transparent;\n}\n\n.row[_ngcontent-%COMP%] .resource[_ngcontent-%COMP%] {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.row[_ngcontent-%COMP%] .resource-type[_ngcontent-%COMP%], \n.row[_ngcontent-%COMP%] .grantee[_ngcontent-%COMP%], \n.row[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%], \n.row[_ngcontent-%COMP%] .expires[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n font-size: 12px;\n white-space: nowrap;\n}\n\n.row[_ngcontent-%COMP%] .grantee[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 4px;\n}\n\n.row[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] {\n padding: 2px 8px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-size: 11px;\n}\n\n.row[_ngcontent-%COMP%] .revoke[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n border-radius: 4px;\n border: none;\n background: transparent;\n color: var(--mj-status-error);\n cursor: pointer;\n font-size: 13px;\n}\n\n.row[_ngcontent-%COMP%] .revoke[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n}"], changeDetection: 0 });
|
|
513
514
|
}
|
|
514
515
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserSharingCenterComponent, [{
|
|
515
516
|
type: Component,
|
|
516
|
-
args: [{ standalone: true, selector: 'mj-user-sharing-center', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"user-sharing-center\">\n <div class=\"tabs\">\n <button\n class=\"tab\"\n [class.active]=\"ActiveTab === 'shared-with-me'\"\n (click)=\"OnTabClick('shared-with-me')\">\n <i class=\"fa-solid fa-inbox\"></i>\n Shared with me\n </button>\n <button\n class=\"tab\"\n [class.active]=\"ActiveTab === 'shared-by-me'\"\n (click)=\"OnTabClick('shared-by-me')\">\n <i class=\"fa-solid fa-paper-plane\"></i>\n Shared by me\n </button>\n <div class=\"spacer\"></div>\n @if (ShowCloseButton) {\n <button class=\"close\" (click)=\"OnClose()\" title=\"Close\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n\n @if (ErrorMessage) {\n <div class=\"error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n {{ ErrorMessage }}\n </div>\n }\n\n @if (ActiveTab === 'shared-with-me') {\n @if (IsLoadingWithMe) {\n <div class=\"loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Loading\u2026\n </div>\n } @else if (SharedWithMe.length === 0) {\n <div class=\"empty\">\n <i class=\"fa-solid fa-inbox\"></i>\n Nothing has been shared directly with you yet.\n </div>\n } @else {\n @for (group of SharedWithMe; track TrackByDomain($index, group)) {\n <div class=\"group\">\n <button class=\"group-header\" (click)=\"ToggleGroup(group)\">\n <i [class]=\"group.Icon\"></i>\n <span class=\"group-name\">{{ group.DomainName }}</span>\n <span class=\"count\">{{ group.Rows.length }}</span>\n <i class=\"fa-solid chevron\" [class.fa-chevron-down]=\"group.Expanded\" [class.fa-chevron-right]=\"!group.Expanded\"></i>\n </button>\n @if (group.Expanded) {\n <div class=\"rows\">\n @for (row of group.Rows; track TrackByRow($index, row)) {\n <button class=\"row\" (click)=\"OnRowClick(row)\">\n <span class=\"resource\">{{ row.ResourceName || row.ResourceID }}</span>\n <span class=\"resource-type\">{{ row.ResourceType }}</span>\n <span class=\"actions\">{{ ActionsLabel(row.Actions) }}</span>\n @if (row.ExpiresAt) {\n <span class=\"expires\">expires {{ row.ExpiresAt | date:'mediumDate' }}</span>\n }\n </button>\n }\n </div>\n }\n </div>\n }\n }\n } @else {\n @if (IsLoadingByMe) {\n <div class=\"loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Loading\u2026\n </div>\n } @else if (SharedByMe.length === 0) {\n <div class=\"empty\">\n <i class=\"fa-solid fa-paper-plane\"></i>\n You haven't shared anything with others yet.\n </div>\n } @else {\n @for (group of SharedByMe; track TrackByDomain($index, group)) {\n <div class=\"group\">\n <button class=\"group-header\" (click)=\"ToggleGroup(group)\">\n <i [class]=\"group.Icon\"></i>\n <span class=\"group-name\">{{ group.DomainName }}</span>\n <span class=\"count\">{{ group.Rows.length }}</span>\n <i class=\"fa-solid chevron\" [class.fa-chevron-down]=\"group.Expanded\" [class.fa-chevron-right]=\"!group.Expanded\"></i>\n </button>\n @if (group.Expanded) {\n <div class=\"rows\">\n @for (row of group.Rows; track TrackByRow($index, row)) {\n <div class=\"row editable\">\n <span class=\"resource\">{{ row.ResourceName || row.ResourceID }}</span>\n <span class=\"resource-type\">{{ row.ResourceType }}</span>\n <span class=\"grantee\">\n <i class=\"fa-solid fa-user\"></i>\n {{ row.GranteeName || row.GranteeType }}\n </span>\n <span class=\"actions\">{{ ActionsLabel(row.Actions) }}</span>\n @if (row.ExpiresAt) {\n <span class=\"expires\">expires {{ row.ExpiresAt | date:'mediumDate' }}</span>\n }\n <button class=\"revoke\" (click)=\"OnRevoke(row, $event)\" title=\"Revoke access\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n</div>\n", styles: [".user-sharing-center {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-width: 480px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.tabs {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.tabs .tab {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n}\n\n.tabs .tab:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.tabs .tab.active {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.tabs .spacer {\n flex: 1;\n}\n\n.tabs .close {\n border: none;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 28px;\n height: 28px;\n border-radius: 4px;\n font-size: 16px;\n}\n\n.tabs .close:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.loading,\n.empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 16px;\n gap: 12px;\n color: var(--mj-text-muted);\n font-size: 14px;\n}\n\n.loading i,\n.empty i {\n font-size: 28px;\n}\n\n.error {\n margin: 12px;\n padding: 10px 12px;\n border-radius: 4px;\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n border: 1px solid var(--mj-status-error-border);\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.group {\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.group:last-child {\n border-bottom: none;\n}\n\n.group-header {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 16px;\n background: transparent;\n border: none;\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: 13px;\n cursor: pointer;\n text-align: left;\n}\n\n.group-header:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.group-header i:first-child {\n color: var(--mj-brand-primary);\n width: 18px;\n text-align: center;\n}\n\n.group-header .group-name {\n flex: 1;\n}\n\n.group-header .count {\n padding: 2px 8px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 10px;\n font-size: 11px;\n color: var(--mj-text-secondary);\n font-weight: 600;\n}\n\n.group-header .chevron {\n color: var(--mj-text-muted);\n font-size: 12px;\n}\n\n.rows {\n display: flex;\n flex-direction: column;\n}\n\n.row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto auto auto;\n align-items: center;\n gap: 12px;\n padding: 8px 16px 8px 44px;\n background: transparent;\n border: none;\n color: var(--mj-text-primary);\n cursor: pointer;\n text-align: left;\n font-size: 13px;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.row:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.row.editable {\n grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;\n cursor: default;\n}\n\n.row.editable:hover {\n background: transparent;\n}\n\n.row .resource {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.row .resource-type,\n.row .grantee,\n.row .actions,\n.row .expires {\n color: var(--mj-text-secondary);\n font-size: 12px;\n white-space: nowrap;\n}\n\n.row .grantee i {\n margin-right: 4px;\n}\n\n.row .actions {\n padding: 2px 8px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-size: 11px;\n}\n\n.row .revoke {\n width: 28px;\n height: 28px;\n border-radius: 4px;\n border: none;\n background: transparent;\n color: var(--mj-status-error);\n cursor: pointer;\n font-size: 13px;\n}\n\n.row .revoke:hover {\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n}\n"] }]
|
|
517
|
+
args: [{ standalone: true, selector: 'mj-user-sharing-center', imports: [CommonModule, MJEmptyStateComponent, MJAccordionModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"user-sharing-center\">\n <div class=\"tabs\">\n <button\n class=\"tab\"\n [class.active]=\"ActiveTab === 'shared-with-me'\"\n (click)=\"OnTabClick('shared-with-me')\">\n <i class=\"fa-solid fa-inbox\"></i>\n Shared with me\n </button>\n <button\n class=\"tab\"\n [class.active]=\"ActiveTab === 'shared-by-me'\"\n (click)=\"OnTabClick('shared-by-me')\">\n <i class=\"fa-solid fa-paper-plane\"></i>\n Shared by me\n </button>\n <div class=\"spacer\"></div>\n @if (ShowCloseButton) {\n <button class=\"close\" (click)=\"OnClose()\" title=\"Close\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n\n @if (ErrorMessage) {\n <div class=\"error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n {{ ErrorMessage }}\n </div>\n }\n\n @if (ActiveTab === 'shared-with-me') {\n @if (IsLoadingWithMe) {\n <div class=\"loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Loading\u2026\n </div>\n } @else if (SharedWithMe.length === 0) {\n <mj-empty-state class=\"empty\" Size=\"compact\"\n Icon=\"fa-solid fa-inbox\"\n Title=\"Nothing has been shared directly with you yet.\" />\n } @else {\n @for (group of SharedWithMe; track TrackByDomain($index, group)) {\n <mj-accordion-panel Size=\"sm\" [FlushBody]=\"true\"\n [Expanded]=\"group.Expanded\"\n (ExpandedChange)=\"OnGroupExpandedChange(group, $event)\">\n <ng-template mjAccordionTitle>\n <span class=\"group-icon\"><i [class]=\"group.Icon\"></i></span>\n <span class=\"group-name\">{{ group.DomainName }}</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ group.Rows.length }}</span>\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"rows\">\n @for (row of group.Rows; track TrackByRow($index, row)) {\n <button class=\"row\" (click)=\"OnRowClick(row)\">\n <span class=\"resource\">{{ row.ResourceName || row.ResourceID }}</span>\n <span class=\"resource-type\">{{ row.ResourceType }}</span>\n <span class=\"actions\">{{ ActionsLabel(row.Actions) }}</span>\n @if (row.ExpiresAt) {\n <span class=\"expires\">expires {{ row.ExpiresAt | date:'mediumDate' }}</span>\n }\n </button>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n }\n }\n } @else {\n @if (IsLoadingByMe) {\n <div class=\"loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Loading\u2026\n </div>\n } @else if (SharedByMe.length === 0) {\n <mj-empty-state class=\"empty\" Size=\"compact\"\n Icon=\"fa-solid fa-paper-plane\"\n Title=\"You haven't shared anything with others yet.\" />\n } @else {\n @for (group of SharedByMe; track TrackByDomain($index, group)) {\n <mj-accordion-panel Size=\"sm\" [FlushBody]=\"true\"\n [Expanded]=\"group.Expanded\"\n (ExpandedChange)=\"OnGroupExpandedChange(group, $event)\">\n <ng-template mjAccordionTitle>\n <span class=\"group-icon\"><i [class]=\"group.Icon\"></i></span>\n <span class=\"group-name\">{{ group.DomainName }}</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ group.Rows.length }}</span>\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"rows\">\n @for (row of group.Rows; track TrackByRow($index, row)) {\n <div class=\"row editable\">\n <span class=\"resource\">{{ row.ResourceName || row.ResourceID }}</span>\n <span class=\"resource-type\">{{ row.ResourceType }}</span>\n <span class=\"grantee\">\n <i class=\"fa-solid fa-user\"></i>\n {{ row.GranteeName || row.GranteeType }}\n </span>\n <span class=\"actions\">{{ ActionsLabel(row.Actions) }}</span>\n @if (row.ExpiresAt) {\n <span class=\"expires\">expires {{ row.ExpiresAt | date:'mediumDate' }}</span>\n }\n <button class=\"revoke\" (click)=\"OnRevoke(row, $event)\" title=\"Revoke access\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n }\n }\n }\n</div>\n", styles: [".user-sharing-center {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-width: 480px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.tabs {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.tabs .tab {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n}\n\n.tabs .tab:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.tabs .tab.active {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.tabs .spacer {\n flex: 1;\n}\n\n.tabs .close {\n border: none;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n width: 28px;\n height: 28px;\n border-radius: 4px;\n font-size: 16px;\n}\n\n.tabs .close:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.loading,\n.empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 16px;\n gap: 12px;\n color: var(--mj-text-muted);\n font-size: 14px;\n}\n\n.loading i,\n.empty i {\n font-size: 28px;\n}\n\n.error {\n margin: 12px;\n padding: 10px 12px;\n border-radius: 4px;\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n border: 1px solid var(--mj-status-error-border);\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Domain groups are now rendered with <mj-accordion-panel>, which owns the panel\n chrome (border, hover, chevron) and the disclosure toggle. The former\n .group / .group-header / .chevron rules were removed as dead. The title-slot\n icon + name + count styles below remain \u2014 they style content projected into\n <ng-template mjAccordionTitle>. */\n.group-icon i {\n color: var(--mj-brand-primary);\n width: 18px;\n text-align: center;\n}\n\n.group-name {\n flex: 1;\n}\n\n/* .count removed \u2014 replaced by the standard .mj-accordion-badge--right. */\n\n.rows {\n display: flex;\n flex-direction: column;\n}\n\n.row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto auto auto;\n align-items: center;\n gap: 12px;\n padding: 8px 16px 8px 44px;\n background: transparent;\n border: none;\n color: var(--mj-text-primary);\n cursor: pointer;\n text-align: left;\n font-size: 13px;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.row:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.row.editable {\n grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;\n cursor: default;\n}\n\n.row.editable:hover {\n background: transparent;\n}\n\n.row .resource {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.row .resource-type,\n.row .grantee,\n.row .actions,\n.row .expires {\n color: var(--mj-text-secondary);\n font-size: 12px;\n white-space: nowrap;\n}\n\n.row .grantee i {\n margin-right: 4px;\n}\n\n.row .actions {\n padding: 2px 8px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-size: 11px;\n}\n\n.row .revoke {\n width: 28px;\n height: 28px;\n border-radius: 4px;\n border: none;\n background: transparent;\n color: var(--mj-status-error);\n cursor: pointer;\n font-size: 13px;\n}\n\n.row .revoke:hover {\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n}\n"] }]
|
|
517
518
|
}], null, { ActiveTab: [{
|
|
518
519
|
type: Input
|
|
519
520
|
}], ShowCloseButton: [{
|