@memberjunction/ng-explorer-core 1.3.3 → 1.4.1
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 +8 -2
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +29 -6
- package/dist/lib/app-view/application-view.component.d.ts.map +1 -1
- package/dist/lib/app-view/application-view.component.js +34 -24
- package/dist/lib/base-browser-component/base-browser-component.d.ts +3 -2
- package/dist/lib/base-browser-component/base-browser-component.d.ts.map +1 -1
- package/dist/lib/base-browser-component/base-browser-component.js +5 -4
- package/dist/lib/generic/resource-container-component.d.ts.map +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts +4 -0
- package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts.map +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.js +104 -74
- package/dist/lib/header/header.component.d.ts +1 -1
- package/dist/lib/header/header.component.js +2 -2
- package/dist/lib/home-component/home.component.js +11 -5
- package/dist/lib/list-view/list-view.component.d.ts +36 -0
- package/dist/lib/list-view/list-view.component.d.ts.map +1 -0
- package/dist/lib/list-view/list-view.component.js +189 -0
- package/dist/lib/navigation/navigation.component.d.ts +32 -6
- package/dist/lib/navigation/navigation.component.d.ts.map +1 -1
- package/dist/lib/navigation/navigation.component.js +123 -46
- package/dist/lib/resource-wrappers/record-resource.component.d.ts +2 -2
- package/dist/lib/resource-wrappers/record-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.js +15 -11
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts +26 -0
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -0
- package/dist/lib/single-list-detail/single-list-detail.component.js +213 -0
- package/dist/lib/single-record/single-record.component.d.ts +7 -4
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +83 -29
- package/dist/lib/single-view/single-view.component.d.ts +2 -0
- package/dist/lib/single-view/single-view.component.d.ts.map +1 -1
- package/dist/lib/single-view/single-view.component.js +27 -26
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +2 -1
- package/dist/module.d.ts +38 -37
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +18 -14
- package/dist/public-api.d.ts +2 -2
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -2
- package/package.json +17 -16
- package/dist/lib/generic/section-loader-component.d.ts +0 -18
- package/dist/lib/generic/section-loader-component.d.ts.map +0 -1
- package/dist/lib/generic/section-loader-component.js +0 -66
- package/dist/lib/join-grid/join-grid.component.d.ts +0 -31
- package/dist/lib/join-grid/join-grid.component.d.ts.map +0 -1
- package/dist/lib/join-grid/join-grid.component.js +0 -222
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Component } from '@angular/core';
|
|
11
|
+
import { LogError, Metadata, RunView } from '@memberjunction/core';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "@angular/router";
|
|
14
|
+
import * as i2 from "@memberjunction/ng-shared";
|
|
15
|
+
import * as i3 from "@angular/common";
|
|
16
|
+
import * as i4 from "@angular/forms";
|
|
17
|
+
import * as i5 from "@progress/kendo-angular-grid";
|
|
18
|
+
import * as i6 from "@progress/kendo-angular-dialog";
|
|
19
|
+
import * as i7 from "@progress/kendo-angular-indicators";
|
|
20
|
+
import * as i8 from "@progress/kendo-angular-buttons";
|
|
21
|
+
import * as i9 from "@progress/kendo-angular-label";
|
|
22
|
+
import * as i10 from "@progress/kendo-angular-dropdowns";
|
|
23
|
+
function SingleListDetailComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelement(0, "kendo-loader", 4);
|
|
25
|
+
} }
|
|
26
|
+
function SingleListDetailComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵelement(0, "kendo-grid", 6);
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
30
|
+
i0.ɵɵproperty("data", ctx_r1.gridData);
|
|
31
|
+
} }
|
|
32
|
+
function SingleListDetailComponent_kendo_dialog_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
i0.ɵɵelement(0, "kendo-loader", 4);
|
|
34
|
+
} }
|
|
35
|
+
function SingleListDetailComponent_kendo_dialog_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
37
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "kendo-label", 12)(2, "kendo-dropdownlist", 13);
|
|
38
|
+
i0.ɵɵtwoWayListener("ngModelChange", function SingleListDetailComponent_kendo_dialog_9_Conditional_2_Template_kendo_dropdownlist_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r5.selectedUserView, $event) || (ctx_r5.selectedUserView = $event); return i0.ɵɵresetView($event); });
|
|
39
|
+
i0.ɵɵelementEnd()()();
|
|
40
|
+
} if (rf & 2) {
|
|
41
|
+
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
42
|
+
i0.ɵɵadvance(2);
|
|
43
|
+
i0.ɵɵproperty("data", ctx_r4.userViews)("filterable", true);
|
|
44
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r4.selectedUserView);
|
|
45
|
+
} }
|
|
46
|
+
function SingleListDetailComponent_kendo_dialog_9_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
48
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 7);
|
|
49
|
+
i0.ɵɵlistener("close", function SingleListDetailComponent_kendo_dialog_9_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.toggleAddDialog(false)); });
|
|
50
|
+
i0.ɵɵtemplate(1, SingleListDetailComponent_kendo_dialog_9_Conditional_1_Template, 1, 0, "kendo-loader", 4)(2, SingleListDetailComponent_kendo_dialog_9_Conditional_2_Template, 3, 3);
|
|
51
|
+
i0.ɵɵelementStart(3, "kendo-dialog-actions", 8)(4, "button", 9);
|
|
52
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_kendo_dialog_9_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r8); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.addTolist()); });
|
|
53
|
+
i0.ɵɵtext(5, " Create ");
|
|
54
|
+
i0.ɵɵelementEnd();
|
|
55
|
+
i0.ɵɵelementStart(6, "button", 10);
|
|
56
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_kendo_dialog_9_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.toggleAddDialog(false)); });
|
|
57
|
+
i0.ɵɵtext(7, " Cancel ");
|
|
58
|
+
i0.ɵɵelementEnd()()();
|
|
59
|
+
} if (rf & 2) {
|
|
60
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
61
|
+
i0.ɵɵproperty("minWidth", 250)("width", 650)("height", 550);
|
|
62
|
+
i0.ɵɵadvance();
|
|
63
|
+
i0.ɵɵconditional(1, ctx_r2.showAddLoader ? 1 : 2);
|
|
64
|
+
i0.ɵɵadvance(3);
|
|
65
|
+
i0.ɵɵproperty("disabled", ctx_r2.showAddLoader || !ctx_r2.selectedUserView);
|
|
66
|
+
i0.ɵɵadvance(2);
|
|
67
|
+
i0.ɵɵproperty("disabled", ctx_r2.showAddLoader);
|
|
68
|
+
} }
|
|
69
|
+
export class SingleListDetailComponent {
|
|
70
|
+
constructor(router, route, sharedService) {
|
|
71
|
+
this.router = router;
|
|
72
|
+
this.route = route;
|
|
73
|
+
this.sharedService = sharedService;
|
|
74
|
+
this.listRecord = null;
|
|
75
|
+
this.showLoader = false;
|
|
76
|
+
this.gridData = [];
|
|
77
|
+
this.listName = "";
|
|
78
|
+
this.showAddDialog = false;
|
|
79
|
+
this.showAddLoader = false;
|
|
80
|
+
this.userViews = [];
|
|
81
|
+
this.selectedUserView = null;
|
|
82
|
+
}
|
|
83
|
+
ngOnInit() {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
this.showLoader = true;
|
|
86
|
+
this.route.paramMap.subscribe((params) => __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
const listID = params.get('listID');
|
|
88
|
+
if (listID) {
|
|
89
|
+
const md = new Metadata();
|
|
90
|
+
const rv = new RunView();
|
|
91
|
+
const listRunViewResult = yield rv.RunView({
|
|
92
|
+
EntityName: 'Lists',
|
|
93
|
+
ResultType: 'entity_object',
|
|
94
|
+
ExtraFilter: `ID = ${listID}`
|
|
95
|
+
}, md.CurrentUser);
|
|
96
|
+
if (!listRunViewResult.Success || listRunViewResult.Results.length === 0) {
|
|
97
|
+
LogError("Error loading list with ID " + listID);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const listEntity = listRunViewResult.Results[0];
|
|
101
|
+
const entity = md.EntityFromEntityID(listEntity.EntityID);
|
|
102
|
+
if (!entity) {
|
|
103
|
+
LogError("Error fetching EntityInfo with ID " + listEntity.EntityID);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.listName = listEntity.Name;
|
|
107
|
+
this.listRecord = listEntity;
|
|
108
|
+
const runViewResult = yield rv.RunView({
|
|
109
|
+
EntityName: 'List Details',
|
|
110
|
+
ResultType: 'entity_object',
|
|
111
|
+
ExtraFilter: `ListID = ${listID}`
|
|
112
|
+
}, md.CurrentUser);
|
|
113
|
+
if (!runViewResult.Success) {
|
|
114
|
+
LogError("Error loading list details for list with ID " + listID);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const listDetailRecords = runViewResult.Results;
|
|
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
|
+
}
|
|
131
|
+
}
|
|
132
|
+
this.showLoader = false;
|
|
133
|
+
}));
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
toggleAddDialog(show) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
return;
|
|
139
|
+
this.showAddDialog = show;
|
|
140
|
+
if (show && this.userViews.length === 0) {
|
|
141
|
+
yield this.loadEntityViews();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
addTolist() {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
if (!this.selectedUserView || !this.selectedUserView.Get("ID") || !this.listRecord || !this.listRecord.Entity) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this.showAddLoader = true;
|
|
151
|
+
const rv = new RunView();
|
|
152
|
+
const md = new Metadata();
|
|
153
|
+
const runViewResult = yield rv.RunView({
|
|
154
|
+
EntityName: this.listRecord.Entity,
|
|
155
|
+
ExtraFilter: `UserID = ${md.CurrentUser.ID} AND EntityID = ${this.listRecord.EntityID} AND ID = ${this.selectedUserView.Get("ID")}`,
|
|
156
|
+
ResultType: 'entity_object'
|
|
157
|
+
}, md.CurrentUser);
|
|
158
|
+
if (!runViewResult.Success) {
|
|
159
|
+
this.showAddLoader = true;
|
|
160
|
+
LogError(`Error loading ${this.listRecord.Entity} User View record for user ${md.CurrentUser.ID}`);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
loadEntityViews() {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
this.showAddLoader = true;
|
|
168
|
+
if (!this.listRecord || !this.listRecord.Entity) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const rv = new RunView();
|
|
172
|
+
const md = new Metadata();
|
|
173
|
+
const runViewResult = yield rv.RunView({
|
|
174
|
+
EntityName: "User Views",
|
|
175
|
+
ExtraFilter: `UserID = ${md.CurrentUser.ID} AND EntityID = ${this.listRecord.EntityID}`,
|
|
176
|
+
ResultType: 'entity_object'
|
|
177
|
+
}, md.CurrentUser);
|
|
178
|
+
if (!runViewResult.Success) {
|
|
179
|
+
this.showAddLoader = true;
|
|
180
|
+
LogError(`Error loading ${this.listRecord.Entity} User View records for user ${md.CurrentUser.ID}`);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this.userViews = runViewResult.Results;
|
|
184
|
+
this.showAddLoader = false;
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
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: 10, vars: 3, consts: [[1, "app-container"], [1, "flex-display-row-header"], ["kendobutton", "", "themeColor", "info", 3, "click"], [1, "fa-solid", "fa-plus"], ["type", "converging-spinner"], ["title", "Add to List", 3, "minWidth", "width", "height", "close", 4, "ngIf"], [3, "data"], ["title", "Add to List", 3, "minWidth", "width", "height", "close"], [1, "popup-actions-btn"], ["kendoButton", "", "themeColor", "info", 1, "cancel-btn", 3, "disabled", "click"], ["kendoButton", "", "fillMode", "outline", "themeColor", "info", 1, "yes-btn", 3, "disabled", "click"], [1, "mt-10"], ["text", "Select a View"], ["textField", "Name", "valueField", "ID", 1, "mt-10", 3, "data", "filterable", "ngModel", "ngModelChange"]], template: function SingleListDetailComponent_Template(rf, ctx) { if (rf & 1) {
|
|
190
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h1");
|
|
191
|
+
i0.ɵɵtext(3);
|
|
192
|
+
i0.ɵɵelementEnd();
|
|
193
|
+
i0.ɵɵelementStart(4, "button", 2);
|
|
194
|
+
i0.ɵɵlistener("click", function SingleListDetailComponent_Template_button_click_4_listener() { return ctx.toggleAddDialog(true); });
|
|
195
|
+
i0.ɵɵelement(5, "span", 3);
|
|
196
|
+
i0.ɵɵtext(6, " Add to List ");
|
|
197
|
+
i0.ɵɵelementEnd()();
|
|
198
|
+
i0.ɵɵtemplate(7, SingleListDetailComponent_Conditional_7_Template, 1, 0, "kendo-loader", 4)(8, SingleListDetailComponent_Conditional_8_Template, 1, 1);
|
|
199
|
+
i0.ɵɵelementEnd();
|
|
200
|
+
i0.ɵɵtemplate(9, SingleListDetailComponent_kendo_dialog_9_Template, 8, 6, "kendo-dialog", 5);
|
|
201
|
+
} if (rf & 2) {
|
|
202
|
+
i0.ɵɵadvance(3);
|
|
203
|
+
i0.ɵɵtextInterpolate(ctx.listName);
|
|
204
|
+
i0.ɵɵadvance(4);
|
|
205
|
+
i0.ɵɵconditional(7, ctx.showLoader ? 7 : 8);
|
|
206
|
+
i0.ɵɵadvance(2);
|
|
207
|
+
i0.ɵɵproperty("ngIf", ctx.showAddDialog);
|
|
208
|
+
} }, dependencies: [i3.NgIf, i4.NgControlStatus, i4.NgModel, i5.GridComponent, i6.DialogComponent, i6.DialogActionsComponent, i7.LoaderComponent, i8.ButtonComponent, i9.LabelComponent, i10.DropDownListComponent] });
|
|
209
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleListDetailComponent, [{
|
|
210
|
+
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 to List\n </button>\n </div>\n @if(showLoader){\n <kendo-loader type=\"converging-spinner\"></kendo-loader>\n }\n @else{\n <kendo-grid [data]=\"gridData\"></kendo-grid>\n }\n</div>\n<kendo-dialog\ntitle=\"Add to List\"\n*ngIf=\"showAddDialog\"\n(close)=\"toggleAddDialog(false)\"\n[minWidth]=\"250\"\n[width]=\"650\"\n[height]=\"550\"\n>\n @if(showAddLoader){\n <kendo-loader type=\"converging-spinner\"></kendo-loader>\n }\n @else {\n <div class=\"mt-10\">\n <kendo-label text=\"Select a View\">\n <kendo-dropdownlist \n class=\"mt-10\"\n [data]=\"userViews\"\n [filterable]=\"true\"\n textField=\"Name\"\n valueField=\"ID\"\n [(ngModel)]=\"selectedUserView\"\n />\n </kendo-label>\n </div>\n }\n <kendo-dialog-actions class=\"popup-actions-btn\">\n <button class=\"cancel-btn\" (click)=\"addTolist()\" [disabled]=\"showAddLoader || !selectedUserView\" kendoButton themeColor=\"info\">\n Create\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>" }]
|
|
212
|
+
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }], null); })();
|
|
213
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleListDetailComponent, { className: "SingleListDetailComponent", filePath: "src/lib/single-list-detail/single-list-detail.component.ts", lineNumber: 12 }); })();
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { CompositeKey } from '@memberjunction/core';
|
|
3
|
+
import { CompositeKey, BaseEntity } from '@memberjunction/core';
|
|
4
4
|
import { Container } from '@memberjunction/ng-container-directives';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class SingleRecordComponent implements OnInit, AfterViewInit {
|
|
7
7
|
private route;
|
|
8
8
|
formContainer: Container;
|
|
9
|
-
|
|
9
|
+
PrimaryKey: CompositeKey;
|
|
10
10
|
entityName: string | null;
|
|
11
|
+
newRecordValues: string | null;
|
|
11
12
|
loadComplete: EventEmitter<any>;
|
|
13
|
+
recordSaved: EventEmitter<BaseEntity>;
|
|
12
14
|
constructor(route: ActivatedRoute);
|
|
13
15
|
appDescription: string;
|
|
14
16
|
useGenericForm: boolean;
|
|
15
17
|
loading: boolean;
|
|
16
18
|
ngOnInit(): void;
|
|
17
19
|
ngAfterViewInit(): void;
|
|
18
|
-
LoadForm(
|
|
20
|
+
LoadForm(primaryKey: CompositeKey, entityName: string): Promise<void>;
|
|
21
|
+
protected SetNewRecordValues(record: BaseEntity): void;
|
|
19
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<SingleRecordComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SingleRecordComponent, "mj-single-record", never, { "
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleRecordComponent, "mj-single-record", never, { "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "newRecordValues": { "alias": "newRecordValues"; "required": false; }; }, { "loadComplete": "loadComplete"; "recordSaved": "recordSaved"; }, never, never, false, never>;
|
|
21
24
|
}
|
|
22
25
|
//# sourceMappingURL=single-record.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-record.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,YAAY,EAAS,MAAM,EAAqB,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAA0B,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"single-record.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,YAAY,EAAS,MAAM,EAAqB,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAA0B,YAAY,EAAE,UAAU,EAA4D,MAAM,sBAAsB,CAAC;AAElJ,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;;AAIpE,qBAKa,qBAAsB,YAAW,MAAM,EAAE,aAAa;IASpD,OAAO,CAAC,KAAK;IARY,aAAa,EAAG,SAAS,CAAC;IAChD,UAAU,EAAE,YAAY,CAAsB;IAC9C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAM;IAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAM;IAEnC,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,CAA2B;IAC1D,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC,CAAkC;gBAEnE,KAAK,EAAE,cAAc;IAInC,cAAc,EAAE,MAAM,CAAK;IAC3B,cAAc,EAAE,OAAO,CAAS;IAChC,OAAO,EAAE,OAAO,CAAQ;IAE/B,QAAQ,IAAI,IAAI;IAGhB,eAAe;IAIF,QAAQ,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM;IAuDlE,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,UAAU;yCA/EpC,qBAAqB;2CAArB,qBAAqB;CA8GjC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
11
|
-
import { Metadata, CompositeKey } from '@memberjunction/core';
|
|
11
|
+
import { Metadata, CompositeKey, FieldValueCollection, EntityFieldTSType } from '@memberjunction/core';
|
|
12
12
|
import { MJGlobal } from '@memberjunction/global';
|
|
13
13
|
import { Container } from '@memberjunction/ng-container-directives';
|
|
14
14
|
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
@@ -24,9 +24,11 @@ function SingleRecordComponent_ng_template_1_Template(rf, ctx) { }
|
|
|
24
24
|
export class SingleRecordComponent {
|
|
25
25
|
constructor(route) {
|
|
26
26
|
this.route = route;
|
|
27
|
-
this.
|
|
27
|
+
this.PrimaryKey = new CompositeKey();
|
|
28
28
|
this.entityName = '';
|
|
29
|
+
this.newRecordValues = '';
|
|
29
30
|
this.loadComplete = new EventEmitter();
|
|
31
|
+
this.recordSaved = new EventEmitter();
|
|
30
32
|
this.appDescription = '';
|
|
31
33
|
this.useGenericForm = false;
|
|
32
34
|
this.loading = true;
|
|
@@ -34,39 +36,87 @@ export class SingleRecordComponent {
|
|
|
34
36
|
ngOnInit() {
|
|
35
37
|
}
|
|
36
38
|
ngAfterViewInit() {
|
|
37
|
-
this.LoadForm(this.
|
|
39
|
+
this.LoadForm(this.PrimaryKey, this.entityName);
|
|
38
40
|
}
|
|
39
|
-
LoadForm(
|
|
41
|
+
LoadForm(primaryKey, entityName) {
|
|
40
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
43
|
// Perform any necessary actions with the ViewID, such as fetching data
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
44
|
+
if (!entityName || entityName.trim().length === 0)
|
|
45
|
+
return; // not ready to load
|
|
46
|
+
this.entityName = entityName;
|
|
47
|
+
if (primaryKey.HasValue) {
|
|
48
|
+
// we have an existing record to load up
|
|
49
|
+
this.PrimaryKey = primaryKey;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
// new record, no existing primary key
|
|
53
|
+
this.PrimaryKey = new CompositeKey();
|
|
54
|
+
}
|
|
55
|
+
const formReg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormComponent, entityName);
|
|
56
|
+
const md = new Metadata();
|
|
57
|
+
const entity = md.Entities.find(e => {
|
|
58
|
+
return e.Name === entityName;
|
|
59
|
+
});
|
|
60
|
+
const permissions = entity === null || entity === void 0 ? void 0 : entity.GetUserPermisions(md.CurrentUser);
|
|
61
|
+
if (formReg) {
|
|
62
|
+
const record = yield md.GetEntityObject(entityName);
|
|
63
|
+
if (record) {
|
|
64
|
+
if (primaryKey.HasValue)
|
|
65
|
+
yield record.InnerLoad(primaryKey);
|
|
66
|
+
else {
|
|
67
|
+
record.NewRecord();
|
|
68
|
+
this.SetNewRecordValues(record);
|
|
62
69
|
}
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
record.RegisterEventHandler((eventType) => {
|
|
71
|
+
if (eventType.type === 'save')
|
|
72
|
+
this.recordSaved.emit(record);
|
|
73
|
+
});
|
|
74
|
+
const viewContainerRef = this.formContainer.viewContainerRef;
|
|
75
|
+
viewContainerRef.clear();
|
|
76
|
+
const componentRef = viewContainerRef.createComponent(formReg.SubClass);
|
|
77
|
+
componentRef.instance.record = record;
|
|
78
|
+
componentRef.instance.userPermissions = permissions;
|
|
79
|
+
componentRef.instance.EditMode = !primaryKey.HasValue; // for new records go direct into edit mode
|
|
80
|
+
this.useGenericForm = false;
|
|
81
|
+
this.loadComplete.emit();
|
|
65
82
|
}
|
|
66
|
-
|
|
83
|
+
else
|
|
84
|
+
throw new Error(`Unable to load entity ${entityName} with primary key values: ${primaryKey.ToString()}`);
|
|
67
85
|
}
|
|
86
|
+
this.loading = false;
|
|
68
87
|
});
|
|
69
88
|
}
|
|
89
|
+
SetNewRecordValues(record) {
|
|
90
|
+
if (this.newRecordValues && this.newRecordValues.length > 0) {
|
|
91
|
+
// we have some provided new record values to apply
|
|
92
|
+
const fv = new FieldValueCollection();
|
|
93
|
+
fv.SimpleLoadFromURLSegment(this.newRecordValues);
|
|
94
|
+
// now apply the values to the record
|
|
95
|
+
fv.KeyValuePairs.filter(kvp => kvp.Value !== null && kvp.Value !== undefined).forEach(kvp => {
|
|
96
|
+
const f = record.Fields.find(f => f.Name.trim().toLowerCase() === kvp.FieldName.trim().toLowerCase());
|
|
97
|
+
if (f) {
|
|
98
|
+
// make sure we set the value to the right type based on the f.TSType property
|
|
99
|
+
switch (f.EntityFieldInfo.TSType) {
|
|
100
|
+
case EntityFieldTSType.String:
|
|
101
|
+
record.Set(kvp.FieldName, kvp.Value);
|
|
102
|
+
break;
|
|
103
|
+
case EntityFieldTSType.Number:
|
|
104
|
+
record.Set(kvp.FieldName, parseFloat(kvp.Value));
|
|
105
|
+
break;
|
|
106
|
+
case EntityFieldTSType.Boolean:
|
|
107
|
+
if (kvp.Value === 'false' || kvp.Value === '0' || kvp.Value.toString().trim().length === 0)
|
|
108
|
+
record.Set(kvp.FieldName, false);
|
|
109
|
+
else
|
|
110
|
+
record.Set(kvp.FieldName, true);
|
|
111
|
+
break;
|
|
112
|
+
case EntityFieldTSType.Date:
|
|
113
|
+
record.Set(kvp.FieldName, new Date(kvp.Value));
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
70
120
|
}
|
|
71
121
|
SingleRecordComponent.ɵfac = function SingleRecordComponent_Factory(t) { return new (t || SingleRecordComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute)); };
|
|
72
122
|
SingleRecordComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleRecordComponent, selectors: [["mj-single-record"]], viewQuery: function SingleRecordComponent_Query(rf, ctx) { if (rf & 1) {
|
|
@@ -74,7 +124,7 @@ SingleRecordComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Singl
|
|
|
74
124
|
} if (rf & 2) {
|
|
75
125
|
let _t;
|
|
76
126
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formContainer = _t.first);
|
|
77
|
-
} }, inputs: {
|
|
127
|
+
} }, inputs: { PrimaryKey: "PrimaryKey", entityName: "entityName", newRecordValues: "newRecordValues" }, outputs: { loadComplete: "loadComplete", recordSaved: "recordSaved" }, decls: 2, vars: 1, consts: [["type", "converging-spinner", 4, "ngIf"], ["mjContainer", ""], ["type", "converging-spinner"]], template: function SingleRecordComponent_Template(rf, ctx) { if (rf & 1) {
|
|
78
128
|
i0.ɵɵtemplate(0, SingleRecordComponent_kendo_loader_0_Template, 1, 0, "kendo-loader", 0)(1, SingleRecordComponent_ng_template_1_Template, 0, 0, "ng-template", 1);
|
|
79
129
|
} if (rf & 2) {
|
|
80
130
|
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
@@ -85,11 +135,15 @@ SingleRecordComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Singl
|
|
|
85
135
|
}], () => [{ type: i1.ActivatedRoute }], { formContainer: [{
|
|
86
136
|
type: ViewChild,
|
|
87
137
|
args: [Container, { static: true }]
|
|
88
|
-
}],
|
|
138
|
+
}], PrimaryKey: [{
|
|
89
139
|
type: Input
|
|
90
140
|
}], entityName: [{
|
|
91
141
|
type: Input
|
|
142
|
+
}], newRecordValues: [{
|
|
143
|
+
type: Input
|
|
92
144
|
}], loadComplete: [{
|
|
93
145
|
type: Output
|
|
146
|
+
}], recordSaved: [{
|
|
147
|
+
type: Output
|
|
94
148
|
}] }); })();
|
|
95
149
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRecordComponent, { className: "SingleRecordComponent", filePath: "src/lib/single-record/single-record.component.ts", lineNumber: 14 }); })();
|
|
@@ -20,6 +20,8 @@ export declare class SingleViewComponent implements AfterViewInit, OnInit {
|
|
|
20
20
|
selectedEntity: EntityInfo | null;
|
|
21
21
|
showSearch: boolean;
|
|
22
22
|
searchText: string;
|
|
23
|
+
entityObjectName: string;
|
|
24
|
+
canCreateRecord: boolean;
|
|
23
25
|
private searchDebounce$;
|
|
24
26
|
private _deferLoadCount;
|
|
25
27
|
constructor(router: Router, route: ActivatedRoute, sharedService: SharedService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-view.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-view/single-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAY,UAAU,
|
|
1
|
+
{"version":3,"file":"single-view.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-view/single-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAY,UAAU,EAA8C,MAAM,sBAAsB,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAGxD,OAAO,EAAE,cAAc,EAAY,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;;AAE1D,qBAKa,mBAAoB,YAAW,aAAa,EAAE,MAAM;IAmBnD,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,KAAK;IAAkB,OAAO,CAAC,aAAa;IAlB1B,oBAAoB,EAAG,iCAAiC,CAAC;IAEvG,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC7B,QAAQ,EAAE,MAAM,GAAE,IAAI,CAAQ;IAC9B,YAAY,EAAE,cAAc,GAAG,IAAI,CAAQ;IAC3C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAClC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhC,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,CAA2B;IAEpE,cAAc,EAAE,UAAU,GAAG,IAAI,CAAQ;IACzC,UAAU,EAAE,OAAO,CAAS;IAC5B,UAAU,EAAE,MAAM,CAAM;IACxB,gBAAgB,EAAE,MAAM,CAAM;IAC9B,eAAe,EAAE,OAAO,CAAS;IACxC,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,eAAe,CAAa;gBAEhB,MAAM,EAAE,MAAM,EAAU,KAAK,EAAE,cAAc,EAAU,aAAa,EAAE,aAAa;IAIvG,eAAe;IAIf,QAAQ,IAAI,IAAI;YAIF,WAAW;IAwCZ,cAAc,CAAC,IAAI,EAAE,mBAAmB;IAMxC,QAAQ,CAAC,QAAQ,EAAE,cAAc;IAYjC,eAAe;IAUtB,OAAO;IAON,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKzC,OAAO,CAAC,mBAAmB;YASb,MAAM;IAKb,0BAA0B,CAAC,IAAI,EAAE,GAAG;yCA7HhC,mBAAmB;2CAAnB,mBAAmB;CAmI/B"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
|
|
11
11
|
import { UserViewGridWithAnalysisComponent } from '@memberjunction/ng-ask-skip';
|
|
12
|
-
import { Metadata, LogError } from '@memberjunction/core';
|
|
12
|
+
import { Metadata, LogError, EntityPermissionType } from '@memberjunction/core';
|
|
13
13
|
import { distinctUntilChanged, Subject } from "rxjs";
|
|
14
14
|
import { debounceTime } from "rxjs/operators";
|
|
15
15
|
import { ViewInfo } from '@memberjunction/core-entities';
|
|
@@ -22,25 +22,14 @@ import * as i5 from "@progress/kendo-angular-inputs";
|
|
|
22
22
|
import * as i6 from "@memberjunction/ng-container-directives";
|
|
23
23
|
import * as i7 from "@memberjunction/ng-ask-skip";
|
|
24
24
|
import * as i8 from "@memberjunction/ng-user-view-properties";
|
|
25
|
-
function
|
|
26
|
-
const
|
|
27
|
-
i0.ɵɵelementStart(0, "kendo-textbox", 5);
|
|
28
|
-
i0.ɵɵlistener("valueChange", function SingleViewComponent_kendo_textbox_2_Template_kendo_textbox_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSearch($event)); });
|
|
29
|
-
i0.ɵɵtwoWayListener("ngModelChange", function SingleViewComponent_kendo_textbox_2_Template_kendo_textbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r4 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r4.searchText, $event) || (ctx_r4.searchText = $event); return i0.ɵɵresetView($event); });
|
|
30
|
-
i0.ɵɵelementEnd();
|
|
31
|
-
} if (rf & 2) {
|
|
32
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
33
|
-
i0.ɵɵproperty("clearButton", true);
|
|
34
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.searchText);
|
|
35
|
-
} }
|
|
36
|
-
function SingleViewComponent_mj_user_view_properties_dialog_3_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
-
const _r6 = i0.ɵɵgetCurrentView();
|
|
25
|
+
function SingleViewComponent_mj_user_view_properties_dialog_4_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
38
27
|
i0.ɵɵelementStart(0, "mj-user-view-properties-dialog", 6);
|
|
39
|
-
i0.ɵɵlistener("dialogClosed", function
|
|
28
|
+
i0.ɵɵlistener("dialogClosed", function SingleViewComponent_mj_user_view_properties_dialog_4_Template_mj_user_view_properties_dialog_dialogClosed_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.viewPropertiesDialogClosed($event)); });
|
|
40
29
|
i0.ɵɵelementEnd();
|
|
41
30
|
} if (rf & 2) {
|
|
42
|
-
const
|
|
43
|
-
i0.ɵɵproperty("ViewID",
|
|
31
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
32
|
+
i0.ɵɵproperty("ViewID", ctx_r0.selectedView.ID);
|
|
44
33
|
} }
|
|
45
34
|
export class SingleViewComponent {
|
|
46
35
|
constructor(router, route, sharedService) {
|
|
@@ -56,6 +45,8 @@ export class SingleViewComponent {
|
|
|
56
45
|
this.selectedEntity = null;
|
|
57
46
|
this.showSearch = false;
|
|
58
47
|
this.searchText = '';
|
|
48
|
+
this.entityObjectName = '';
|
|
49
|
+
this.canCreateRecord = false;
|
|
59
50
|
this.searchDebounce$ = new Subject();
|
|
60
51
|
this._deferLoadCount = 0;
|
|
61
52
|
}
|
|
@@ -97,6 +88,11 @@ export class SingleViewComponent {
|
|
|
97
88
|
this.sharedService.CreateSimpleNotification(`The entity name ${this.entityName} is not valid. Please check the URL and try again.`, "error", 5000);
|
|
98
89
|
}
|
|
99
90
|
}
|
|
91
|
+
if (this.selectedEntity) {
|
|
92
|
+
const entityObj = yield md.GetEntityObject(this.selectedEntity.Name);
|
|
93
|
+
this.canCreateRecord = entityObj.CheckPermissions(EntityPermissionType.Create, false);
|
|
94
|
+
this.entityObjectName = this.selectedEntity.Name;
|
|
95
|
+
}
|
|
100
96
|
});
|
|
101
97
|
}
|
|
102
98
|
handleRowClick(args) {
|
|
@@ -165,25 +161,30 @@ SingleViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleV
|
|
|
165
161
|
} if (rf & 2) {
|
|
166
162
|
let _t;
|
|
167
163
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewGridWithAnalysis = _t.first);
|
|
168
|
-
} }, inputs: { viewId: "viewId", viewName: "viewName", selectedView: "selectedView", extraFilter: "extraFilter", entityName: "entityName" }, outputs: { loadComplete: "loadComplete" }, decls:
|
|
169
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
170
|
-
i0.ɵɵ
|
|
164
|
+
} }, inputs: { viewId: "viewId", viewName: "viewName", selectedView: "selectedView", extraFilter: "extraFilter", entityName: "entityName" }, outputs: { loadComplete: "loadComplete" }, decls: 6, vars: 5, consts: [["mjFillContainer", "", 1, "single-view-wrap", 3, "bottomMargin"], [1, "searchBox"], ["id", "txtSearch", "placeholder", "Search here...", "kendoTextBox", "", 3, "clearButton", "ngModel", "valueChange", "ngModelChange"], [1, "flex-row"], ["class", "padding-left-small", 3, "ViewID", "dialogClosed", 4, "ngIf"], ["mjFillContainer", "", 1, "analysis-wrapper", 3, "AutoNavigate", "rowClicked"], [1, "padding-left-small", 3, "ViewID", "dialogClosed"]], template: function SingleViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
165
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "kendo-textbox", 2);
|
|
166
|
+
i0.ɵɵlistener("valueChange", function SingleViewComponent_Template_kendo_textbox_valueChange_2_listener($event) { return ctx.onSearch($event); });
|
|
167
|
+
i0.ɵɵtwoWayListener("ngModelChange", function SingleViewComponent_Template_kendo_textbox_ngModelChange_2_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.searchText, $event) || (ctx.searchText = $event); return $event; });
|
|
171
168
|
i0.ɵɵelementEnd();
|
|
172
|
-
i0.ɵɵelementStart(
|
|
173
|
-
i0.ɵɵ
|
|
169
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
170
|
+
i0.ɵɵtemplate(4, SingleViewComponent_mj_user_view_properties_dialog_4_Template, 1, 1, "mj-user-view-properties-dialog", 4);
|
|
171
|
+
i0.ɵɵelementEnd()();
|
|
172
|
+
i0.ɵɵelementStart(5, "mj-user-view-grid-with-analysis", 5);
|
|
173
|
+
i0.ɵɵlistener("rowClicked", function SingleViewComponent_Template_mj_user_view_grid_with_analysis_rowClicked_5_listener($event) { return ctx.handleRowClick($event); });
|
|
174
174
|
i0.ɵɵelementEnd()();
|
|
175
175
|
} if (rf & 2) {
|
|
176
176
|
i0.ɵɵproperty("bottomMargin", 20);
|
|
177
177
|
i0.ɵɵadvance(2);
|
|
178
|
-
i0.ɵɵproperty("
|
|
179
|
-
i0.ɵɵ
|
|
178
|
+
i0.ɵɵproperty("clearButton", true);
|
|
179
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.searchText);
|
|
180
|
+
i0.ɵɵadvance(2);
|
|
180
181
|
i0.ɵɵproperty("ngIf", ctx.selectedView);
|
|
181
182
|
i0.ɵɵadvance();
|
|
182
183
|
i0.ɵɵproperty("AutoNavigate", false);
|
|
183
|
-
} }, dependencies: [i3.NgIf, i4.NgControlStatus, i4.NgModel, i5.TextBoxComponent, i6.FillContainer, i7.UserViewGridWithAnalysisComponent, i8.UserViewPropertiesDialogComponent], styles: [".single-view-wrap[_ngcontent-%COMP%] {\n padding: 10px;\n}\n .analysis-wrapper .k-tabstrip-items-wrapper {\n background: var(--white-color) !important;\n padding-left: 0 !important;\n
|
|
184
|
+
} }, dependencies: [i3.NgIf, i4.NgControlStatus, i4.NgModel, i5.TextBoxComponent, i6.FillContainer, i7.UserViewGridWithAnalysisComponent, i8.UserViewPropertiesDialogComponent], styles: [".single-view-wrap[_ngcontent-%COMP%] {\n padding: 10px;\n}\n\n .analysis-wrapper .k-tabstrip-items-wrapper {\n background: var(--white-color) !important;\n padding-left: 0 !important;\n}\n\n .analysis-wrapper .k-tabstrip-items-wrapper .k-tabstrip-items .k-tabstrip-item.k-active {\n border-bottom: 3px solid var(--border-blue) !important;\n}\n\n .analysis-wrapper .k-tabstrip-items-wrapper .k-tabstrip-items .k-tabstrip-item {\n background: var(--white-color) !important;\n border-right: 0 !important;\n}\n\n.flex-row[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row;\n}\n\n.padding-left-small[_ngcontent-%COMP%] {\n padding-left: 10px;\n}"] });
|
|
184
185
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleViewComponent, [{
|
|
185
186
|
type: Component,
|
|
186
|
-
args: [{ selector: 'mj-single-view', template: "<div class=\"single-view-wrap\" mjFillContainer [bottomMargin]=\"20\">\n <div class=\"card-container\" class=\"searchBox\">\n <kendo-textbox\n id=\"txtSearch\"\n
|
|
187
|
+
args: [{ selector: 'mj-single-view', template: "<div class=\"single-view-wrap\" mjFillContainer [bottomMargin]=\"20\">\n <div class=\"card-container\" class=\"searchBox\">\n <kendo-textbox\n id=\"txtSearch\"\n placeholder=\"Search here...\"\n kendoTextBox\n (valueChange)=\"onSearch($event)\"\n [clearButton]=\"true\"\n [(ngModel)]=\"searchText\"\n ></kendo-textbox>\n\n <div class=\"flex-row\">\n <mj-user-view-properties-dialog class=\"padding-left-small\" *ngIf=\"selectedView\" [ViewID]=\"selectedView.ID\" (dialogClosed)=\"this.viewPropertiesDialogClosed($event)\"/>\n </div>\n </div>\n\n <mj-user-view-grid-with-analysis class=\"analysis-wrapper\" (rowClicked)=\"handleRowClick($event)\" [AutoNavigate]=\"false\" mjFillContainer/>\n</div>", styles: [".single-view-wrap {\n padding: 10px;\n}\n\n::ng-deep .analysis-wrapper .k-tabstrip-items-wrapper {\n background: var(--white-color) !important;\n padding-left: 0 !important;\n}\n\n::ng-deep .analysis-wrapper .k-tabstrip-items-wrapper .k-tabstrip-items .k-tabstrip-item.k-active {\n border-bottom: 3px solid var(--border-blue) !important;\n}\n\n::ng-deep .analysis-wrapper .k-tabstrip-items-wrapper .k-tabstrip-items .k-tabstrip-item {\n background: var(--white-color) !important;\n border-right: 0 !important;\n}\n\n.flex-row {\n display: flex;\n flex-direction: row;\n}\n\n.padding-left-small {\n padding-left: 10px;\n}"] }]
|
|
187
188
|
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }], { viewGridWithAnalysis: [{
|
|
188
189
|
type: ViewChild,
|
|
189
190
|
args: [UserViewGridWithAnalysisComponent, { static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-notifications.component.d.ts","sourceRoot":"","sources":["../../../src/lib/user-notifications/user-notifications.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAY,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;;AAEzC,qBAKa,0BAA2B,YAAW,aAAa;IAQ1C,aAAa,EAAE,aAAa;IAAE,OAAO,CAAC,MAAM;IAPzC,QAAQ,EAAG,UAAU,CAAC;IACnB,WAAW,EAAG,UAAU,CAAC;IAC3B,SAAS,EAAG,UAAU,CAAC;IAExC,aAAa,EAAE,MAAM,CAAS;IAC9B,aAAa,EAAE,MAAM,CAAM;gBAEd,aAAa,EAAE,aAAa,EAAU,MAAM,EAAE,MAAM;IAExE,eAAe,IAAI,IAAI;IAIvB,IAAW,mBAAmB,IAAI,sBAAsB,EAAE,CAqBzD;IAEM,uBAAuB,CAAC,YAAY,EAAE,sBAAsB,GAAG,OAAO;IAKtE,eAAe,CAAC,YAAY,EAAE,sBAAsB,GAAG;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC;IA4CvG,IAAW,gBAAgB,IAAI,sBAAsB,EAAE,CAEtD;IAED,IAAW,mBAAmB,IAAI,sBAAsB,EAAE,CAEzD;IAED,IAAW,iBAAiB,IAAI,sBAAsB,EAAE,CAEvD;IAED,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAgBtC,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMtC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIpC,iBAAiB,CAAC,YAAY,EAAE,sBAAsB;IAStD,mBAAmB,CAAC,YAAY,EAAE,sBAAsB;IAYlD,UAAU,CAAC,YAAY,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAuCpH,aAAa;IAIb,eAAe;IAIf,OAAO,CAAC,KAAK,EAAE,OAAO;IAwBnC,mBAAmB,CAAC,YAAY,EAAE,sBAAsB;yCAxN7C,0BAA0B;2CAA1B,0BAA0B;
|
|
1
|
+
{"version":3,"file":"user-notifications.component.d.ts","sourceRoot":"","sources":["../../../src/lib/user-notifications/user-notifications.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAY,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;;AAEzC,qBAKa,0BAA2B,YAAW,aAAa;IAQ1C,aAAa,EAAE,aAAa;IAAE,OAAO,CAAC,MAAM;IAPzC,QAAQ,EAAG,UAAU,CAAC;IACnB,WAAW,EAAG,UAAU,CAAC;IAC3B,SAAS,EAAG,UAAU,CAAC;IAExC,aAAa,EAAE,MAAM,CAAS;IAC9B,aAAa,EAAE,MAAM,CAAM;gBAEd,aAAa,EAAE,aAAa,EAAU,MAAM,EAAE,MAAM;IAExE,eAAe,IAAI,IAAI;IAIvB,IAAW,mBAAmB,IAAI,sBAAsB,EAAE,CAqBzD;IAEM,uBAAuB,CAAC,YAAY,EAAE,sBAAsB,GAAG,OAAO;IAKtE,eAAe,CAAC,YAAY,EAAE,sBAAsB,GAAG;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC;IA4CvG,IAAW,gBAAgB,IAAI,sBAAsB,EAAE,CAEtD;IAED,IAAW,mBAAmB,IAAI,sBAAsB,EAAE,CAEzD;IAED,IAAW,iBAAiB,IAAI,sBAAsB,EAAE,CAEvD;IAED,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAgBtC,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMtC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIpC,iBAAiB,CAAC,YAAY,EAAE,sBAAsB;IAStD,mBAAmB,CAAC,YAAY,EAAE,sBAAsB;IAYlD,UAAU,CAAC,YAAY,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAuCpH,aAAa;IAIb,eAAe;IAIf,OAAO,CAAC,KAAK,EAAE,OAAO;IAwBnC,mBAAmB,CAAC,YAAY,EAAE,sBAAsB;yCAxN7C,0BAA0B;2CAA1B,0BAA0B;CAuOtC"}
|
|
@@ -334,8 +334,9 @@ export class UserNotificationsComponent {
|
|
|
334
334
|
const fullUrl = `${info.urlParts.join('/')}${info.queryString ? '?' + info.queryString : ''}`;
|
|
335
335
|
this.router.navigateByUrl(fullUrl);
|
|
336
336
|
}
|
|
337
|
-
else
|
|
337
|
+
else {
|
|
338
338
|
this.router.navigate(info.urlParts);
|
|
339
|
+
}
|
|
339
340
|
}
|
|
340
341
|
}
|
|
341
342
|
}
|