@memberjunction/ng-explorer-core 1.8.0 → 2.0.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/app-routing.module.d.ts +4 -0
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +60 -3
- package/dist/generic/Item.types.d.ts +5 -5
- package/dist/lib/app-view/application-view.component.d.ts +1 -2
- package/dist/lib/app-view/application-view.component.d.ts.map +1 -1
- package/dist/lib/app-view/application-view.component.js +25 -30
- package/dist/lib/auth-button/auth-button.component.js +1 -1
- package/dist/lib/base-browser-component/base-browser-component.d.ts +2 -1
- package/dist/lib/base-browser-component/base-browser-component.d.ts.map +1 -1
- package/dist/lib/base-browser-component/base-browser-component.js +7 -5
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts.map +1 -1
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +15 -3
- package/dist/lib/data-browser-component/data-browser.component.d.ts +2 -2
- package/dist/lib/data-browser-component/data-browser.component.d.ts.map +1 -1
- package/dist/lib/data-browser-component/data-browser.component.js +23 -9
- package/dist/lib/expansion-panel-component/expansion-panel-component.js +5 -5
- package/dist/lib/favorites/favorites.component.d.ts.map +1 -1
- package/dist/lib/favorites/favorites.component.js +11 -4
- package/dist/lib/files/files.component.d.ts +3 -1
- package/dist/lib/files/files.component.d.ts.map +1 -1
- package/dist/lib/files/files.component.js +20 -5
- package/dist/lib/generic/form-toolbar.js +1 -1
- package/dist/lib/generic/resource-container-component.js +1 -1
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.js +2 -2
- package/dist/lib/header/header.component.js +1 -1
- package/dist/lib/home-component/home.component.d.ts +5 -2
- package/dist/lib/home-component/home.component.d.ts.map +1 -1
- package/dist/lib/home-component/home.component.js +49 -51
- package/dist/lib/join-grid/join-grid.component.d.ts +31 -0
- package/dist/lib/join-grid/join-grid.component.d.ts.map +1 -0
- package/dist/lib/join-grid/join-grid.component.js +222 -0
- package/dist/lib/list-view/list-view.component.d.ts.map +1 -1
- package/dist/lib/list-view/list-view.component.js +15 -3
- package/dist/lib/navigation/navigation.component.d.ts +2 -2
- package/dist/lib/navigation/navigation.component.d.ts.map +1 -1
- package/dist/lib/navigation/navigation.component.js +45 -19
- package/dist/lib/query-browser-component/query-browser.component.d.ts.map +1 -1
- package/dist/lib/query-browser-component/query-browser.component.js +17 -5
- package/dist/lib/report-browser-component/report-browser.component.d.ts.map +1 -1
- package/dist/lib/report-browser-component/report-browser.component.js +15 -3
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/query-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/report-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +5 -4
- package/dist/lib/single-application/single-application.component.js +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +2 -2
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +1 -1
- package/dist/lib/single-entity/single-entity.component.js +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts +14 -4
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +232 -120
- package/dist/lib/single-query/single-query.component.d.ts +1 -1
- package/dist/lib/single-query/single-query.component.js +1 -1
- package/dist/lib/single-record/single-record.component.js +1 -1
- package/dist/lib/single-report/single-report.component.d.ts +1 -1
- package/dist/lib/single-report/single-report.component.js +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +1 -1
- package/dist/lib/single-view/single-view.component.d.ts +1 -1
- package/dist/lib/single-view/single-view.component.js +2 -2
- package/dist/lib/user-notifications/user-notifications.component.js +4 -4
- package/dist/lib/user-profile/user-profile.component.js +1 -1
- package/package.json +18 -18
|
@@ -8,63 +8,103 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Component } from '@angular/core';
|
|
11
|
-
import { LogError, Metadata, RunView } from '@memberjunction/core';
|
|
11
|
+
import { LogError, LogStatus, Metadata, RunView } from '@memberjunction/core';
|
|
12
|
+
import { Subject, debounceTime } from 'rxjs';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
import * as i1 from "@angular/router";
|
|
14
15
|
import * as i2 from "@memberjunction/ng-shared";
|
|
15
16
|
import * as i3 from "@angular/common";
|
|
16
|
-
import * as i4 from "@angular
|
|
17
|
-
import * as i5 from "@progress/kendo-angular-
|
|
18
|
-
import * as i6 from "@progress/kendo-angular-
|
|
19
|
-
import * as i7 from "@progress/kendo-angular-
|
|
20
|
-
import * as i8 from "@progress/kendo-angular-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
i0.ɵɵelement(0, "kendo-loader", 4);
|
|
17
|
+
import * as i4 from "@progress/kendo-angular-grid";
|
|
18
|
+
import * as i5 from "@progress/kendo-angular-dialog";
|
|
19
|
+
import * as i6 from "@progress/kendo-angular-indicators";
|
|
20
|
+
import * as i7 from "@progress/kendo-angular-buttons";
|
|
21
|
+
import * as i8 from "@progress/kendo-angular-inputs";
|
|
22
|
+
const _c0 = a0 => ({ "list-selected": a0 });
|
|
23
|
+
function SingleListDetailComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelement(0, "span", 12);
|
|
25
25
|
} }
|
|
26
|
-
function
|
|
27
|
-
i0.ɵɵelement(0, "kendo-
|
|
26
|
+
function SingleListDetailComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵelement(0, "kendo-loader", 9);
|
|
28
|
+
} }
|
|
29
|
+
function SingleListDetailComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelement(0, "kendo-grid", 10);
|
|
28
31
|
} if (rf & 2) {
|
|
29
|
-
const
|
|
30
|
-
i0.ɵɵproperty("data",
|
|
32
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
33
|
+
i0.ɵɵproperty("data", ctx_r2.filteredGridData);
|
|
31
34
|
} }
|
|
32
|
-
function
|
|
33
|
-
i0.ɵɵelement(0, "kendo-loader",
|
|
35
|
+
function SingleListDetailComponent_kendo_dialog_15_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵelement(0, "kendo-loader", 9);
|
|
34
37
|
} }
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
i0.ɵɵelementStart(0, "
|
|
38
|
-
i0.ɵɵ
|
|
39
|
-
i0.ɵɵ
|
|
38
|
+
function SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
40
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
41
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const userView_r6 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.removeViewFromSelectedList(userView_r6)); });
|
|
42
|
+
i0.ɵɵelement(1, "span", 25);
|
|
43
|
+
i0.ɵɵtext(2, " Remove ");
|
|
44
|
+
i0.ɵɵelementEnd();
|
|
45
|
+
} }
|
|
46
|
+
function SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
48
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
49
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const userView_r6 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.addViewToSelectedList(userView_r6)); });
|
|
50
|
+
i0.ɵɵelementStart(1, "div", 27);
|
|
51
|
+
i0.ɵɵelement(2, "span", 4);
|
|
52
|
+
i0.ɵɵtext(3, " Add ");
|
|
53
|
+
i0.ɵɵelementEnd()();
|
|
54
|
+
} }
|
|
55
|
+
function SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
56
|
+
i0.ɵɵelementStart(0, "div", 20)(1, "div", 21);
|
|
57
|
+
i0.ɵɵtext(2);
|
|
58
|
+
i0.ɵɵelementEnd();
|
|
59
|
+
i0.ɵɵtemplate(3, SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Conditional_3_Template, 3, 0, "button", 22)(4, SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Conditional_4_Template, 4, 0, "button", 23);
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
i0.ɵɵelement(5, "hr");
|
|
40
62
|
} if (rf & 2) {
|
|
41
|
-
const
|
|
42
|
-
i0.ɵɵ
|
|
43
|
-
i0.ɵɵ
|
|
44
|
-
i0.ɵɵ
|
|
63
|
+
const userView_r6 = ctx.$implicit;
|
|
64
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
65
|
+
i0.ɵɵadvance();
|
|
66
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0, ctx_r2.userViewsToAdd.includes(userView_r6)));
|
|
67
|
+
i0.ɵɵadvance();
|
|
68
|
+
i0.ɵɵtextInterpolate1(" ", userView_r6.Name, " ");
|
|
69
|
+
i0.ɵɵadvance();
|
|
70
|
+
i0.ɵɵconditional(ctx_r2.userViewsToAdd.includes(userView_r6) ? 3 : 4);
|
|
45
71
|
} }
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
i0.ɵɵ
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
i0.ɵɵ
|
|
72
|
+
function SingleListDetailComponent_kendo_dialog_15_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0.ɵɵrepeaterCreate(0, SingleListDetailComponent_kendo_dialog_15_Conditional_6_For_1_Template, 6, 5, null, null, i0.ɵɵrepeaterTrackByIdentity);
|
|
74
|
+
} if (rf & 2) {
|
|
75
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
76
|
+
i0.ɵɵrepeater(ctx_r2.userViews);
|
|
77
|
+
} }
|
|
78
|
+
function SingleListDetailComponent_kendo_dialog_15_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
80
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 13);
|
|
81
|
+
i0.ɵɵlistener("close", function SingleListDetailComponent_kendo_dialog_15_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleAddDialog(false)); });
|
|
82
|
+
i0.ɵɵelementStart(1, "div", 14);
|
|
83
|
+
i0.ɵɵelement(2, "kendo-textbox", 15);
|
|
84
|
+
i0.ɵɵelementEnd();
|
|
85
|
+
i0.ɵɵelement(3, "hr");
|
|
86
|
+
i0.ɵɵelementStart(4, "div", 16);
|
|
87
|
+
i0.ɵɵtemplate(5, SingleListDetailComponent_kendo_dialog_15_Conditional_5_Template, 1, 0, "kendo-loader", 9)(6, SingleListDetailComponent_kendo_dialog_15_Conditional_6_Template, 2, 0);
|
|
54
88
|
i0.ɵɵelementEnd();
|
|
55
|
-
i0.ɵɵelementStart(
|
|
56
|
-
i0.ɵɵlistener("click", function
|
|
57
|
-
i0.ɵɵtext(
|
|
89
|
+
i0.ɵɵelementStart(7, "kendo-dialog-actions", 17)(8, "button", 18);
|
|
90
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_kendo_dialog_15_Template_button_click_8_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.addTolist()); });
|
|
91
|
+
i0.ɵɵtext(9, " Done ");
|
|
92
|
+
i0.ɵɵelementEnd();
|
|
93
|
+
i0.ɵɵelementStart(10, "button", 19);
|
|
94
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_kendo_dialog_15_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleAddDialog(false)); });
|
|
95
|
+
i0.ɵɵtext(11, " Cancel ");
|
|
58
96
|
i0.ɵɵelementEnd()()();
|
|
59
97
|
} if (rf & 2) {
|
|
60
|
-
const
|
|
98
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
61
99
|
i0.ɵɵproperty("minWidth", 250)("width", 650)("height", 550);
|
|
62
|
-
i0.ɵɵadvance();
|
|
63
|
-
i0.ɵɵ
|
|
100
|
+
i0.ɵɵadvance(2);
|
|
101
|
+
i0.ɵɵproperty("clearButton", true);
|
|
102
|
+
i0.ɵɵadvance(3);
|
|
103
|
+
i0.ɵɵconditional(ctx_r2.showAddLoader ? 5 : 6);
|
|
64
104
|
i0.ɵɵadvance(3);
|
|
65
|
-
i0.ɵɵproperty("disabled",
|
|
105
|
+
i0.ɵɵproperty("disabled", ctx_r2.showAddLoader);
|
|
66
106
|
i0.ɵɵadvance(2);
|
|
67
|
-
i0.ɵɵproperty("disabled",
|
|
107
|
+
i0.ɵɵproperty("disabled", ctx_r2.showAddLoader);
|
|
68
108
|
} }
|
|
69
109
|
export class SingleListDetailComponent {
|
|
70
110
|
constructor(router, route, sharedService) {
|
|
@@ -73,141 +113,213 @@ export class SingleListDetailComponent {
|
|
|
73
113
|
this.sharedService = sharedService;
|
|
74
114
|
this.listRecord = null;
|
|
75
115
|
this.showLoader = false;
|
|
76
|
-
this.
|
|
116
|
+
this.sourceGridData = [];
|
|
117
|
+
this.filteredGridData = [];
|
|
77
118
|
this.listName = "";
|
|
78
119
|
this.showAddDialog = false;
|
|
79
120
|
this.showAddLoader = false;
|
|
80
|
-
this.userViews =
|
|
81
|
-
this.
|
|
121
|
+
this.userViews = null;
|
|
122
|
+
this._resizeDebounceTime = 250;
|
|
123
|
+
this.filterItemsSubject = new Subject();
|
|
124
|
+
this.filter = '';
|
|
125
|
+
this.userViewsToAdd = [];
|
|
126
|
+
this.filterItemsSubject
|
|
127
|
+
.pipe(debounceTime(this._resizeDebounceTime))
|
|
128
|
+
.subscribe(() => this.filterItems(this.filter));
|
|
82
129
|
}
|
|
83
130
|
ngOnInit() {
|
|
84
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
this.showLoader = true;
|
|
86
132
|
this.route.paramMap.subscribe((params) => __awaiter(this, void 0, void 0, function* () {
|
|
87
133
|
const listID = params.get('listID');
|
|
88
134
|
if (listID) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
135
|
+
yield this.loadList(listID);
|
|
136
|
+
}
|
|
137
|
+
}));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
loadList(listID) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
if (listID) {
|
|
143
|
+
this.showLoader = true;
|
|
144
|
+
const md = new Metadata();
|
|
145
|
+
const rv = new RunView();
|
|
146
|
+
const listRunViewResult = yield rv.RunView({
|
|
147
|
+
EntityName: 'Lists',
|
|
148
|
+
ResultType: 'entity_object',
|
|
149
|
+
ExtraFilter: `ID = '${listID}'`
|
|
150
|
+
}, md.CurrentUser);
|
|
151
|
+
if (!listRunViewResult.Success || listRunViewResult.Results.length === 0) {
|
|
152
|
+
LogError("Error loading list with ID " + listID);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const listEntity = listRunViewResult.Results[0];
|
|
156
|
+
const entity = md.EntityFromEntityID(listEntity.EntityID);
|
|
157
|
+
if (!entity) {
|
|
158
|
+
LogError("Error fetching EntityInfo with ID " + listEntity.EntityID);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.listName = listEntity.Name;
|
|
162
|
+
this.listRecord = listEntity;
|
|
163
|
+
const runViewResult = yield rv.RunView({
|
|
164
|
+
EntityName: 'List Details',
|
|
165
|
+
ResultType: 'entity_object',
|
|
166
|
+
ExtraFilter: `ListID = '${listID}'`
|
|
167
|
+
}, md.CurrentUser);
|
|
168
|
+
if (!runViewResult.Success) {
|
|
169
|
+
LogError("Error loading list details for list with ID " + listID);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const listDetailRecords = runViewResult.Results;
|
|
173
|
+
if (listDetailRecords.length > 0) {
|
|
174
|
+
const recordIDs = listDetailRecords.map(ld => `'${ld.RecordID}'`).join(',');
|
|
175
|
+
let extraFilter = `ID IN (${recordIDs})`;
|
|
176
|
+
const rvResult = yield rv.RunView({
|
|
177
|
+
EntityName: entity.Name,
|
|
178
|
+
ExtraFilter: extraFilter
|
|
112
179
|
}, md.CurrentUser);
|
|
113
|
-
if (!
|
|
114
|
-
LogError(
|
|
180
|
+
if (!rvResult.Success) {
|
|
181
|
+
LogError(`Error loading ${entity.Name} records with extra filter ${extraFilter}`);
|
|
115
182
|
return;
|
|
116
183
|
}
|
|
117
|
-
|
|
118
|
-
if (listDetailRecords.length > 0) {
|
|
119
|
-
const recordIDs = listDetailRecords.map(ld => ld.RecordID).join(',');
|
|
120
|
-
let extraFilter = `ID IN (${recordIDs})`;
|
|
121
|
-
const rvResult = yield rv.RunView({
|
|
122
|
-
EntityName: entity.Name,
|
|
123
|
-
ExtraFilter: extraFilter
|
|
124
|
-
}, md.CurrentUser);
|
|
125
|
-
if (!rvResult.Success) {
|
|
126
|
-
LogError(`Error loading ${entity.Name} records with extra filter ${extraFilter}`);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
this.gridData = rvResult.Results;
|
|
130
|
-
}
|
|
184
|
+
this.sourceGridData = this.filteredGridData = rvResult.Results;
|
|
131
185
|
}
|
|
132
186
|
this.showLoader = false;
|
|
133
|
-
}
|
|
187
|
+
}
|
|
134
188
|
});
|
|
135
189
|
}
|
|
136
190
|
toggleAddDialog(show) {
|
|
137
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
return;
|
|
139
192
|
this.showAddDialog = show;
|
|
140
|
-
if (show && this.userViews
|
|
193
|
+
if (show && !this.userViews) {
|
|
141
194
|
yield this.loadEntityViews();
|
|
142
195
|
}
|
|
143
196
|
});
|
|
144
197
|
}
|
|
145
|
-
|
|
198
|
+
loadEntityViews() {
|
|
146
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
|
|
200
|
+
this.showAddLoader = true;
|
|
201
|
+
if (!this.listRecord || !this.listRecord.Entity) {
|
|
148
202
|
return;
|
|
149
203
|
}
|
|
150
|
-
this.showAddLoader = true;
|
|
151
204
|
const rv = new RunView();
|
|
152
205
|
const md = new Metadata();
|
|
153
206
|
const runViewResult = yield rv.RunView({
|
|
154
|
-
EntityName:
|
|
155
|
-
ExtraFilter: `UserID = ${md.CurrentUser.ID} AND EntityID = ${this.listRecord.EntityID}
|
|
207
|
+
EntityName: "User Views",
|
|
208
|
+
ExtraFilter: `UserID = '${md.CurrentUser.ID}' AND EntityID = '${this.listRecord.EntityID}'`,
|
|
156
209
|
ResultType: 'entity_object'
|
|
157
210
|
}, md.CurrentUser);
|
|
158
211
|
if (!runViewResult.Success) {
|
|
159
|
-
this.showAddLoader =
|
|
160
|
-
LogError(`Error loading ${this.listRecord.Entity} User View
|
|
212
|
+
this.showAddLoader = false;
|
|
213
|
+
LogError(`Error loading ${this.listRecord.Entity} User View records for user ${md.CurrentUser.ID}`);
|
|
161
214
|
return;
|
|
162
215
|
}
|
|
216
|
+
this.userViews = runViewResult.Results;
|
|
217
|
+
this.showAddLoader = false;
|
|
163
218
|
});
|
|
164
219
|
}
|
|
165
|
-
|
|
220
|
+
addTolist() {
|
|
166
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
this.showAddLoader = true;
|
|
168
222
|
if (!this.listRecord || !this.listRecord.Entity) {
|
|
169
223
|
return;
|
|
170
224
|
}
|
|
225
|
+
this.showAddLoader = true;
|
|
171
226
|
const rv = new RunView();
|
|
172
227
|
const md = new Metadata();
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
228
|
+
const hashMap = new Map();
|
|
229
|
+
for (const userView of this.userViewsToAdd) {
|
|
230
|
+
const userView = this.userViewsToAdd[0];
|
|
231
|
+
const runViewResult = yield rv.RunView({
|
|
232
|
+
EntityName: "User Views",
|
|
233
|
+
ViewEntity: userView,
|
|
234
|
+
Fields: ["ID"]
|
|
235
|
+
}, md.CurrentUser);
|
|
236
|
+
if (!runViewResult.Success) {
|
|
237
|
+
LogError(`Error loading view ${userView.Name} for user ${md.CurrentUser.ID}`);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const records = runViewResult.Results;
|
|
241
|
+
for (const record of records) {
|
|
242
|
+
hashMap.set(record.ID, record);
|
|
243
|
+
}
|
|
182
244
|
}
|
|
183
|
-
|
|
184
|
-
|
|
245
|
+
LogStatus(`Adding ${hashMap.size} records to list ${this.listRecord.ID}`);
|
|
246
|
+
//now add the records to the list
|
|
247
|
+
let count = 0;
|
|
248
|
+
for (const [recordID, record] of hashMap) {
|
|
249
|
+
const listDetail = yield md.GetEntityObject("List Details");
|
|
250
|
+
listDetail.ListID = this.listRecord.ID;
|
|
251
|
+
listDetail.RecordID = recordID.toString();
|
|
252
|
+
listDetail.ContextCurrentUser = md.CurrentUser;
|
|
253
|
+
listDetail.Save().then((result) => {
|
|
254
|
+
if (!result) {
|
|
255
|
+
LogError(`Error adding record ${recordID} to list ${this.listRecord.ID}`, undefined, listDetail.LatestResult);
|
|
256
|
+
}
|
|
257
|
+
count = count + 1;
|
|
258
|
+
if (count === hashMap.size) {
|
|
259
|
+
this.showAddLoader = false;
|
|
260
|
+
this.toggleAddDialog(false);
|
|
261
|
+
this.loadList(this.listRecord.ID.toString());
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
onKeyup(Value) {
|
|
268
|
+
this.filter = Value;
|
|
269
|
+
this.filterItemsSubject.next(true);
|
|
270
|
+
}
|
|
271
|
+
filterItems(filter) {
|
|
272
|
+
if (!filter) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (!this.sourceGridData) {
|
|
276
|
+
this.sourceGridData = [];
|
|
277
|
+
}
|
|
278
|
+
const toLower = filter.toLowerCase();
|
|
279
|
+
this.filteredGridData = this.sourceGridData.filter((data) => {
|
|
280
|
+
const name = data.Get("Name") || '';
|
|
281
|
+
return name.toLowerCase().includes(toLower);
|
|
185
282
|
});
|
|
186
283
|
}
|
|
284
|
+
addViewToSelectedList(view) {
|
|
285
|
+
this.userViewsToAdd.push(view);
|
|
286
|
+
}
|
|
287
|
+
removeViewFromSelectedList(view) {
|
|
288
|
+
this.userViewsToAdd.filter((userView) => userView.ID !== view.ID);
|
|
289
|
+
}
|
|
187
290
|
}
|
|
188
291
|
SingleListDetailComponent.ɵfac = function SingleListDetailComponent_Factory(t) { return new (t || SingleListDetailComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.SharedService)); };
|
|
189
|
-
SingleListDetailComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleListDetailComponent, selectors: [["mj-list-detail"]], decls:
|
|
190
|
-
|
|
292
|
+
SingleListDetailComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleListDetailComponent, selectors: [["mj-list-detail"]], decls: 16, vars: 5, consts: [["searchInput", ""], [1, "app-container"], [1, "flex-display-row-header"], ["kendobutton", "", "themeColor", "info", 1, "add-btn", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "title-wrapper"], [1, "search"], ["type", "text", "placeholder", "Search in List", "size", "large", "rounded", "large", "fillMode", "solid", 3, "keyup", "clearButton"], ["kendoTextBoxPrefixTemplate", "", 3, "showSeparator"], ["type", "converging-spinner"], [3, "data"], ["class", "dialog-wrapper", "title", "Select Views to Add", 3, "minWidth", "width", "height", "close", 4, "ngIf"], [1, "fa-solid", "fa-magnifying-glass", "margin-left-small"], ["title", "Select Views to Add", 1, "dialog-wrapper", 3, "close", "minWidth", "width", "height"], [1, "search-header"], ["id", "listSearch", "placeholder", "Search Views...", "kendoTextBox", "", 1, "search-bar", 3, "clearButton"], [1, "overflow-y-scroll"], [1, "popup-actions-btn"], ["kendoButton", "", "themeColor", "info", 1, "cancel-btn", 3, "click", "disabled"], ["kendoButton", "", "fillMode", "outline", "themeColor", "info", 1, "yes-btn", 3, "click", "disabled"], [1, "list-item"], [1, "list-text", 3, "ngClass"], ["kendoButton", "", 1, "btn-no-border", "btn-selected"], ["kendoButton", "", 1, "btn-no-border"], ["kendoButton", "", 1, "btn-no-border", "btn-selected", 3, "click"], [1, "fa-solid", "fa-minus"], ["kendoButton", "", 1, "btn-no-border", 3, "click"], [1, "btn-margin-right"]], template: function SingleListDetailComponent_Template(rf, ctx) { if (rf & 1) {
|
|
293
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
294
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h1");
|
|
191
295
|
i0.ɵɵtext(3);
|
|
192
296
|
i0.ɵɵelementEnd();
|
|
193
|
-
i0.ɵɵelementStart(4, "button",
|
|
194
|
-
i0.ɵɵlistener("click", function SingleListDetailComponent_Template_button_click_4_listener() { return ctx.toggleAddDialog(true); });
|
|
195
|
-
i0.ɵɵelement(5, "span",
|
|
196
|
-
i0.ɵɵtext(6, " Add
|
|
297
|
+
i0.ɵɵelementStart(4, "button", 3);
|
|
298
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.toggleAddDialog(true)); });
|
|
299
|
+
i0.ɵɵelement(5, "span", 4);
|
|
300
|
+
i0.ɵɵtext(6, " Add More Records ");
|
|
197
301
|
i0.ɵɵelementEnd()();
|
|
198
|
-
i0.ɵɵ
|
|
302
|
+
i0.ɵɵelementStart(7, "div")(8, "div", 5)(9, "div", 6)(10, "kendo-textbox", 7, 0);
|
|
303
|
+
i0.ɵɵlistener("keyup", function SingleListDetailComponent_Template_kendo_textbox_keyup_10_listener() { i0.ɵɵrestoreView(_r1); const searchInput_r2 = i0.ɵɵreference(11); return i0.ɵɵresetView(ctx.onKeyup(searchInput_r2.value)); });
|
|
304
|
+
i0.ɵɵtemplate(12, SingleListDetailComponent_ng_template_12_Template, 1, 0, "ng-template", 8);
|
|
305
|
+
i0.ɵɵelementEnd()()()();
|
|
306
|
+
i0.ɵɵtemplate(13, SingleListDetailComponent_Conditional_13_Template, 1, 0, "kendo-loader", 9)(14, SingleListDetailComponent_Conditional_14_Template, 1, 1, "kendo-grid", 10);
|
|
199
307
|
i0.ɵɵelementEnd();
|
|
200
|
-
i0.ɵɵtemplate(
|
|
308
|
+
i0.ɵɵtemplate(15, SingleListDetailComponent_kendo_dialog_15_Template, 12, 7, "kendo-dialog", 11);
|
|
201
309
|
} if (rf & 2) {
|
|
202
310
|
i0.ɵɵadvance(3);
|
|
203
311
|
i0.ɵɵtextInterpolate(ctx.listName);
|
|
204
|
-
i0.ɵɵadvance(
|
|
205
|
-
i0.ɵɵ
|
|
312
|
+
i0.ɵɵadvance(7);
|
|
313
|
+
i0.ɵɵproperty("clearButton", true);
|
|
314
|
+
i0.ɵɵadvance(2);
|
|
315
|
+
i0.ɵɵproperty("showSeparator", true);
|
|
316
|
+
i0.ɵɵadvance();
|
|
317
|
+
i0.ɵɵconditional(ctx.showLoader ? 13 : 14);
|
|
206
318
|
i0.ɵɵadvance(2);
|
|
207
319
|
i0.ɵɵproperty("ngIf", ctx.showAddDialog);
|
|
208
|
-
} }, dependencies: [i3.
|
|
320
|
+
} }, dependencies: [i3.NgClass, i3.NgIf, i4.GridComponent, i5.DialogComponent, i5.DialogActionsComponent, i6.LoaderComponent, i7.ButtonComponent, i8.TextBoxComponent, i8.TextBoxPrefixTemplateDirective], styles: [".app-container[_ngcontent-%COMP%] {\n padding: 20px;\n}\n\n.flex-display-row-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 10px;\n}\n\n.title-wrapper[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 14px 0;\n border-bottom: 1px solid var(--med-gray);\n}\n\n.title-wrapper[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 24px;\n line-height: 28px;\n}\n\n.title-wrapper[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n font-size: 16px;\n background: transparent;\n border: none;\n box-sizing: border-box;\n padding-left: 40px;\n}\n\n .title-wrapper[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] {\n background: var(--light-shade);\n width: 360px;\n height: 44px;\n position: relative;\n border-radius: 10px;\n}\n\n.title-wrapper[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 12px;\n}\n\n.add-btn[_ngcontent-%COMP%] {\n padding: 10px 30px;\n border-radius: 10px;\n color: white;\n background-color: var(--border-blue);\n font-size: initial;\n cursor: pointer;\n}\n\n.add-btn[_ngcontent-%COMP%]:hover {\n filter: brightness(85%);\n}\n\n.margin-left-small[_ngcontent-%COMP%] {\n margin-left: 10px;\n}\n\n\n.overflow-y-scroll[_ngcontent-%COMP%] {\n overflow-y: auto;\n max-height: 300px;\n}\n\n.padding-bottom-small[_ngcontent-%COMP%] {\n padding-bottom: 10px;\n}\n\n.list-item[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n padding-bottom: 5px;\n align-items: center;\n}\n\n.btn-no-border[_ngcontent-%COMP%] {\n border: none;\n background: none;\n color: var(--border-blue);\n font-size: 16px;\n font-weight: 500;\n cursor: pointer;\n}\n\n.btn-selected[_ngcontent-%COMP%] {\n font-weight: bold;\n}\n\n.list-text[_ngcontent-%COMP%] {\n font-size: large;\n}\n.list-selected[_ngcontent-%COMP%] {\n font-weight: bold;\n color: var(--border-blue);\n}\n\n.btn-margin-right[_ngcontent-%COMP%] {\n margin-right: 35px;\n}\n\n.divider[_ngcontent-%COMP%] {\n color: lightgray\n}\n\n.search-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 0;\n}\n\n.search-bar[_ngcontent-%COMP%] {\n width: 65%;\n padding-bottom: 10px;\n}\n\n.dialog-wrapper[_ngcontent-%COMP%] {\n padding: 15px 25px;\n}\n\n.btn-outline[_ngcontent-%COMP%] {\n border: 2px solid var(--border-blue);\n border-radius: 8px;\n padding: 5px 30px;\n\n background: none;\n color: var(--border-blue);\n font-size: 16px;\n font-weight: 500;\n cursor: pointer;\n}"] });
|
|
209
321
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleListDetailComponent, [{
|
|
210
322
|
type: Component,
|
|
211
|
-
args: [{ selector: 'mj-list-detail', template: "<div class=\"app-container\">\n <div class=\"flex-display-row-header\">\n <h1>{{listName}}</h1>\n <button kendobutton (click)=\"toggleAddDialog(true)\" themeColor=\"info\">\n <span class=\"fa-solid fa-plus\"></span>\n Add
|
|
323
|
+
args: [{ selector: 'mj-list-detail', template: "<div class=\"app-container\">\n <div class=\"flex-display-row-header\">\n <h1>{{listName}}</h1>\n <button kendobutton class=\"add-btn\" (click)=\"toggleAddDialog(true)\" themeColor=\"info\">\n <span class=\"fa-solid fa-plus\"></span>\n Add More Records\n </button>\n </div>\n <div>\n <div class=\"title-wrapper\">\n <div class=\"search\">\n <kendo-textbox \n type=\"text\" \n #searchInput \n placeholder=\"Search in List\" \n (keyup)=\"onKeyup(searchInput.value)\"\n [clearButton]=\"true\"\n size=\"large\"\n rounded=\"large\"\n fillMode=\"solid\"\n >\n <ng-template kendoTextBoxPrefixTemplate [showSeparator]=\"true\">\n <span class=\"fa-solid fa-magnifying-glass margin-left-small\"></span>\n </ng-template>\n </kendo-textbox>\n </div>\n </div>\n </div>\n @if(showLoader){\n <kendo-loader type=\"converging-spinner\"></kendo-loader>\n }\n @else{\n <kendo-grid [data]=\"filteredGridData\"></kendo-grid>\n }\n</div>\n\n<kendo-dialog\nclass=\"dialog-wrapper\"\ntitle=\"Select Views to Add\"\n*ngIf=\"showAddDialog\"\n(close)=\"toggleAddDialog(false)\"\n[minWidth]=\"250\"\n[width]=\"650\"\n[height]=\"550\"\n>\n<div class=\"search-header\">\n <kendo-textbox\n id=\"listSearch\"\n placeholder=\"Search Views...\"\n kendoTextBox\n [clearButton]=\"true\"\n class=\"search-bar\"\n></kendo-textbox>\n<!--\n<button kendoButton class=\"btn-no-border btn-outline\">\n <span class=\"fa-solid fa-plus\"></span>\n New View\n</button>\n-->\n</div>\n<hr>\n<div class=\"overflow-y-scroll\">\n @if(showAddLoader){\n <kendo-loader type=\"converging-spinner\"></kendo-loader>\n }\n @else {\n @for(userView of userViews; track userView){\n <div class=\"list-item\">\n <div class=\"list-text\" [ngClass]=\"{'list-selected': userViewsToAdd.includes(userView)}\">\n {{userView.Name}}\n </div>\n @if(userViewsToAdd.includes(userView)){\n <button kendoButton class=\"btn-no-border btn-selected\" (click)=\"removeViewFromSelectedList(userView)\">\n <span class=\"fa-solid fa-minus\"></span>\n Remove\n </button>\n }\n @else {\n <button kendoButton class=\"btn-no-border\" (click)=\"addViewToSelectedList(userView)\">\n <div class=\"btn-margin-right\">\n <span class=\"fa-solid fa-plus\"></span>\n Add\n </div>\n </button>\n }\n </div>\n <hr>\n }\n }\n</div>\n<kendo-dialog-actions class=\"popup-actions-btn\">\n <button class=\"cancel-btn\" (click)=\"addTolist()\" [disabled]=\"showAddLoader\" kendoButton themeColor=\"info\">\n Done\n </button>\n <button class=\"yes-btn\" (click)=\"toggleAddDialog(false)\" [disabled]=\"showAddLoader\" kendoButton fillMode=\"outline\" themeColor=\"info\">\n Cancel\n </button>\n</kendo-dialog-actions>\n</kendo-dialog>", styles: [".app-container {\n padding: 20px;\n}\n\n.flex-display-row-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 10px;\n}\n\n.title-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 14px 0;\n border-bottom: 1px solid var(--med-gray);\n}\n\n.title-wrapper h4 {\n margin: 0;\n font-size: 24px;\n line-height: 28px;\n}\n\n.title-wrapper .search input {\n width: 100%;\n height: 100%;\n font-size: 16px;\n background: transparent;\n border: none;\n box-sizing: border-box;\n padding-left: 40px;\n}\n\n .title-wrapper .search {\n background: var(--light-shade);\n width: 360px;\n height: 44px;\n position: relative;\n border-radius: 10px;\n}\n\n.title-wrapper .search svg {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 12px;\n}\n\n.add-btn {\n padding: 10px 30px;\n border-radius: 10px;\n color: white;\n background-color: var(--border-blue);\n font-size: initial;\n cursor: pointer;\n}\n\n.add-btn:hover {\n filter: brightness(85%);\n}\n\n.margin-left-small {\n margin-left: 10px;\n}\n\n\n.overflow-y-scroll {\n overflow-y: auto;\n max-height: 300px;\n}\n\n.padding-bottom-small {\n padding-bottom: 10px;\n}\n\n.list-item {\n display: flex;\n justify-content: space-between;\n padding-bottom: 5px;\n align-items: center;\n}\n\n.btn-no-border {\n border: none;\n background: none;\n color: var(--border-blue);\n font-size: 16px;\n font-weight: 500;\n cursor: pointer;\n}\n\n.btn-selected {\n font-weight: bold;\n}\n\n.list-text {\n font-size: large;\n}\n.list-selected {\n font-weight: bold;\n color: var(--border-blue);\n}\n\n.btn-margin-right {\n margin-right: 35px;\n}\n\n.divider {\n color: lightgray\n}\n\n.search-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 0;\n}\n\n.search-bar {\n width: 65%;\n padding-bottom: 10px;\n}\n\n.dialog-wrapper {\n padding: 15px 25px;\n}\n\n.btn-outline {\n border: 2px solid var(--border-blue);\n border-radius: 8px;\n padding: 5px 30px;\n\n background: none;\n color: var(--border-blue);\n font-size: 16px;\n font-weight: 500;\n cursor: pointer;\n}"] }]
|
|
212
324
|
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }], null); })();
|
|
213
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleListDetailComponent, { className: "SingleListDetailComponent"
|
|
325
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleListDetailComponent, { className: "SingleListDetailComponent" }); })();
|
|
@@ -3,7 +3,7 @@ import { QueryEntity } from '@memberjunction/core-entities';
|
|
|
3
3
|
import { QueryGridComponent } from '@memberjunction/ng-query-grid';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SingleQueryComponent implements OnInit {
|
|
6
|
-
queryId:
|
|
6
|
+
queryId: string;
|
|
7
7
|
loadComplete: EventEmitter<any>;
|
|
8
8
|
loadStarted: EventEmitter<any>;
|
|
9
9
|
theQuery: QueryGridComponent;
|
|
@@ -67,4 +67,4 @@ SingleQueryComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Single
|
|
|
67
67
|
type: ViewChild,
|
|
68
68
|
args: ['theQuery', { static: true }]
|
|
69
69
|
}] }); })();
|
|
70
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleQueryComponent, { className: "SingleQueryComponent"
|
|
70
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleQueryComponent, { className: "SingleQueryComponent" }); })();
|
|
@@ -146,4 +146,4 @@ SingleRecordComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Singl
|
|
|
146
146
|
}], recordSaved: [{
|
|
147
147
|
type: Output
|
|
148
148
|
}] }); })();
|
|
149
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRecordComponent, { className: "SingleRecordComponent"
|
|
149
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRecordComponent, { className: "SingleRecordComponent" }); })();
|
|
@@ -4,7 +4,7 @@ import { DynamicReportComponent } from '@memberjunction/ng-ask-skip';
|
|
|
4
4
|
import { SkipColumnInfo, SkipAPIAnalysisCompleteResponse } from '@memberjunction/skip-types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class SingleReportComponent implements OnInit {
|
|
7
|
-
reportId:
|
|
7
|
+
reportId: string;
|
|
8
8
|
loadComplete: EventEmitter<any>;
|
|
9
9
|
loadStarted: EventEmitter<any>;
|
|
10
10
|
theReport: DynamicReportComponent;
|
|
@@ -83,4 +83,4 @@ SingleReportComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Singl
|
|
|
83
83
|
type: ViewChild,
|
|
84
84
|
args: ['theReport', { static: true }]
|
|
85
85
|
}] }); })();
|
|
86
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleReportComponent, { className: "SingleReportComponent"
|
|
86
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleReportComponent, { className: "SingleReportComponent" }); })();
|
|
@@ -58,4 +58,4 @@ SingleSearchResultComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
58
58
|
type: ViewChild,
|
|
59
59
|
args: [UserViewGridComponent]
|
|
60
60
|
}] }); })();
|
|
61
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleSearchResultComponent, { className: "SingleSearchResultComponent"
|
|
61
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleSearchResultComponent, { className: "SingleSearchResultComponent" }); })();
|
|
@@ -11,7 +11,7 @@ export declare class SingleViewComponent implements AfterViewInit, OnInit {
|
|
|
11
11
|
private route;
|
|
12
12
|
private sharedService;
|
|
13
13
|
viewGridWithAnalysis: UserViewGridWithAnalysisComponent;
|
|
14
|
-
viewId:
|
|
14
|
+
viewId: string | null;
|
|
15
15
|
viewName: string | null;
|
|
16
16
|
selectedView: UserViewEntity | null;
|
|
17
17
|
extraFilter: string | null;
|
|
@@ -104,7 +104,7 @@ export class SingleViewComponent {
|
|
|
104
104
|
LoadView(viewInfo) {
|
|
105
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
106
|
// load up the view
|
|
107
|
-
if (viewInfo && viewInfo.ID && viewInfo.ID > 0)
|
|
107
|
+
if (viewInfo && viewInfo.ID && viewInfo.ID.length > 0)
|
|
108
108
|
this.selectedView = viewInfo;
|
|
109
109
|
yield this.viewGridWithAnalysis.Refresh({
|
|
110
110
|
ViewEntity: viewInfo,
|
|
@@ -201,4 +201,4 @@ SingleViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleV
|
|
|
201
201
|
}], loadComplete: [{
|
|
202
202
|
type: Output
|
|
203
203
|
}] }); })();
|
|
204
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleViewComponent, { className: "SingleViewComponent"
|
|
204
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleViewComponent, { className: "SingleViewComponent" }); })();
|
|
@@ -119,7 +119,7 @@ function UserNotificationsComponent_ng_template_16_Template(rf, ctx) { if (rf &
|
|
|
119
119
|
i0.ɵɵadvance();
|
|
120
120
|
i0.ɵɵtextInterpolate(dataItem_r11.Title);
|
|
121
121
|
i0.ɵɵadvance(3);
|
|
122
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(6, 9, dataItem_r11.
|
|
122
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(6, 9, dataItem_r11.__mj_CreatedAt, "long"));
|
|
123
123
|
i0.ɵɵadvance(3);
|
|
124
124
|
i0.ɵɵtextInterpolate(dataItem_r11.Message);
|
|
125
125
|
i0.ɵɵadvance(2);
|
|
@@ -168,7 +168,7 @@ export class UserNotificationsComponent {
|
|
|
168
168
|
let url = [];
|
|
169
169
|
let queryString = '';
|
|
170
170
|
if (notification.ResourceRecordID && notification.ResourceRecordID > 0 &&
|
|
171
|
-
notification.ResourceTypeID && notification.ResourceTypeID > 0) {
|
|
171
|
+
notification.ResourceTypeID && notification.ResourceTypeID.length > 0) {
|
|
172
172
|
// we have a resource here, like a Report, Dashboard, etc
|
|
173
173
|
// we can generate a url to navigate to it
|
|
174
174
|
const rt = this.sharedService.ResourceTypeByID(notification.ResourceTypeID);
|
|
@@ -386,7 +386,7 @@ UserNotificationsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
386
386
|
} }, dependencies: [i3.NgIf, i4.ButtonComponent, i5.TextBoxComponent, i5.TextBoxSuffixTemplateDirective, i6.FillContainer, i7.ItemTemplateDirective, i7.ListViewComponent, i3.DatePipe], styles: [".notification-list-wrap[_ngcontent-%COMP%] {\n height: 800px;\n overflow-y: auto;\n overflow-x: hidden;\n border: solid 1px lightgray;\n}\n\n.k-listview[_ngcontent-%COMP%] {\n font-family: sans-serif;\n border: 0;\n}\n.product[_ngcontent-%COMP%] {\n width: 100%;\n}\n.header[_ngcontent-%COMP%] {\n display: flex;\n background-color: lightgray;\n padding: 12px;\n height: 24px;\n}\n\n.header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] { \n\n margin-right: 10px; \n}\n\n.title[_ngcontent-%COMP%] {\n flex: 1;\n font-size: 22px;\n font-weight: bold;\n}\n.filter-input[_ngcontent-%COMP%] {\n width: 200px;\n}\n.radio-label[_ngcontent-%COMP%] {\n cursor: pointer;\n margin-right: 10px;\n}\n\n.notification-wrap[_ngcontent-%COMP%] {\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n border-bottom: dashed 1px lightgray;\n background-color: white;\n}\n\n.notification-wrap-unread[_ngcontent-%COMP%] {\n background-color: aliceblue;\n}\n\n.notification-wrap-clickable[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n.notification-title[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n.notification-wrap-clickable[_ngcontent-%COMP%] > .notification-title[_ngcontent-%COMP%] {\n color: blue;\n text-decoration: underline;\n}\n.notification-title-unread[_ngcontent-%COMP%] {\n font-weight: bold;\n}\n\n.notification-body[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.notification-date[_ngcontent-%COMP%] {\n margin-left: 1px;\n font-size: 12px;\n color: gray;\n font-style: italic;\n}"] });
|
|
387
387
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserNotificationsComponent, [{
|
|
388
388
|
type: Component,
|
|
389
|
-
args: [{ selector: 'app-user-notifications', template: "<div class=\"notification-list-wrap\" mjFillContainer [bottomMargin]=\"5\"> \n <div class=\"header\">\n <div class=\"title\">\n Notifications\n </div>\n <div>\n <button *ngIf=\"UnreadNotifications.length > 0\" kendoButton (click)=\"markAllAsRead()\">Mark All as Read</button>\n <button *ngIf=\"ReadNotifications.length > 0\" kendoButton (click)=\"markAllAsUnread()\">Mark All as Unread</button>\n <input *ngIf=\"AllNotifications.length > 0\" #allRadio checked type=\"radio\" name=\"UnreadStatus\" value=\"All\" (change)=\"onReadRadioChanged($event)\" /><span *ngIf=\"AllNotifications.length > 0\" class=\"radio-label\" \n (click)=\"selectReadOption('All')\">All</span>\n <input *ngIf=\"UnreadNotifications.length > 0 && ReadNotifications.length > 0\" #unreadRadio type=\"radio\" name=\"UnreadStatus\" value=\"Unread\" (change)=\"onReadRadioChanged($event)\" /><span *ngIf=\"UnreadNotifications.length > 0 && ReadNotifications.length > 0\" class=\"radio-label\" \n (click)=\"selectReadOption('Unread')\">Unread</span>\n <input *ngIf=\"ReadNotifications.length > 0 && UnreadNotifications.length > 0\" #readRadio type=\"radio\" name=\"UnreadStatus\" value=\"Read\" (change)=\"onReadRadioChanged($event)\" /><span *ngIf=\"ReadNotifications.length > 0 && UnreadNotifications.length > 0\" class=\"radio-label\" \n (click)=\"selectReadOption('Read')\">Read</span>\n <kendo-textbox\n class=\"filter-input\"\n placeholder=\"Filter items...\"\n (valueChange)=\"onFilterChanged($event)\"\n >\n <ng-template kendoTextBoxSuffixTemplate>\n <span class=\"fa-solid fa-magnifying-glass\"></span>\n </ng-template>\n </kendo-textbox> \n </div>\n </div> \n\n <kendo-listview [data]=\"NotificationsToShow\">\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div [class]=\"getItemWrapperClass(dataItem)\">\n <div [class]=\"getItemTitleClass(dataItem)\" (click)=\"notificationClicked(dataItem)\">{{dataItem.Title}}</div>\n <div class=\"notification-body\" (click)=\"notificationClicked(dataItem)\">\n <div class=\"notification-date\">{{dataItem.
|
|
389
|
+
args: [{ selector: 'app-user-notifications', template: "<div class=\"notification-list-wrap\" mjFillContainer [bottomMargin]=\"5\"> \n <div class=\"header\">\n <div class=\"title\">\n Notifications\n </div>\n <div>\n <button *ngIf=\"UnreadNotifications.length > 0\" kendoButton (click)=\"markAllAsRead()\">Mark All as Read</button>\n <button *ngIf=\"ReadNotifications.length > 0\" kendoButton (click)=\"markAllAsUnread()\">Mark All as Unread</button>\n <input *ngIf=\"AllNotifications.length > 0\" #allRadio checked type=\"radio\" name=\"UnreadStatus\" value=\"All\" (change)=\"onReadRadioChanged($event)\" /><span *ngIf=\"AllNotifications.length > 0\" class=\"radio-label\" \n (click)=\"selectReadOption('All')\">All</span>\n <input *ngIf=\"UnreadNotifications.length > 0 && ReadNotifications.length > 0\" #unreadRadio type=\"radio\" name=\"UnreadStatus\" value=\"Unread\" (change)=\"onReadRadioChanged($event)\" /><span *ngIf=\"UnreadNotifications.length > 0 && ReadNotifications.length > 0\" class=\"radio-label\" \n (click)=\"selectReadOption('Unread')\">Unread</span>\n <input *ngIf=\"ReadNotifications.length > 0 && UnreadNotifications.length > 0\" #readRadio type=\"radio\" name=\"UnreadStatus\" value=\"Read\" (change)=\"onReadRadioChanged($event)\" /><span *ngIf=\"ReadNotifications.length > 0 && UnreadNotifications.length > 0\" class=\"radio-label\" \n (click)=\"selectReadOption('Read')\">Read</span>\n <kendo-textbox\n class=\"filter-input\"\n placeholder=\"Filter items...\"\n (valueChange)=\"onFilterChanged($event)\"\n >\n <ng-template kendoTextBoxSuffixTemplate>\n <span class=\"fa-solid fa-magnifying-glass\"></span>\n </ng-template>\n </kendo-textbox> \n </div>\n </div> \n\n <kendo-listview [data]=\"NotificationsToShow\">\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div [class]=\"getItemWrapperClass(dataItem)\">\n <div [class]=\"getItemTitleClass(dataItem)\" (click)=\"notificationClicked(dataItem)\">{{dataItem.Title}}</div>\n <div class=\"notification-body\" (click)=\"notificationClicked(dataItem)\">\n <div class=\"notification-date\">{{dataItem.__mj_CreatedAt | date:'long'}}</div>\n <div class=\"notification-message\">{{dataItem.Message}}</div>\n </div>\n <div>\n <button kendoButton *ngIf=\"dataItem.Unread\" (click)=\"markAsRead(dataItem, true, null)\">Mark as Read</button>\n <button kendoButton *ngIf=\"!dataItem.Unread\" (click)=\"markAsRead(dataItem, false, null)\">Mark as Unread</button>\n </div> \n </div>\n </ng-template>\n </kendo-listview>\n</div>\n", styles: [".notification-list-wrap {\n height: 800px;\n overflow-y: auto;\n overflow-x: hidden;\n border: solid 1px lightgray;\n}\n\n.k-listview {\n font-family: sans-serif;\n border: 0;\n}\n.product {\n width: 100%;\n}\n.header {\n display: flex;\n background-color: lightgray;\n padding: 12px;\n height: 24px;\n}\n\n.header button { /*buttons within the header*/\n margin-right: 10px; \n}\n\n.title {\n flex: 1;\n font-size: 22px;\n font-weight: bold;\n}\n.filter-input {\n width: 200px;\n}\n.radio-label {\n cursor: pointer;\n margin-right: 10px;\n}\n\n.notification-wrap {\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n padding-bottom: 10px;\n border-bottom: dashed 1px lightgray;\n background-color: white;\n}\n\n.notification-wrap-unread {\n background-color: aliceblue;\n}\n\n.notification-wrap-clickable {\n cursor: pointer;\n}\n\n.notification-title {\n font-size: 16px;\n}\n.notification-wrap-clickable > .notification-title {\n color: blue;\n text-decoration: underline;\n}\n.notification-title-unread {\n font-weight: bold;\n}\n\n.notification-body {\n font-size: 14px;\n}\n\n.notification-date {\n margin-left: 1px;\n font-size: 12px;\n color: gray;\n font-style: italic;\n}"] }]
|
|
390
390
|
}], () => [{ type: i1.SharedService }, { type: i2.Router }], { allRadio: [{
|
|
391
391
|
type: ViewChild,
|
|
392
392
|
args: ['allRadio']
|
|
@@ -397,4 +397,4 @@ UserNotificationsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
397
397
|
type: ViewChild,
|
|
398
398
|
args: ['readRadio']
|
|
399
399
|
}] }); })();
|
|
400
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserNotificationsComponent, { className: "UserNotificationsComponent"
|
|
400
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserNotificationsComponent, { className: "UserNotificationsComponent" }); })();
|