@memberjunction/ng-dashboards 5.28.0 → 5.30.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/AI/components/agents/agent-configuration.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-configuration.component.js +11 -9
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.js +21 -19
- package/dist/AI/components/agents/agent-editor.component.js.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +154 -154
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +8 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +2 -2
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.d.ts +1 -1
- package/dist/APIKeys/api-applications-panel.component.d.ts.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.js +15 -2
- package/dist/APIKeys/api-applications-panel.component.js.map +1 -1
- package/dist/APIKeys/api-key-edit-panel.component.d.ts.map +1 -1
- package/dist/APIKeys/api-key-edit-panel.component.js +17 -5
- package/dist/APIKeys/api-key-edit-panel.component.js.map +1 -1
- package/dist/Archiving/components/archive-config-resource.component.d.ts +20 -0
- package/dist/Archiving/components/archive-config-resource.component.d.ts.map +1 -0
- package/dist/Archiving/components/archive-config-resource.component.js +46 -0
- package/dist/Archiving/components/archive-config-resource.component.js.map +1 -0
- package/dist/Archiving/components/archive-runs-resource.component.d.ts +20 -0
- package/dist/Archiving/components/archive-runs-resource.component.d.ts.map +1 -0
- package/dist/Archiving/components/archive-runs-resource.component.js +46 -0
- package/dist/Archiving/components/archive-runs-resource.component.js.map +1 -0
- package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +56 -71
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts +0 -8
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +73 -74
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-adapter.d.ts +25 -0
- package/dist/DashboardBrowser/dashboard-share-adapter.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboard-share-adapter.js +99 -0
- package/dist/DashboardBrowser/dashboard-share-adapter.js.map +1 -0
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts +21 -104
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js +48 -530
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +5 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +17 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.d.ts +18 -1
- package/dist/Integration/components/connections/connections.component.d.ts.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +251 -199
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/Integration/services/integration-data.service.d.ts +7 -2
- package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
- package/dist/Integration/services/integration-data.service.js +10 -2
- package/dist/Integration/services/integration-data.service.js.map +1 -1
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js +144 -144
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.js +12 -14
- package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.js +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.d.ts +170 -0
- package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +2521 -758
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/MCP/mcp-filter-panel.component.d.ts +16 -1
- package/dist/MCP/mcp-filter-panel.component.d.ts.map +1 -1
- package/dist/MCP/mcp-filter-panel.component.js +187 -60
- package/dist/MCP/mcp-filter-panel.component.js.map +1 -1
- package/dist/MCP/mcp-resource.component.d.ts +0 -9
- package/dist/MCP/mcp-resource.component.d.ts.map +1 -1
- package/dist/MCP/mcp-resource.component.js +1 -10
- package/dist/MCP/mcp-resource.component.js.map +1 -1
- package/dist/MCP/mcp.module.d.ts +7 -6
- package/dist/MCP/mcp.module.d.ts.map +1 -1
- package/dist/MCP/mcp.module.js +4 -8
- package/dist/MCP/mcp.module.js.map +1 -1
- package/dist/Permissions/audit-log-resource.component.d.ts +38 -0
- package/dist/Permissions/audit-log-resource.component.d.ts.map +1 -0
- package/dist/Permissions/audit-log-resource.component.js +380 -0
- package/dist/Permissions/audit-log-resource.component.js.map +1 -0
- package/dist/Permissions/permissions-shared.d.ts +51 -0
- package/dist/Permissions/permissions-shared.d.ts.map +1 -0
- package/dist/Permissions/permissions-shared.js +91 -0
- package/dist/Permissions/permissions-shared.js.map +1 -0
- package/dist/Permissions/resource-access-resource.component.d.ts +45 -0
- package/dist/Permissions/resource-access-resource.component.d.ts.map +1 -0
- package/dist/Permissions/resource-access-resource.component.js +342 -0
- package/dist/Permissions/resource-access-resource.component.js.map +1 -0
- package/dist/Permissions/user-access-resource.component.d.ts +39 -0
- package/dist/Permissions/user-access-resource.component.d.ts.map +1 -0
- package/dist/Permissions/user-access-resource.component.js +346 -0
- package/dist/Permissions/user-access-resource.component.js.map +1 -0
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +13 -3
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +186 -139
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/archiving-dashboards.module.d.ts +19 -0
- package/dist/archiving-dashboards.module.d.ts.map +1 -0
- package/dist/archiving-dashboards.module.js +52 -0
- package/dist/archiving-dashboards.module.js.map +1 -0
- package/dist/component-studio-dashboards.module.d.ts +1 -0
- package/dist/component-studio-dashboards.module.d.ts.map +1 -1
- package/dist/component-studio-dashboards.module.js +7 -0
- package/dist/component-studio-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +24 -19
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +30 -1
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/module.d.ts +13 -12
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +7 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +8 -0
- package/dist/public-api.js.map +1 -1
- package/dist/shared/pipes/highlight-search.pipe.d.ts +1 -1
- package/dist/shared/pipes/highlight-search.pipe.d.ts.map +1 -1
- package/dist/shared/pipes/highlight-search.pipe.js +14 -4
- package/dist/shared/pipes/highlight-search.pipe.js.map +1 -1
- package/package.json +52 -48
|
@@ -1,551 +1,69 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter
|
|
2
|
-
import {
|
|
3
|
-
import { DashboardEngine } from '@memberjunction/core-entities';
|
|
4
|
-
import { UUIDsEqual } from '@memberjunction/global';
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { DashboardShareAdapter } from './dashboard-share-adapter';
|
|
5
3
|
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@
|
|
7
|
-
import * as i2 from "@memberjunction/ng-ui-components";
|
|
8
|
-
const _forTrack0 = ($index, $item) => $item.User.ID;
|
|
9
|
-
const _forTrack1 = ($index, $item) => $item.ID;
|
|
10
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
-
i0.ɵɵelementStart(0, "div", 5);
|
|
12
|
-
i0.ɵɵelement(1, "i", 27);
|
|
13
|
-
i0.ɵɵelementStart(2, "span");
|
|
14
|
-
i0.ɵɵtext(3);
|
|
15
|
-
i0.ɵɵelementEnd()();
|
|
16
|
-
} if (rf & 2) {
|
|
17
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
18
|
-
i0.ɵɵadvance(3);
|
|
19
|
-
i0.ɵɵtextInterpolate(ctx_r1.Error);
|
|
20
|
-
} }
|
|
21
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_12_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
-
i0.ɵɵelementStart(0, "span", 32);
|
|
23
|
-
i0.ɵɵtext(1);
|
|
24
|
-
i0.ɵɵelementEnd();
|
|
25
|
-
} if (rf & 2) {
|
|
26
|
-
const user_r4 = i0.ɵɵnextContext().$implicit;
|
|
27
|
-
i0.ɵɵadvance();
|
|
28
|
-
i0.ɵɵtextInterpolate(user_r4.Email);
|
|
29
|
-
} }
|
|
30
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
-
const _r3 = i0.ɵɵgetCurrentView();
|
|
32
|
-
i0.ɵɵelementStart(0, "button", 29);
|
|
33
|
-
i0.ɵɵlistener("click", function DashboardShareDialogComponent_Conditional_0_Conditional_12_For_2_Template_button_click_0_listener() { const user_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.addUserShare(user_r4)); });
|
|
34
|
-
i0.ɵɵelementStart(1, "span", 30);
|
|
35
|
-
i0.ɵɵtext(2);
|
|
36
|
-
i0.ɵɵelementEnd();
|
|
37
|
-
i0.ɵɵelementStart(3, "span", 31);
|
|
38
|
-
i0.ɵɵtext(4);
|
|
39
|
-
i0.ɵɵelementEnd();
|
|
40
|
-
i0.ɵɵconditionalCreate(5, DashboardShareDialogComponent_Conditional_0_Conditional_12_For_2_Conditional_5_Template, 2, 1, "span", 32);
|
|
41
|
-
i0.ɵɵelement(6, "i", 33);
|
|
42
|
-
i0.ɵɵelementEnd();
|
|
43
|
-
} if (rf & 2) {
|
|
44
|
-
const user_r4 = ctx.$implicit;
|
|
45
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
46
|
-
i0.ɵɵproperty("disabled", ctx_r1.IsLoading);
|
|
47
|
-
i0.ɵɵadvance(2);
|
|
48
|
-
i0.ɵɵtextInterpolate(ctx_r1.getUserInitials(user_r4));
|
|
49
|
-
i0.ɵɵadvance(2);
|
|
50
|
-
i0.ɵɵtextInterpolate(user_r4.Name);
|
|
51
|
-
i0.ɵɵadvance();
|
|
52
|
-
i0.ɵɵconditional(user_r4.Email ? 5 : -1);
|
|
53
|
-
} }
|
|
54
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
-
i0.ɵɵelementStart(0, "div", 10);
|
|
56
|
-
i0.ɵɵrepeaterCreate(1, DashboardShareDialogComponent_Conditional_0_Conditional_12_For_2_Template, 7, 4, "button", 28, _forTrack1);
|
|
57
|
-
i0.ɵɵelementEnd();
|
|
58
|
-
} if (rf & 2) {
|
|
59
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
60
|
-
i0.ɵɵadvance();
|
|
61
|
-
i0.ɵɵrepeater(ctx_r1.FilteredAvailableUsers);
|
|
62
|
-
} }
|
|
63
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
-
i0.ɵɵelementStart(0, "div", 11);
|
|
65
|
-
i0.ɵɵtext(1);
|
|
66
|
-
i0.ɵɵelementEnd();
|
|
67
|
-
} if (rf & 2) {
|
|
68
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
69
|
-
i0.ɵɵadvance();
|
|
70
|
-
i0.ɵɵtextInterpolate1(" No users found matching \"", ctx_r1.UserSearchFilter, "\" ");
|
|
71
|
-
} }
|
|
72
|
-
function DashboardShareDialogComponent_Conditional_0_For_26_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
-
i0.ɵɵelementStart(0, "span", 35);
|
|
74
|
-
i0.ɵɵtext(1, "New");
|
|
75
|
-
i0.ɵɵelementEnd();
|
|
76
|
-
} }
|
|
77
|
-
function DashboardShareDialogComponent_Conditional_0_For_26_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
-
i0.ɵɵelementStart(0, "span", 36);
|
|
79
|
-
i0.ɵɵtext(1);
|
|
80
|
-
i0.ɵɵelementEnd();
|
|
81
|
-
} if (rf & 2) {
|
|
82
|
-
const share_r6 = i0.ɵɵnextContext().$implicit;
|
|
83
|
-
i0.ɵɵadvance();
|
|
84
|
-
i0.ɵɵtextInterpolate(share_r6.User.Email);
|
|
85
|
-
} }
|
|
86
|
-
function DashboardShareDialogComponent_Conditional_0_For_26_Template(rf, ctx) { if (rf & 1) {
|
|
87
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
88
|
-
i0.ɵɵelementStart(0, "div", 34)(1, "span", 30);
|
|
89
|
-
i0.ɵɵtext(2);
|
|
90
|
-
i0.ɵɵelementEnd();
|
|
91
|
-
i0.ɵɵelementStart(3, "div", 16)(4, "span", 17);
|
|
92
|
-
i0.ɵɵtext(5);
|
|
93
|
-
i0.ɵɵconditionalCreate(6, DashboardShareDialogComponent_Conditional_0_For_26_Conditional_6_Template, 2, 0, "span", 35);
|
|
94
|
-
i0.ɵɵelementEnd();
|
|
95
|
-
i0.ɵɵconditionalCreate(7, DashboardShareDialogComponent_Conditional_0_For_26_Conditional_7_Template, 2, 1, "span", 36);
|
|
96
|
-
i0.ɵɵelementEnd();
|
|
97
|
-
i0.ɵɵelementStart(8, "div", 37)(9, "label", 38);
|
|
98
|
-
i0.ɵɵelement(10, "input", 39)(11, "i", 40);
|
|
99
|
-
i0.ɵɵelementEnd();
|
|
100
|
-
i0.ɵɵelementStart(12, "label", 41)(13, "input", 42);
|
|
101
|
-
i0.ɵɵlistener("change", function DashboardShareDialogComponent_Conditional_0_For_26_Template_input_change_13_listener() { const share_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleCanEdit(share_r6)); });
|
|
102
|
-
i0.ɵɵelementEnd();
|
|
103
|
-
i0.ɵɵelement(14, "i", 43);
|
|
104
|
-
i0.ɵɵelementEnd();
|
|
105
|
-
i0.ɵɵelementStart(15, "label", 44)(16, "input", 42);
|
|
106
|
-
i0.ɵɵlistener("change", function DashboardShareDialogComponent_Conditional_0_For_26_Template_input_change_16_listener() { const share_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleCanDelete(share_r6)); });
|
|
107
|
-
i0.ɵɵelementEnd();
|
|
108
|
-
i0.ɵɵelement(17, "i", 45);
|
|
109
|
-
i0.ɵɵelementEnd();
|
|
110
|
-
i0.ɵɵelementStart(18, "label", 46)(19, "input", 42);
|
|
111
|
-
i0.ɵɵlistener("change", function DashboardShareDialogComponent_Conditional_0_For_26_Template_input_change_19_listener() { const share_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleCanShare(share_r6)); });
|
|
112
|
-
i0.ɵɵelementEnd();
|
|
113
|
-
i0.ɵɵelement(20, "i", 47);
|
|
114
|
-
i0.ɵɵelementEnd()();
|
|
115
|
-
i0.ɵɵelementStart(21, "button", 48);
|
|
116
|
-
i0.ɵɵlistener("click", function DashboardShareDialogComponent_Conditional_0_For_26_Template_button_click_21_listener() { const share_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.removeUserShare(share_r6)); });
|
|
117
|
-
i0.ɵɵelement(22, "i", 49);
|
|
118
|
-
i0.ɵɵelementEnd()();
|
|
119
|
-
} if (rf & 2) {
|
|
120
|
-
const share_r6 = ctx.$implicit;
|
|
121
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
122
|
-
i0.ɵɵclassProp("share-person-new", share_r6.IsNew)("share-person-modified", share_r6.Permission.Dirty);
|
|
123
|
-
i0.ɵɵadvance(2);
|
|
124
|
-
i0.ɵɵtextInterpolate(ctx_r1.getUserInitials(share_r6.User));
|
|
125
|
-
i0.ɵɵadvance(3);
|
|
126
|
-
i0.ɵɵtextInterpolate1(" ", share_r6.User.Name, " ");
|
|
127
|
-
i0.ɵɵadvance();
|
|
128
|
-
i0.ɵɵconditional(share_r6.IsNew ? 6 : -1);
|
|
129
|
-
i0.ɵɵadvance();
|
|
130
|
-
i0.ɵɵconditional(share_r6.User.Email ? 7 : -1);
|
|
131
|
-
i0.ɵɵadvance(3);
|
|
132
|
-
i0.ɵɵproperty("checked", share_r6.Permission.CanRead);
|
|
133
|
-
i0.ɵɵadvance(3);
|
|
134
|
-
i0.ɵɵproperty("checked", share_r6.Permission.CanEdit);
|
|
135
|
-
i0.ɵɵadvance(3);
|
|
136
|
-
i0.ɵɵproperty("checked", share_r6.Permission.CanDelete);
|
|
137
|
-
i0.ɵɵadvance(3);
|
|
138
|
-
i0.ɵɵproperty("checked", share_r6.Permission.CanShare);
|
|
139
|
-
} }
|
|
140
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_27_Template(rf, ctx) { if (rf & 1) {
|
|
141
|
-
i0.ɵɵelementStart(0, "div", 20);
|
|
142
|
-
i0.ɵɵelement(1, "i", 50);
|
|
143
|
-
i0.ɵɵelementStart(2, "span");
|
|
144
|
-
i0.ɵɵtext(3, "Not shared with anyone yet");
|
|
145
|
-
i0.ɵɵelementEnd()();
|
|
146
|
-
} }
|
|
147
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_28_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
148
|
-
const _r7 = i0.ɵɵgetCurrentView();
|
|
149
|
-
i0.ɵɵelementStart(0, "div", 51)(1, "span", 52);
|
|
150
|
-
i0.ɵɵtext(2);
|
|
151
|
-
i0.ɵɵelementEnd();
|
|
152
|
-
i0.ɵɵelementStart(3, "span", 53);
|
|
153
|
-
i0.ɵɵtext(4);
|
|
154
|
-
i0.ɵɵelementEnd();
|
|
155
|
-
i0.ɵɵelementStart(5, "button", 54);
|
|
156
|
-
i0.ɵɵlistener("click", function DashboardShareDialogComponent_Conditional_0_Conditional_28_For_2_Template_button_click_5_listener() { const share_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.undoRemove(share_r8)); });
|
|
157
|
-
i0.ɵɵelement(6, "i", 55);
|
|
158
|
-
i0.ɵɵtext(7, " Undo ");
|
|
159
|
-
i0.ɵɵelementEnd()();
|
|
160
|
-
} if (rf & 2) {
|
|
161
|
-
const share_r8 = ctx.$implicit;
|
|
162
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
163
|
-
i0.ɵɵadvance(2);
|
|
164
|
-
i0.ɵɵtextInterpolate(ctx_r1.getUserInitials(share_r8.User));
|
|
165
|
-
i0.ɵɵadvance(2);
|
|
166
|
-
i0.ɵɵtextInterpolate(share_r8.User.Name);
|
|
167
|
-
} }
|
|
168
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
-
i0.ɵɵelementStart(0, "div", 21);
|
|
170
|
-
i0.ɵɵrepeaterCreate(1, DashboardShareDialogComponent_Conditional_0_Conditional_28_For_2_Template, 8, 2, "div", 51, _forTrack0);
|
|
171
|
-
i0.ɵɵelementEnd();
|
|
172
|
-
} if (rf & 2) {
|
|
173
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
174
|
-
i0.ɵɵadvance();
|
|
175
|
-
i0.ɵɵrepeater(ctx_r1.RemovedShares);
|
|
176
|
-
} }
|
|
177
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_30_Template(rf, ctx) { if (rf & 1) {
|
|
178
|
-
i0.ɵɵelementStart(0, "span", 23);
|
|
179
|
-
i0.ɵɵelement(1, "i", 56);
|
|
180
|
-
i0.ɵɵtext(2, " Unsaved changes ");
|
|
181
|
-
i0.ɵɵelementEnd();
|
|
182
|
-
} }
|
|
183
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_35_Template(rf, ctx) { if (rf & 1) {
|
|
184
|
-
i0.ɵɵelement(0, "i", 57);
|
|
185
|
-
i0.ɵɵtext(1, " Saving... ");
|
|
186
|
-
} }
|
|
187
|
-
function DashboardShareDialogComponent_Conditional_0_Conditional_36_Template(rf, ctx) { if (rf & 1) {
|
|
188
|
-
i0.ɵɵtext(0, " Save ");
|
|
189
|
-
} }
|
|
190
|
-
function DashboardShareDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
191
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
192
|
-
i0.ɵɵelementStart(0, "mj-window", 1);
|
|
193
|
-
i0.ɵɵlistener("Close", function DashboardShareDialogComponent_Conditional_0_Template_mj_window_Close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
194
|
-
i0.ɵɵelementStart(1, "mj-window-titlebar")(2, "div", 2);
|
|
195
|
-
i0.ɵɵelement(3, "i", 3);
|
|
196
|
-
i0.ɵɵelementStart(4, "span");
|
|
197
|
-
i0.ɵɵtext(5);
|
|
198
|
-
i0.ɵɵelementEnd()()();
|
|
199
|
-
i0.ɵɵelementStart(6, "div", 4);
|
|
200
|
-
i0.ɵɵconditionalCreate(7, DashboardShareDialogComponent_Conditional_0_Conditional_7_Template, 4, 1, "div", 5);
|
|
201
|
-
i0.ɵɵelementStart(8, "div", 6)(9, "div", 7);
|
|
202
|
-
i0.ɵɵelement(10, "i", 8);
|
|
203
|
-
i0.ɵɵelementStart(11, "input", 9);
|
|
204
|
-
i0.ɵɵtwoWayListener("ngModelChange", function DashboardShareDialogComponent_Conditional_0_Template_input_ngModelChange_11_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.UserSearchFilter, $event) || (ctx_r1.UserSearchFilter = $event); return i0.ɵɵresetView($event); });
|
|
205
|
-
i0.ɵɵelementEnd()();
|
|
206
|
-
i0.ɵɵconditionalCreate(12, DashboardShareDialogComponent_Conditional_0_Conditional_12_Template, 3, 0, "div", 10);
|
|
207
|
-
i0.ɵɵconditionalCreate(13, DashboardShareDialogComponent_Conditional_0_Conditional_13_Template, 2, 1, "div", 11);
|
|
208
|
-
i0.ɵɵelementEnd();
|
|
209
|
-
i0.ɵɵelementStart(14, "div", 6)(15, "div", 12);
|
|
210
|
-
i0.ɵɵtext(16, "People with access");
|
|
211
|
-
i0.ɵɵelementEnd();
|
|
212
|
-
i0.ɵɵelementStart(17, "div", 13)(18, "span", 14);
|
|
213
|
-
i0.ɵɵelement(19, "i", 15);
|
|
214
|
-
i0.ɵɵelementEnd();
|
|
215
|
-
i0.ɵɵelementStart(20, "div", 16)(21, "span", 17);
|
|
216
|
-
i0.ɵɵtext(22);
|
|
217
|
-
i0.ɵɵelementEnd();
|
|
218
|
-
i0.ɵɵelementStart(23, "span", 18);
|
|
219
|
-
i0.ɵɵtext(24, "Owner");
|
|
220
|
-
i0.ɵɵelementEnd()()();
|
|
221
|
-
i0.ɵɵrepeaterCreate(25, DashboardShareDialogComponent_Conditional_0_For_26_Template, 23, 12, "div", 19, _forTrack0);
|
|
222
|
-
i0.ɵɵconditionalCreate(27, DashboardShareDialogComponent_Conditional_0_Conditional_27_Template, 4, 0, "div", 20);
|
|
223
|
-
i0.ɵɵconditionalCreate(28, DashboardShareDialogComponent_Conditional_0_Conditional_28_Template, 3, 0, "div", 21);
|
|
224
|
-
i0.ɵɵelementEnd();
|
|
225
|
-
i0.ɵɵelementStart(29, "div", 22);
|
|
226
|
-
i0.ɵɵconditionalCreate(30, DashboardShareDialogComponent_Conditional_0_Conditional_30_Template, 3, 0, "span", 23);
|
|
227
|
-
i0.ɵɵelementStart(31, "div", 24)(32, "button", 25);
|
|
228
|
-
i0.ɵɵlistener("click", function DashboardShareDialogComponent_Conditional_0_Template_button_click_32_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
229
|
-
i0.ɵɵtext(33, " Cancel ");
|
|
230
|
-
i0.ɵɵelementEnd();
|
|
231
|
-
i0.ɵɵelementStart(34, "button", 26);
|
|
232
|
-
i0.ɵɵlistener("click", function DashboardShareDialogComponent_Conditional_0_Template_button_click_34_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSave()); });
|
|
233
|
-
i0.ɵɵconditionalCreate(35, DashboardShareDialogComponent_Conditional_0_Conditional_35_Template, 2, 0)(36, DashboardShareDialogComponent_Conditional_0_Conditional_36_Template, 1, 0);
|
|
234
|
-
i0.ɵɵelementEnd()()()()();
|
|
235
|
-
} if (rf & 2) {
|
|
236
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
237
|
-
i0.ɵɵproperty("Visible", true)("Width", 560)("MinHeight", 200)("Resizable", false)("Draggable", true);
|
|
238
|
-
i0.ɵɵadvance(5);
|
|
239
|
-
i0.ɵɵtextInterpolate1("Share \"", ctx_r1.Dashboard == null ? null : ctx_r1.Dashboard.Name, "\"");
|
|
240
|
-
i0.ɵɵadvance(2);
|
|
241
|
-
i0.ɵɵconditional(ctx_r1.Error ? 7 : -1);
|
|
242
|
-
i0.ɵɵadvance(4);
|
|
243
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.UserSearchFilter);
|
|
244
|
-
i0.ɵɵproperty("disabled", ctx_r1.IsLoading);
|
|
245
|
-
i0.ɵɵadvance();
|
|
246
|
-
i0.ɵɵconditional(ctx_r1.FilteredAvailableUsers.length > 0 ? 12 : -1);
|
|
247
|
-
i0.ɵɵadvance();
|
|
248
|
-
i0.ɵɵconditional(ctx_r1.UserSearchFilter && ctx_r1.FilteredAvailableUsers.length === 0 ? 13 : -1);
|
|
249
|
-
i0.ɵɵadvance(9);
|
|
250
|
-
i0.ɵɵtextInterpolate((ctx_r1.Dashboard == null ? null : ctx_r1.Dashboard.User) || "You");
|
|
251
|
-
i0.ɵɵadvance(3);
|
|
252
|
-
i0.ɵɵrepeater(ctx_r1.ActiveShares);
|
|
253
|
-
i0.ɵɵadvance(2);
|
|
254
|
-
i0.ɵɵconditional(ctx_r1.ActiveShares.length === 0 ? 27 : -1);
|
|
255
|
-
i0.ɵɵadvance();
|
|
256
|
-
i0.ɵɵconditional(ctx_r1.RemovedShares.length > 0 ? 28 : -1);
|
|
257
|
-
i0.ɵɵadvance(2);
|
|
258
|
-
i0.ɵɵconditional(ctx_r1.HasChanges ? 30 : -1);
|
|
259
|
-
i0.ɵɵadvance(4);
|
|
260
|
-
i0.ɵɵproperty("disabled", !ctx_r1.HasChanges || ctx_r1.IsLoading);
|
|
261
|
-
i0.ɵɵadvance();
|
|
262
|
-
i0.ɵɵconditional(ctx_r1.IsLoading ? 35 : 36);
|
|
263
|
-
} }
|
|
4
|
+
import * as i1 from "@memberjunction/ng-resource-permissions";
|
|
264
5
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
6
|
+
* Thin wrapper that maps a `MJDashboardEntity` + the Dashboard-specific
|
|
7
|
+
* permission model onto the generic `mj-resource-share-dialog`. Existing call
|
|
8
|
+
* sites (`<mj-dashboard-share-dialog [Dashboard]=... [Visible]=... (Result)=... />`)
|
|
9
|
+
* continue to work unchanged — this component just constructs the context +
|
|
10
|
+
* adapter and delegates.
|
|
267
11
|
*/
|
|
268
12
|
export class DashboardShareDialogComponent {
|
|
269
|
-
cdr;
|
|
270
13
|
Visible = false;
|
|
271
|
-
Dashboard
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
/** Loading state */
|
|
280
|
-
IsLoading = false;
|
|
281
|
-
/** Error message to display */
|
|
282
|
-
Error = null;
|
|
283
|
-
/** Search filter for available users */
|
|
284
|
-
UserSearchFilter = '';
|
|
285
|
-
constructor(cdr) {
|
|
286
|
-
this.cdr = cdr;
|
|
287
|
-
}
|
|
288
|
-
ngOnChanges(changes) {
|
|
289
|
-
if (changes['Visible'] && this.Visible && this.Dashboard) {
|
|
290
|
-
this.resetDialog();
|
|
291
|
-
this.loadData();
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Reset dialog state
|
|
296
|
-
*/
|
|
297
|
-
resetDialog() {
|
|
298
|
-
this.Error = null;
|
|
299
|
-
this.IsLoading = false;
|
|
300
|
-
this.UserShares = [];
|
|
301
|
-
this.AvailableUsers = [];
|
|
302
|
-
this.UserSearchFilter = '';
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Load existing shares and available users
|
|
306
|
-
*/
|
|
307
|
-
async loadData() {
|
|
308
|
-
if (!this.Dashboard)
|
|
309
|
-
return;
|
|
310
|
-
this.IsLoading = true;
|
|
311
|
-
this.cdr.detectChanges();
|
|
312
|
-
try {
|
|
313
|
-
const md = new Metadata();
|
|
314
|
-
const rv = new RunView();
|
|
315
|
-
// Load all users
|
|
316
|
-
const usersResult = await rv.RunView({
|
|
317
|
-
EntityName: 'MJ: Users',
|
|
318
|
-
ExtraFilter: "IsActive = 1",
|
|
319
|
-
OrderBy: 'Name',
|
|
320
|
-
ResultType: 'entity_object'
|
|
321
|
-
});
|
|
322
|
-
if (usersResult.Success) {
|
|
323
|
-
this.allUsers = usersResult.Results;
|
|
324
|
-
}
|
|
325
|
-
// Get existing shares from DashboardEngine
|
|
326
|
-
const existingShares = DashboardEngine.Instance.GetDashboardShares(this.Dashboard.ID);
|
|
327
|
-
// Build user shares list
|
|
328
|
-
this.UserShares = [];
|
|
329
|
-
for (const permission of existingShares) {
|
|
330
|
-
const user = this.allUsers.find(u => UUIDsEqual(u.ID, permission.UserID));
|
|
331
|
-
if (user) {
|
|
332
|
-
this.UserShares.push({
|
|
333
|
-
Permission: permission,
|
|
334
|
-
User: user,
|
|
335
|
-
IsNew: false,
|
|
336
|
-
MarkedForRemoval: false
|
|
337
|
-
});
|
|
338
|
-
}
|
|
14
|
+
set Dashboard(value) {
|
|
15
|
+
this._dashboard = value;
|
|
16
|
+
this.context = value
|
|
17
|
+
? {
|
|
18
|
+
ResourceID: value.ID,
|
|
19
|
+
ResourceName: value.Name ?? 'Untitled',
|
|
20
|
+
OwnerUserID: value.UserID,
|
|
21
|
+
OwnerDisplayName: value.User ?? 'You'
|
|
339
22
|
}
|
|
340
|
-
|
|
341
|
-
this.updateAvailableUsers();
|
|
342
|
-
}
|
|
343
|
-
catch (error) {
|
|
344
|
-
console.error('Error loading share data:', error);
|
|
345
|
-
this.Error = 'Failed to load sharing data. Please try again.';
|
|
346
|
-
}
|
|
347
|
-
finally {
|
|
348
|
-
this.IsLoading = false;
|
|
349
|
-
this.cdr.detectChanges();
|
|
350
|
-
}
|
|
23
|
+
: null;
|
|
351
24
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
updateAvailableUsers() {
|
|
356
|
-
if (!this.Dashboard)
|
|
357
|
-
return;
|
|
358
|
-
const sharedUserIds = new Set(this.UserShares
|
|
359
|
-
.filter(s => !s.MarkedForRemoval)
|
|
360
|
-
.map(s => s.User.ID));
|
|
361
|
-
// Exclude dashboard owner and already shared users
|
|
362
|
-
this.AvailableUsers = this.allUsers.filter(user => !UUIDsEqual(user.ID, this.Dashboard.UserID) && !sharedUserIds.has(user.ID));
|
|
25
|
+
get Dashboard() {
|
|
26
|
+
return this._dashboard;
|
|
363
27
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return this.AvailableUsers
|
|
373
|
-
.filter(user => user.Name.toLowerCase().includes(filter) ||
|
|
374
|
-
(user.Email && user.Email.toLowerCase().includes(filter)))
|
|
375
|
-
.slice(0, 10);
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Check if there are unsaved changes
|
|
379
|
-
*/
|
|
380
|
-
get HasChanges() {
|
|
381
|
-
return this.UserShares.some(s => s.IsNew || s.MarkedForRemoval || s.Permission.Dirty);
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Add a user to the share list
|
|
385
|
-
*/
|
|
386
|
-
async addUserShare(user) {
|
|
387
|
-
if (!this.Dashboard)
|
|
388
|
-
return;
|
|
389
|
-
const md = new Metadata();
|
|
390
|
-
const permission = await md.GetEntityObject('MJ: Dashboard Permissions');
|
|
391
|
-
permission.NewRecord();
|
|
392
|
-
permission.DashboardID = this.Dashboard.ID;
|
|
393
|
-
permission.UserID = user.ID;
|
|
394
|
-
permission.CanRead = true; // Default to read access
|
|
395
|
-
permission.CanEdit = false;
|
|
396
|
-
permission.CanDelete = false;
|
|
397
|
-
permission.CanShare = false;
|
|
398
|
-
this.UserShares.push({
|
|
399
|
-
Permission: permission,
|
|
400
|
-
User: user,
|
|
401
|
-
IsNew: true,
|
|
402
|
-
MarkedForRemoval: false
|
|
28
|
+
Result = new EventEmitter();
|
|
29
|
+
context = null;
|
|
30
|
+
adapter = new DashboardShareAdapter();
|
|
31
|
+
_dashboard = null;
|
|
32
|
+
onResult(result) {
|
|
33
|
+
this.Result.emit({
|
|
34
|
+
Action: result.Action,
|
|
35
|
+
Dashboard: result.Action === 'save' && this._dashboard ? this._dashboard : undefined
|
|
403
36
|
});
|
|
404
|
-
this.updateAvailableUsers();
|
|
405
|
-
this.UserSearchFilter = '';
|
|
406
|
-
this.cdr.detectChanges();
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* Mark a share for removal
|
|
410
|
-
*/
|
|
411
|
-
removeUserShare(share) {
|
|
412
|
-
if (share.IsNew) {
|
|
413
|
-
// If it's new, just remove from the array
|
|
414
|
-
this.UserShares = this.UserShares.filter(s => s !== share);
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
// Otherwise mark for removal
|
|
418
|
-
share.MarkedForRemoval = true;
|
|
419
|
-
}
|
|
420
|
-
this.updateAvailableUsers();
|
|
421
|
-
this.cdr.detectChanges();
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Undo removal of a share
|
|
425
|
-
*/
|
|
426
|
-
undoRemove(share) {
|
|
427
|
-
share.MarkedForRemoval = false;
|
|
428
|
-
this.updateAvailableUsers();
|
|
429
|
-
this.cdr.detectChanges();
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* Get shares that are not marked for removal
|
|
433
|
-
*/
|
|
434
|
-
get ActiveShares() {
|
|
435
|
-
return this.UserShares.filter(s => !s.MarkedForRemoval);
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Get shares marked for removal
|
|
439
|
-
*/
|
|
440
|
-
get RemovedShares() {
|
|
441
|
-
return this.UserShares.filter(s => s.MarkedForRemoval);
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Toggle CanEdit permission (also enables CanRead)
|
|
445
|
-
*/
|
|
446
|
-
toggleCanEdit(share) {
|
|
447
|
-
share.Permission.CanEdit = !share.Permission.CanEdit;
|
|
448
|
-
if (share.Permission.CanEdit) {
|
|
449
|
-
share.Permission.CanRead = true;
|
|
450
|
-
}
|
|
451
|
-
this.cdr.detectChanges();
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* Toggle CanDelete permission (also enables CanRead and CanEdit)
|
|
455
|
-
*/
|
|
456
|
-
toggleCanDelete(share) {
|
|
457
|
-
share.Permission.CanDelete = !share.Permission.CanDelete;
|
|
458
|
-
if (share.Permission.CanDelete) {
|
|
459
|
-
share.Permission.CanRead = true;
|
|
460
|
-
share.Permission.CanEdit = true;
|
|
461
|
-
}
|
|
462
|
-
this.cdr.detectChanges();
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Toggle CanShare permission (also enables CanRead)
|
|
466
|
-
*/
|
|
467
|
-
toggleCanShare(share) {
|
|
468
|
-
share.Permission.CanShare = !share.Permission.CanShare;
|
|
469
|
-
if (share.Permission.CanShare) {
|
|
470
|
-
share.Permission.CanRead = true;
|
|
471
|
-
}
|
|
472
|
-
this.cdr.detectChanges();
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* Save all permission changes
|
|
476
|
-
*/
|
|
477
|
-
async onSave() {
|
|
478
|
-
if (!this.HasChanges) {
|
|
479
|
-
this.onCancel();
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
this.IsLoading = true;
|
|
483
|
-
this.Error = null;
|
|
484
|
-
this.cdr.detectChanges();
|
|
485
|
-
try {
|
|
486
|
-
// Process removals first
|
|
487
|
-
for (const share of this.UserShares.filter(s => s.MarkedForRemoval && !s.IsNew)) {
|
|
488
|
-
const deleted = await share.Permission.Delete();
|
|
489
|
-
if (!deleted) {
|
|
490
|
-
throw new Error(`Failed to remove share for ${share.User.Name}`);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
// Process new and modified shares
|
|
494
|
-
for (const share of this.UserShares.filter(s => !s.MarkedForRemoval && (s.IsNew || s.Permission.Dirty))) {
|
|
495
|
-
const saved = await share.Permission.Save();
|
|
496
|
-
if (!saved) {
|
|
497
|
-
throw new Error(`Failed to save share for ${share.User.Name}: ${share.Permission.LatestResult?.Message}`);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
// Refresh the engine cache
|
|
501
|
-
await DashboardEngine.Instance.Config(true);
|
|
502
|
-
this.Result.emit({
|
|
503
|
-
Action: 'save',
|
|
504
|
-
Dashboard: this.Dashboard
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
catch (error) {
|
|
508
|
-
console.error('Error saving shares:', error);
|
|
509
|
-
this.Error = error instanceof Error ? error.message : 'Failed to save sharing settings.';
|
|
510
|
-
}
|
|
511
|
-
finally {
|
|
512
|
-
this.IsLoading = false;
|
|
513
|
-
this.cdr.detectChanges();
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* Cancel and close the dialog
|
|
518
|
-
*/
|
|
519
|
-
onCancel() {
|
|
520
|
-
this.Result.emit({ Action: 'cancel' });
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* Get initials for a user (for avatar display)
|
|
524
|
-
*/
|
|
525
|
-
getUserInitials(user) {
|
|
526
|
-
const name = user.Name || user.Email || '?';
|
|
527
|
-
const parts = name.split(' ');
|
|
528
|
-
if (parts.length >= 2) {
|
|
529
|
-
return (parts[0][0] + parts[1][0]).toUpperCase();
|
|
530
|
-
}
|
|
531
|
-
return name.substring(0, 2).toUpperCase();
|
|
532
37
|
}
|
|
533
|
-
static ɵfac = function DashboardShareDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashboardShareDialogComponent)(
|
|
534
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardShareDialogComponent, selectors: [["mj-dashboard-share-dialog"]], inputs: { Visible: "Visible", Dashboard: "Dashboard" }, outputs: { Result: "Result" }, standalone: false,
|
|
535
|
-
i0.ɵɵ
|
|
38
|
+
static ɵfac = function DashboardShareDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashboardShareDialogComponent)(); };
|
|
39
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardShareDialogComponent, selectors: [["mj-dashboard-share-dialog"]], inputs: { Visible: "Visible", Dashboard: "Dashboard" }, outputs: { Result: "Result" }, standalone: false, decls: 1, vars: 3, consts: [[3, "Result", "Visible", "Context", "Adapter"]], template: function DashboardShareDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
40
|
+
i0.ɵɵelementStart(0, "mj-resource-share-dialog", 0);
|
|
41
|
+
i0.ɵɵlistener("Result", function DashboardShareDialogComponent_Template_mj_resource_share_dialog_Result_0_listener($event) { return ctx.onResult($event); });
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
536
43
|
} if (rf & 2) {
|
|
537
|
-
i0.ɵɵ
|
|
538
|
-
} }, dependencies: [i1.
|
|
44
|
+
i0.ɵɵproperty("Visible", ctx.Visible)("Context", ctx.context)("Adapter", ctx.adapter);
|
|
45
|
+
} }, dependencies: [i1.GenericShareDialogComponent], encapsulation: 2 });
|
|
539
46
|
}
|
|
540
47
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardShareDialogComponent, [{
|
|
541
48
|
type: Component,
|
|
542
|
-
args: [{ standalone: false, selector: 'mj-dashboard-share-dialog', encapsulation: ViewEncapsulation.None, template: "@if (Visible) {\n <mj-window\n [Visible]=\"true\"\n [Width]=\"560\"\n [MinHeight]=\"200\"\n [Resizable]=\"false\"\n [Draggable]=\"true\"\n (Close)=\"onCancel()\"\n class=\"mj-share-dialog-window\">\n <mj-window-titlebar>\n <div class=\"share-dialog-header\">\n <i class=\"fa-solid fa-share-nodes\"></i>\n <span>Share \"{{ Dashboard?.Name }}\"</span>\n </div>\n </mj-window-titlebar>\n <div class=\"share-dialog-body\">\n <!-- Error Alert -->\n @if (Error) {\n <div class=\"share-alert share-alert-error\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ Error }}</span>\n </div>\n }\n <!-- Add Users Section -->\n <div class=\"share-section\">\n <div class=\"share-search-box\">\n <i class=\"fa-solid fa-search\"></i>\n <input\n type=\"text\"\n placeholder=\"Add people by name or email...\"\n [(ngModel)]=\"UserSearchFilter\"\n [disabled]=\"IsLoading\">\n </div>\n <!-- Available Users Dropdown -->\n @if (FilteredAvailableUsers.length > 0) {\n <div class=\"share-user-dropdown\">\n @for (user of FilteredAvailableUsers; track user.ID) {\n <button type=\"button\" class=\"share-user-option\" (click)=\"addUserShare(user)\" [disabled]=\"IsLoading\">\n <span class=\"share-avatar\">{{ getUserInitials(user) }}</span>\n <span class=\"share-user-name\">{{ user.Name }}</span>\n @if (user.Email) {\n <span class=\"share-user-email\">{{ user.Email }}</span>\n }\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n }\n </div>\n }\n @if (UserSearchFilter && FilteredAvailableUsers.length === 0) {\n <div class=\"share-no-results\">\n No users found matching \"{{ UserSearchFilter }}\"\n </div>\n }\n </div>\n <!-- People with Access -->\n <div class=\"share-section\">\n <div class=\"share-section-label\">People with access</div>\n <!-- Owner -->\n <div class=\"share-person share-owner\">\n <span class=\"share-avatar share-avatar-owner\">\n <i class=\"fa-solid fa-crown\"></i>\n </span>\n <div class=\"share-person-info\">\n <span class=\"share-person-name\">{{ Dashboard?.User || 'You' }}</span>\n <span class=\"share-person-role\">Owner</span>\n </div>\n </div>\n <!-- Shared Users -->\n @for (share of ActiveShares; track share.User.ID) {\n <div class=\"share-person\" [class.share-person-new]=\"share.IsNew\" [class.share-person-modified]=\"share.Permission.Dirty\">\n <span class=\"share-avatar\">{{ getUserInitials(share.User) }}</span>\n <div class=\"share-person-info\">\n <span class=\"share-person-name\">\n {{ share.User.Name }}\n @if (share.IsNew) {\n <span class=\"share-badge-new\">New</span>\n }\n </span>\n @if (share.User.Email) {\n <span class=\"share-person-email\">{{ share.User.Email }}</span>\n }\n </div>\n <div class=\"share-permissions\">\n <label class=\"share-perm\" title=\"Can view\">\n <input type=\"checkbox\" [checked]=\"share.Permission.CanRead\" disabled>\n <i class=\"fa-solid fa-eye\"></i>\n </label>\n <label class=\"share-perm\" title=\"Can edit\">\n <input type=\"checkbox\" [checked]=\"share.Permission.CanEdit\" (change)=\"toggleCanEdit(share)\">\n <i class=\"fa-solid fa-edit\"></i>\n </label>\n <label class=\"share-perm\" title=\"Can delete\">\n <input type=\"checkbox\" [checked]=\"share.Permission.CanDelete\" (change)=\"toggleCanDelete(share)\">\n <i class=\"fa-solid fa-trash\"></i>\n </label>\n <label class=\"share-perm\" title=\"Can share\">\n <input type=\"checkbox\" [checked]=\"share.Permission.CanShare\" (change)=\"toggleCanShare(share)\">\n <i class=\"fa-solid fa-share\"></i>\n </label>\n </div>\n <button type=\"button\" class=\"share-remove-btn\" (click)=\"removeUserShare(share)\" title=\"Remove\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n @if (ActiveShares.length === 0) {\n <div class=\"share-empty\">\n <i class=\"fa-solid fa-user-lock\"></i>\n <span>Not shared with anyone yet</span>\n </div>\n }\n <!-- Pending Removals -->\n @if (RemovedShares.length > 0) {\n <div class=\"share-removed-section\">\n @for (share of RemovedShares; track share.User.ID) {\n <div class=\"share-removed-item\">\n <span class=\"share-avatar share-avatar-removed\">{{ getUserInitials(share.User) }}</span>\n <span class=\"share-removed-name\">{{ share.User.Name }}</span>\n <button type=\"button\" class=\"share-undo-btn\" (click)=\"undoRemove(share)\">\n <i class=\"fa-solid fa-undo\"></i> Undo\n </button>\n </div>\n }\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"share-footer\">\n @if (HasChanges) {\n <span class=\"share-changes-hint\">\n <i class=\"fa-solid fa-circle\"></i> Unsaved changes\n </span>\n }\n <div class=\"share-footer-actions\">\n <button type=\"button\" class=\"share-btn share-btn-secondary\" (click)=\"onCancel()\">\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"share-btn share-btn-primary\"\n (click)=\"onSave()\"\n [disabled]=\"!HasChanges || IsLoading\">\n @if (IsLoading) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Saving...\n } @else {\n Save\n }\n </button>\n </div>\n </div>\n </div>\n </mj-window>\n}\n", styles: ["/* Dashboard Share Dialog - Compact Design */\n\n/* Window Styling - use specific class to override Kendo defaults */\n.mj-share-dialog-window.k-window {\n border-radius: 12px !important;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;\n overflow: hidden !important;\n}\n\n.mj-share-dialog-window .k-window-titlebar {\n background: var(--mj-brand-primary) !important;\n border: none !important;\n padding: 16px 20px !important;\n}\n\n.mj-share-dialog-window .k-window-titlebar .k-window-title {\n display: none !important;\n}\n\n.mj-share-dialog-window .k-window-titlebar .k-window-actions .k-button {\n background: color-mix(in srgb, var(--mj-bg-surface) 15%, transparent) !important;\n border: none !important;\n color: var(--mj-text-inverse) !important;\n border-radius: 4px !important;\n}\n\n.mj-share-dialog-window .k-window-titlebar .k-window-actions .k-button:hover {\n background: color-mix(in srgb, var(--mj-bg-surface) 25%, transparent) !important;\n}\n\n.mj-share-dialog-window .k-window-content {\n padding: 0 !important;\n background: var(--mj-bg-surface) !important;\n}\n\n/* Header */\n.share-dialog-header {\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--mj-text-inverse);\n font-size: 16px;\n font-weight: 500;\n}\n\n.share-dialog-header i {\n font-size: 18px;\n opacity: 0.9;\n}\n\n/* Body */\n.share-dialog-body {\n padding: 0;\n}\n\n/* Alert */\n.share-alert {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 20px;\n font-size: 13px;\n}\n\n.share-alert-error {\n background: var(--mj-bg-error);\n color: var(--mj-status-error);\n border-bottom: 1px solid var(--mj-border-error);\n}\n\n/* Sections */\n.share-section {\n padding: 16px 20px;\n}\n\n.share-section:not(:last-child) {\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.share-section-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 12px;\n}\n\n/* Search Box */\n.share-search-box {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n border: 1px solid transparent;\n transition: all 0.15s;\n}\n\n.share-search-box:focus-within {\n background: var(--mj-bg-surface);\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.share-search-box i {\n color: var(--mj-text-disabled);\n font-size: 14px;\n}\n\n.share-search-box input {\n flex: 1;\n border: none;\n background: transparent;\n font-size: 14px;\n outline: none;\n}\n\n.share-search-box input::placeholder {\n color: var(--mj-text-disabled);\n}\n\n/* User Dropdown */\n.share-user-dropdown {\n margin-top: 8px;\n max-height: 180px;\n overflow-y: auto;\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface-card);\n}\n\n/* User Option */\n.share-user-option {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 12px;\n border: none;\n background: transparent;\n cursor: pointer;\n text-align: left;\n transition: background 0.1s;\n}\n\n.share-user-option:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n}\n\n.share-user-option:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.share-user-option .share-user-name {\n flex: 1;\n font-size: 14px;\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n\n.share-user-option .share-user-email {\n font-size: 12px;\n color: var(--mj-text-secondary);\n margin-right: auto;\n}\n\n.share-user-option i.fa-plus {\n color: var(--mj-brand-primary);\n font-size: 12px;\n opacity: 0;\n transition: opacity 0.1s;\n}\n\n.share-user-option:hover i.fa-plus {\n opacity: 1;\n}\n\n.share-no-results {\n padding: 16px;\n text-align: center;\n color: var(--mj-text-secondary);\n font-size: 13px;\n}\n\n/* Avatar */\n.share-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n font-size: 12px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.share-avatar-owner {\n background: var(--mj-status-warning);\n font-size: 14px;\n}\n\n.share-avatar-removed {\n background: var(--mj-border-strong);\n}\n\n/* Person Row */\n.share-person {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 0;\n}\n\n.share-person:not(:last-child) {\n border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.share-person-new {\n background: color-mix(in srgb, var(--mj-status-success) 5%, transparent);\n margin: 0 -20px;\n padding: 10px 20px;\n}\n\n.share-person-modified {\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, transparent);\n margin: 0 -20px;\n padding: 10px 20px;\n}\n\n.share-person-info {\n flex: 1;\n min-width: 0;\n}\n\n.share-person-name {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n\n.share-person-email {\n font-size: 12px;\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.share-person-role {\n font-size: 12px;\n color: var(--mj-status-warning);\n font-weight: 500;\n}\n\n.share-badge-new {\n padding: 2px 6px;\n background: var(--mj-status-success);\n color: var(--mj-text-inverse);\n font-size: 10px;\n font-weight: 600;\n border-radius: 4px;\n}\n\n/* Permissions */\n.share-permissions {\n display: flex;\n gap: 4px;\n}\n\n.share-perm {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.1s;\n position: relative;\n}\n\n.share-perm input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n\n.share-perm i {\n font-size: 12px;\n color: var(--mj-border-strong);\n transition: color 0.1s;\n}\n\n.share-perm:hover {\n background: var(--mj-bg-surface-sunken);\n}\n\n.share-perm input:checked + i {\n color: var(--mj-brand-primary);\n}\n\n.share-perm input:disabled + i {\n color: var(--mj-brand-primary);\n opacity: 0.7;\n}\n\n/* Remove Button */\n.share-remove-btn {\n width: 28px;\n height: 28px;\n border: none;\n background: transparent;\n color: var(--mj-border-strong);\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.1s;\n}\n\n.share-remove-btn:hover {\n background: var(--mj-bg-error);\n color: var(--mj-status-error);\n}\n\n/* Empty State */\n.share-empty {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 20px;\n color: var(--mj-text-disabled);\n font-size: 13px;\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n justify-content: center;\n}\n\n.share-empty i {\n font-size: 16px;\n}\n\n/* Removed Section */\n.share-removed-section {\n margin-top: 12px;\n padding: 12px;\n background: var(--mj-bg-warning);\n border-radius: 8px;\n border: 1px solid var(--mj-border-warning);\n}\n\n.share-removed-item {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 6px 0;\n}\n\n.share-removed-name {\n flex: 1;\n font-size: 13px;\n color: var(--mj-text-secondary);\n text-decoration: line-through;\n}\n\n.share-undo-btn {\n padding: 4px 10px;\n border: none;\n background: transparent;\n color: var(--mj-status-warning);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.share-undo-btn:hover {\n text-decoration: underline;\n}\n\n/* Footer */\n.share-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: var(--mj-bg-surface-card);\n border-top: 1px solid var(--mj-border-default);\n}\n\n.share-changes-hint {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-brand-primary);\n}\n\n.share-changes-hint i {\n font-size: 6px;\n}\n\n.share-footer-actions {\n display: flex;\n gap: 10px;\n margin-left: auto;\n}\n\n.share-btn {\n padding: 8px 18px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.share-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.share-btn-secondary {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong);\n color: var(--mj-text-secondary);\n}\n\n.share-btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-card);\n border-color: var(--mj-border-strong);\n}\n\n.share-btn-primary {\n background: var(--mj-brand-primary);\n border: none;\n color: var(--mj-text-inverse);\n}\n\n.share-btn-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* Owner row specific styling */\n.share-owner {\n background: var(--mj-bg-warning);\n margin: 0 -20px;\n padding: 10px 20px;\n border-radius: 0;\n}\n"] }]
|
|
543
|
-
|
|
49
|
+
args: [{
|
|
50
|
+
standalone: false,
|
|
51
|
+
selector: 'mj-dashboard-share-dialog',
|
|
52
|
+
template: `
|
|
53
|
+
<mj-resource-share-dialog
|
|
54
|
+
[Visible]="Visible"
|
|
55
|
+
[Context]="context"
|
|
56
|
+
[Adapter]="adapter"
|
|
57
|
+
(Result)="onResult($event)">
|
|
58
|
+
</mj-resource-share-dialog>
|
|
59
|
+
`
|
|
60
|
+
}]
|
|
61
|
+
}], null, { Visible: [{
|
|
544
62
|
type: Input
|
|
545
63
|
}], Dashboard: [{
|
|
546
64
|
type: Input
|
|
547
65
|
}], Result: [{
|
|
548
66
|
type: Output
|
|
549
67
|
}] }); })();
|
|
550
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardShareDialogComponent, { className: "DashboardShareDialogComponent", filePath: "src/DashboardBrowser/dashboard-share-dialog.component.ts", lineNumber:
|
|
68
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardShareDialogComponent, { className: "DashboardShareDialogComponent", filePath: "src/DashboardBrowser/dashboard-share-dialog.component.ts", lineNumber: 35 }); })();
|
|
551
69
|
//# sourceMappingURL=dashboard-share-dialog.component.js.map
|