@memberjunction/ng-user-view-grid 0.9.40 → 0.9.41
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.
|
@@ -5,6 +5,7 @@ import { BaseEntity, RunViewParams, EntityFieldInfo, EntityInfo } from '@memberj
|
|
|
5
5
|
import { ViewColumnInfo, UserViewEntityExtended } from '@memberjunction/core-entities';
|
|
6
6
|
import { CellClickEvent, GridDataResult, PageChangeEvent, GridComponent, CellCloseEvent, ColumnReorderEvent, ColumnResizeArgs, SelectionEvent, SelectableSettings } from "@progress/kendo-angular-grid";
|
|
7
7
|
import { ExcelExportComponent } from '@progress/kendo-angular-excel-export';
|
|
8
|
+
import { CompareRecordsComponent } from '@memberjunction/ng-compare-records';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export type GridRowClickedEvent = {
|
|
10
11
|
entityId: number;
|
|
@@ -35,6 +36,7 @@ export declare class UserViewGridComponent implements OnInit, AfterViewInit {
|
|
|
35
36
|
kendoGridElement: GridComponent | null;
|
|
36
37
|
kendoGridElementRef: ElementRef | null;
|
|
37
38
|
kendoExcelExport: ExcelExportComponent | null;
|
|
39
|
+
recordCompareComponent: CompareRecordsComponent | null;
|
|
38
40
|
private _pendingRecords;
|
|
39
41
|
viewData: [];
|
|
40
42
|
totalRowCount: number;
|
|
@@ -56,9 +58,11 @@ export declare class UserViewGridComponent implements OnInit, AfterViewInit {
|
|
|
56
58
|
private editModeEnded;
|
|
57
59
|
compareMode: boolean;
|
|
58
60
|
compareRecords: BaseEntity[];
|
|
61
|
+
mergeMode: boolean;
|
|
62
|
+
mergeRecords: BaseEntity[];
|
|
59
63
|
selectableSettings: SelectableSettings;
|
|
60
64
|
selectedKeys: any[];
|
|
61
|
-
|
|
65
|
+
isCompareDialogOpened: boolean;
|
|
62
66
|
showRefreshButton: boolean;
|
|
63
67
|
viewExecutionTime: number;
|
|
64
68
|
get PendingRecords(): GridPendingRecordItem[];
|
|
@@ -97,7 +101,8 @@ export declare class UserViewGridComponent implements OnInit, AfterViewInit {
|
|
|
97
101
|
};
|
|
98
102
|
selectionChange(args: SelectionEvent): void;
|
|
99
103
|
enableCompare(cancel?: boolean): void;
|
|
100
|
-
|
|
104
|
+
enableMerge(cancel?: boolean): void;
|
|
105
|
+
closeCompareDialog(event: 'close' | 'cancel' | 'merge'): Promise<void>;
|
|
101
106
|
exportColumns: ViewColumnInfo[];
|
|
102
107
|
exportData: any[];
|
|
103
108
|
doExcelExport(): Promise<void>;
|
|
@@ -23,113 +23,203 @@ import * as i4 from "@progress/kendo-angular-grid";
|
|
|
23
23
|
import * as i5 from "@progress/kendo-angular-dialog";
|
|
24
24
|
import * as i6 from "@progress/kendo-angular-excel-export";
|
|
25
25
|
import * as i7 from "@progress/kendo-angular-buttons";
|
|
26
|
-
import * as i8 from "@memberjunction/ng-
|
|
26
|
+
import * as i8 from "@memberjunction/ng-compare-records";
|
|
27
|
+
import * as i9 from "@memberjunction/ng-container-directives";
|
|
27
28
|
const _c0 = ["kendoGrid"];
|
|
28
29
|
const _c1 = ["excelExport"];
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const _c2 = ["recordCompareRef"];
|
|
31
|
+
function UserViewGridComponent_ng_template_3_button_0_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
31
33
|
i0.ɵɵelementStart(0, "button", 14);
|
|
32
|
-
i0.ɵɵlistener("click", function
|
|
34
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r15.doExcelExport()); });
|
|
35
|
+
i0.ɵɵtext(1, "Export to Excel");
|
|
36
|
+
i0.ɵɵelementEnd();
|
|
37
|
+
} }
|
|
38
|
+
function UserViewGridComponent_ng_template_3_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
40
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
41
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r17.enableCompare()); });
|
|
42
|
+
i0.ɵɵtext(1, "Compare");
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
46
|
+
i0.ɵɵproperty("disabled", ctx_r8.compareMode && ctx_r8.compareRecords.length < 2);
|
|
47
|
+
} }
|
|
48
|
+
function UserViewGridComponent_ng_template_3_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
50
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
51
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r19.enableCompare()); });
|
|
52
|
+
i0.ɵɵtext(1, "Compare");
|
|
53
|
+
i0.ɵɵelementEnd();
|
|
54
|
+
} if (rf & 2) {
|
|
55
|
+
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
56
|
+
i0.ɵɵproperty("disabled", ctx_r9.compareMode && ctx_r9.compareRecords.length < 2);
|
|
57
|
+
} }
|
|
58
|
+
function UserViewGridComponent_ng_template_3_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
60
|
+
i0.ɵɵelementStart(0, "button", 16);
|
|
61
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r21.enableCompare(true)); });
|
|
33
62
|
i0.ɵɵtext(1, "Cancel");
|
|
34
63
|
i0.ɵɵelementEnd();
|
|
35
64
|
} }
|
|
36
|
-
function
|
|
37
|
-
const
|
|
65
|
+
function UserViewGridComponent_ng_template_3_button_4_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
const _r24 = i0.ɵɵgetCurrentView();
|
|
38
67
|
i0.ɵɵelementStart(0, "button", 15);
|
|
39
|
-
i0.ɵɵlistener("click", function
|
|
68
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r24); const ctx_r23 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r23.enableMerge()); });
|
|
69
|
+
i0.ɵɵtext(1, "Merge");
|
|
70
|
+
i0.ɵɵelementEnd();
|
|
71
|
+
} if (rf & 2) {
|
|
72
|
+
const ctx_r11 = i0.ɵɵnextContext(2);
|
|
73
|
+
i0.ɵɵproperty("disabled", ctx_r11.mergeMode && ctx_r11.mergeRecords.length < 2);
|
|
74
|
+
} }
|
|
75
|
+
function UserViewGridComponent_ng_template_3_button_5_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
77
|
+
i0.ɵɵelementStart(0, "button", 16);
|
|
78
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r25 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r25.enableMerge()); });
|
|
79
|
+
i0.ɵɵtext(1, "Merge");
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
} }
|
|
82
|
+
function UserViewGridComponent_ng_template_3_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
84
|
+
i0.ɵɵelementStart(0, "button", 16);
|
|
85
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r27.enableMerge(true)); });
|
|
86
|
+
i0.ɵɵtext(1, "Cancel");
|
|
87
|
+
i0.ɵɵelementEnd();
|
|
88
|
+
} }
|
|
89
|
+
function UserViewGridComponent_ng_template_3_button_7_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
+
const _r30 = i0.ɵɵgetCurrentView();
|
|
91
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
92
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r30); const ctx_r29 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r29.RefreshFromSavedParams()); });
|
|
40
93
|
i0.ɵɵtext(1, " Refresh ");
|
|
41
94
|
i0.ɵɵelementEnd();
|
|
42
95
|
} if (rf & 2) {
|
|
43
96
|
i0.ɵɵproperty("primary", true);
|
|
44
97
|
} }
|
|
45
98
|
function UserViewGridComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
-
|
|
47
|
-
i0.ɵɵ
|
|
48
|
-
i0.ɵɵ
|
|
49
|
-
i0.ɵɵ
|
|
50
|
-
i0.ɵɵ
|
|
51
|
-
i0.ɵɵtemplate(
|
|
52
|
-
i0.ɵɵ
|
|
53
|
-
i0.ɵɵ
|
|
54
|
-
i0.ɵɵtext(4, "Compare");
|
|
55
|
-
i0.ɵɵelementEnd();
|
|
56
|
-
i0.ɵɵtemplate(5, UserViewGridComponent_ng_template_3_button_5_Template, 2, 1, "button", 13);
|
|
99
|
+
i0.ɵɵtemplate(0, UserViewGridComponent_ng_template_3_button_0_Template, 2, 0, "button", 10);
|
|
100
|
+
i0.ɵɵtemplate(1, UserViewGridComponent_ng_template_3_button_1_Template, 2, 1, "button", 11);
|
|
101
|
+
i0.ɵɵtemplate(2, UserViewGridComponent_ng_template_3_button_2_Template, 2, 1, "button", 11);
|
|
102
|
+
i0.ɵɵtemplate(3, UserViewGridComponent_ng_template_3_button_3_Template, 2, 0, "button", 12);
|
|
103
|
+
i0.ɵɵtemplate(4, UserViewGridComponent_ng_template_3_button_4_Template, 2, 1, "button", 11);
|
|
104
|
+
i0.ɵɵtemplate(5, UserViewGridComponent_ng_template_3_button_5_Template, 2, 0, "button", 12);
|
|
105
|
+
i0.ɵɵtemplate(6, UserViewGridComponent_ng_template_3_button_6_Template, 2, 0, "button", 12);
|
|
106
|
+
i0.ɵɵtemplate(7, UserViewGridComponent_ng_template_3_button_7_Template, 2, 1, "button", 13);
|
|
57
107
|
} if (rf & 2) {
|
|
58
108
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
59
|
-
i0.ɵɵproperty("
|
|
60
|
-
i0.ɵɵadvance(
|
|
109
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.compareMode && !ctx_r1.mergeMode);
|
|
110
|
+
i0.ɵɵadvance(1);
|
|
111
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.compareMode && !ctx_r1.mergeMode);
|
|
112
|
+
i0.ɵɵadvance(1);
|
|
61
113
|
i0.ɵɵproperty("ngIf", ctx_r1.compareMode);
|
|
62
114
|
i0.ɵɵadvance(1);
|
|
63
|
-
i0.ɵɵproperty("
|
|
64
|
-
i0.ɵɵadvance(
|
|
65
|
-
i0.ɵɵproperty("ngIf", ctx_r1.
|
|
115
|
+
i0.ɵɵproperty("ngIf", ctx_r1.compareMode);
|
|
116
|
+
i0.ɵɵadvance(1);
|
|
117
|
+
i0.ɵɵproperty("ngIf", ctx_r1.mergeMode);
|
|
118
|
+
i0.ɵɵadvance(1);
|
|
119
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.mergeMode && !ctx_r1.compareMode);
|
|
120
|
+
i0.ɵɵadvance(1);
|
|
121
|
+
i0.ɵɵproperty("ngIf", ctx_r1.mergeMode);
|
|
122
|
+
i0.ɵɵadvance(1);
|
|
123
|
+
i0.ɵɵproperty("ngIf", ctx_r1.showRefreshButton && !ctx_r1.compareMode && !ctx_r1.mergeMode);
|
|
66
124
|
} }
|
|
67
|
-
const
|
|
68
|
-
const
|
|
125
|
+
const _c3 = function () { return { "text-align": "center", "vertical-align": "center" }; };
|
|
126
|
+
const _c4 = function () { return { "font-weight": "bold", "background-color": "#a9c2af" }; };
|
|
69
127
|
function UserViewGridComponent_kendo_grid_checkbox_column_4_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
-
i0.ɵɵelement(0, "kendo-grid-checkbox-column",
|
|
128
|
+
i0.ɵɵelement(0, "kendo-grid-checkbox-column", 18);
|
|
71
129
|
} if (rf & 2) {
|
|
72
|
-
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(4,
|
|
73
|
-
i0.ɵɵproperty("width", 50)("headerStyle", i0.ɵɵpureFunction0(5,
|
|
130
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(4, _c3));
|
|
131
|
+
i0.ɵɵproperty("width", 50)("headerStyle", i0.ɵɵpureFunction0(5, _c4));
|
|
74
132
|
} }
|
|
75
133
|
function UserViewGridComponent_kendo_grid_column_5_1_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
76
134
|
i0.ɵɵtext(0);
|
|
77
135
|
i0.ɵɵpipe(1, "number");
|
|
78
136
|
i0.ɵɵpipe(2, "number");
|
|
79
137
|
i0.ɵɵelement(3, "br");
|
|
80
|
-
i0.ɵɵelementStart(4, "span",
|
|
138
|
+
i0.ɵɵelementStart(4, "span", 21);
|
|
81
139
|
i0.ɵɵtext(5);
|
|
82
140
|
i0.ɵɵpipe(6, "number");
|
|
83
141
|
i0.ɵɵelementEnd();
|
|
84
142
|
} if (rf & 2) {
|
|
85
|
-
const
|
|
86
|
-
i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(1, 3,
|
|
143
|
+
const ctx_r33 = i0.ɵɵnextContext(3);
|
|
144
|
+
i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(1, 3, ctx_r33.viewData.length), "", ctx_r33.totalRowCount > ctx_r33.viewData.length ? " of " + i0.ɵɵpipeBind1(2, 5, ctx_r33.totalRowCount) : " rows", "");
|
|
87
145
|
i0.ɵɵadvance(5);
|
|
88
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(6, 7,
|
|
146
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(6, 7, ctx_r33.viewExecutionTime, "1.2-2"), " seconds");
|
|
89
147
|
} }
|
|
90
148
|
function UserViewGridComponent_kendo_grid_column_5_1_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
-
i0.ɵɵtemplate(0, UserViewGridComponent_kendo_grid_column_5_1_ng_template_0_Template, 7, 10, "ng-template",
|
|
149
|
+
i0.ɵɵtemplate(0, UserViewGridComponent_kendo_grid_column_5_1_ng_template_0_Template, 7, 10, "ng-template", 20);
|
|
92
150
|
} }
|
|
93
151
|
function UserViewGridComponent_kendo_grid_column_5_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
-
i0.ɵɵelementStart(0, "kendo-grid-column",
|
|
152
|
+
i0.ɵɵelementStart(0, "kendo-grid-column", 19);
|
|
95
153
|
i0.ɵɵtemplate(1, UserViewGridComponent_kendo_grid_column_5_1_Template, 1, 0, null, 9);
|
|
96
154
|
i0.ɵɵelementEnd();
|
|
97
155
|
} if (rf & 2) {
|
|
98
|
-
const
|
|
156
|
+
const item_r31 = ctx.$implicit;
|
|
99
157
|
const ctx_r3 = i0.ɵɵnextContext();
|
|
100
|
-
i0.ɵɵstyleMap(ctx_r3.GetColumnCellStyle(
|
|
101
|
-
i0.ɵɵproperty("field",
|
|
158
|
+
i0.ɵɵstyleMap(ctx_r3.GetColumnCellStyle(item_r31));
|
|
159
|
+
i0.ɵɵproperty("field", item_r31.Name)("title", ctx_r3.GetColumnTitle(item_r31))("width", item_r31.width ? item_r31.width : 100)("editable", item_r31.EntityField.AllowUpdateAPI)("editor", ctx_r3.getEditor(item_r31.EntityField))("headerStyle", i0.ɵɵpureFunction0(9, _c4));
|
|
102
160
|
i0.ɵɵadvance(1);
|
|
103
|
-
i0.ɵɵproperty("ngIf",
|
|
161
|
+
i0.ɵɵproperty("ngIf", item_r31 === ctx_r3.visibleColumns[0]);
|
|
104
162
|
} }
|
|
105
163
|
function UserViewGridComponent_kendo_excelexport_column_8_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
-
i0.ɵɵelement(0, "kendo-excelexport-column",
|
|
164
|
+
i0.ɵɵelement(0, "kendo-excelexport-column", 22);
|
|
107
165
|
} if (rf & 2) {
|
|
108
|
-
const
|
|
109
|
-
i0.ɵɵproperty("field",
|
|
166
|
+
const exportCol_r34 = ctx.$implicit;
|
|
167
|
+
i0.ɵɵproperty("field", exportCol_r34.Name)("title", exportCol_r34.Name);
|
|
168
|
+
} }
|
|
169
|
+
function UserViewGridComponent_div_9_kendo_window_2_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
170
|
+
const _r41 = i0.ɵɵgetCurrentView();
|
|
171
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
172
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_div_9_kendo_window_2_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r40.closeCompareDialog("close")); });
|
|
173
|
+
i0.ɵɵtext(1, "Close");
|
|
174
|
+
i0.ɵɵelementEnd();
|
|
175
|
+
} }
|
|
176
|
+
function UserViewGridComponent_div_9_kendo_window_2_button_7_Template(rf, ctx) { if (rf & 1) {
|
|
177
|
+
const _r43 = i0.ɵɵgetCurrentView();
|
|
178
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
179
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_div_9_kendo_window_2_button_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r43); const ctx_r42 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r42.closeCompareDialog("cancel")); });
|
|
180
|
+
i0.ɵɵtext(1, "Cancel");
|
|
181
|
+
i0.ɵɵelementEnd();
|
|
182
|
+
} }
|
|
183
|
+
function UserViewGridComponent_div_9_kendo_window_2_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
184
|
+
const _r45 = i0.ɵɵgetCurrentView();
|
|
185
|
+
i0.ɵɵelementStart(0, "button", 33);
|
|
186
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_div_9_kendo_window_2_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r45); const ctx_r44 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r44.closeCompareDialog("merge")); });
|
|
187
|
+
i0.ɵɵtext(1, " Merge Records ");
|
|
188
|
+
i0.ɵɵelementEnd();
|
|
110
189
|
} }
|
|
111
190
|
function UserViewGridComponent_div_9_kendo_window_2_Template(rf, ctx) { if (rf & 1) {
|
|
112
|
-
const
|
|
113
|
-
i0.ɵɵelementStart(0, "kendo-window",
|
|
114
|
-
i0.ɵɵlistener("close", function UserViewGridComponent_div_9_kendo_window_2_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(
|
|
115
|
-
i0.ɵɵelementStart(1, "div",
|
|
116
|
-
i0.ɵɵelement(3, "mj-
|
|
117
|
-
i0.ɵɵelementEnd()()
|
|
191
|
+
const _r47 = i0.ɵɵgetCurrentView();
|
|
192
|
+
i0.ɵɵelementStart(0, "kendo-window", 25);
|
|
193
|
+
i0.ɵɵlistener("close", function UserViewGridComponent_div_9_kendo_window_2_Template_kendo_window_close_0_listener($event) { i0.ɵɵrestoreView(_r47); const ctx_r46 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r46.closeCompareDialog($event)); });
|
|
194
|
+
i0.ɵɵelementStart(1, "div", 26)(2, "div");
|
|
195
|
+
i0.ɵɵelement(3, "mj-compare-records", 27, 28);
|
|
196
|
+
i0.ɵɵelementEnd()();
|
|
197
|
+
i0.ɵɵelementStart(5, "div", 29);
|
|
198
|
+
i0.ɵɵtemplate(6, UserViewGridComponent_div_9_kendo_window_2_button_6_Template, 2, 0, "button", 30);
|
|
199
|
+
i0.ɵɵtemplate(7, UserViewGridComponent_div_9_kendo_window_2_button_7_Template, 2, 0, "button", 30);
|
|
200
|
+
i0.ɵɵtemplate(8, UserViewGridComponent_div_9_kendo_window_2_button_8_Template, 2, 0, "button", 31);
|
|
201
|
+
i0.ɵɵelementEnd()();
|
|
118
202
|
} if (rf & 2) {
|
|
119
|
-
const
|
|
120
|
-
i0.ɵɵproperty("
|
|
203
|
+
const ctx_r35 = i0.ɵɵnextContext(2);
|
|
204
|
+
i0.ɵɵproperty("minHeight", 300)("minWidth", 400)("resizable", true);
|
|
121
205
|
i0.ɵɵadvance(3);
|
|
122
|
-
i0.ɵɵproperty("recordsToCompare",
|
|
206
|
+
i0.ɵɵproperty("entityName", ctx_r35._entityInfo ? ctx_r35._entityInfo.Name : "")("recordsToCompare", ctx_r35.compareMode ? ctx_r35.compareRecords : ctx_r35.mergeRecords)("visibleColumns", ctx_r35.visibleColumns)("selectionMode", ctx_r35.mergeMode ? true : false);
|
|
207
|
+
i0.ɵɵadvance(3);
|
|
208
|
+
i0.ɵɵproperty("ngIf", ctx_r35.compareMode);
|
|
209
|
+
i0.ɵɵadvance(1);
|
|
210
|
+
i0.ɵɵproperty("ngIf", ctx_r35.mergeMode);
|
|
211
|
+
i0.ɵɵadvance(1);
|
|
212
|
+
i0.ɵɵproperty("ngIf", ctx_r35.mergeMode);
|
|
123
213
|
} }
|
|
124
214
|
function UserViewGridComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
125
215
|
i0.ɵɵelementStart(0, "div");
|
|
126
|
-
i0.ɵɵelement(1, "div",
|
|
127
|
-
i0.ɵɵtemplate(2, UserViewGridComponent_div_9_kendo_window_2_Template,
|
|
216
|
+
i0.ɵɵelement(1, "div", 23);
|
|
217
|
+
i0.ɵɵtemplate(2, UserViewGridComponent_div_9_kendo_window_2_Template, 9, 10, "kendo-window", 24);
|
|
128
218
|
i0.ɵɵelementEnd();
|
|
129
219
|
} if (rf & 2) {
|
|
130
220
|
const ctx_r6 = i0.ɵɵnextContext();
|
|
131
221
|
i0.ɵɵadvance(2);
|
|
132
|
-
i0.ɵɵproperty("ngIf", ctx_r6.
|
|
222
|
+
i0.ɵɵproperty("ngIf", ctx_r6.isCompareDialogOpened);
|
|
133
223
|
} }
|
|
134
224
|
export class UserViewGridComponent {
|
|
135
225
|
get PendingRecords() {
|
|
@@ -220,6 +310,7 @@ export class UserViewGridComponent {
|
|
|
220
310
|
this.kendoGridElement = null;
|
|
221
311
|
this.kendoGridElementRef = null;
|
|
222
312
|
this.kendoExcelExport = null;
|
|
313
|
+
this.recordCompareComponent = null;
|
|
223
314
|
this._pendingRecords = [];
|
|
224
315
|
this.viewData = [];
|
|
225
316
|
this.totalRowCount = 0;
|
|
@@ -237,11 +328,13 @@ export class UserViewGridComponent {
|
|
|
237
328
|
this.editModeEnded = new Subject();
|
|
238
329
|
this.compareMode = false;
|
|
239
330
|
this.compareRecords = [];
|
|
331
|
+
this.mergeMode = false;
|
|
332
|
+
this.mergeRecords = [];
|
|
240
333
|
this.selectableSettings = {
|
|
241
334
|
enabled: false
|
|
242
335
|
};
|
|
243
336
|
this.selectedKeys = [];
|
|
244
|
-
this.
|
|
337
|
+
this.isCompareDialogOpened = false;
|
|
245
338
|
this.showRefreshButton = true;
|
|
246
339
|
this.viewExecutionTime = 0;
|
|
247
340
|
this._viewDirty = false;
|
|
@@ -389,7 +482,7 @@ export class UserViewGridComponent {
|
|
|
389
482
|
}
|
|
390
483
|
cellClickHandler(args) {
|
|
391
484
|
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
-
if (this.compareMode)
|
|
485
|
+
if (this.compareMode || this.mergeMode)
|
|
393
486
|
return;
|
|
394
487
|
if (this._entityInfo) {
|
|
395
488
|
this.rowClicked.emit({
|
|
@@ -533,7 +626,7 @@ export class UserViewGridComponent {
|
|
|
533
626
|
});
|
|
534
627
|
}
|
|
535
628
|
Refresh(params) {
|
|
536
|
-
var _a;
|
|
629
|
+
var _a, _b, _c;
|
|
537
630
|
return __awaiter(this, void 0, void 0, function* () {
|
|
538
631
|
this.Params = params;
|
|
539
632
|
if (this.AllowLoad === false) {
|
|
@@ -546,19 +639,38 @@ export class UserViewGridComponent {
|
|
|
546
639
|
const rv = new RunView();
|
|
547
640
|
// get the view entity first so we can pass it in, otherwise it will end up getting loaded inside of RunView() which is inefficient as we need it too
|
|
548
641
|
// this is done for performance purposes
|
|
549
|
-
if (
|
|
642
|
+
if (params.ViewEntity) {
|
|
643
|
+
// When we receive the .ViewEntity via our params that is a time saver as we don't need to load it again, so ALWAYS use that instance of the entity object for the view entity
|
|
644
|
+
this._viewEntity = params.ViewEntity;
|
|
645
|
+
const e = md.Entities.find(x => { var _a; return x.ID === ((_a = this._viewEntity) === null || _a === void 0 ? void 0 : _a.EntityID); });
|
|
646
|
+
if (e)
|
|
647
|
+
this._entityInfo = e;
|
|
648
|
+
else
|
|
649
|
+
throw new Error("Unable to get entity info for view: " + ((_a = this._viewEntity) === null || _a === void 0 ? void 0 : _a.Name));
|
|
650
|
+
}
|
|
651
|
+
else if (!params.ViewEntity && (params.ViewID || params.ViewName)) {
|
|
652
|
+
// this is NOT a dyamic view as we got either the ViewID or ViewName, so we can get the ViewEntity
|
|
550
653
|
if (params.ViewID && params.ViewID > 0) {
|
|
551
654
|
this._viewEntity = (yield ViewInfo.GetViewEntity(params.ViewID));
|
|
552
|
-
this._entityInfo = md.Entities.find(x => { var _a; return x.ID === ((_a = this._viewEntity) === null || _a === void 0 ? void 0 : _a.Get('EntityID')); });
|
|
553
655
|
}
|
|
554
656
|
else if (params.ViewName) {
|
|
555
657
|
this._viewEntity = (yield ViewInfo.GetViewEntityByName(params.ViewName));
|
|
556
|
-
this._entityInfo = md.Entities.find(x => { var _a; return x.ID === ((_a = this._viewEntity) === null || _a === void 0 ? void 0 : _a.Get('EntityID')); });
|
|
557
658
|
}
|
|
558
659
|
params.ViewEntity = this._viewEntity;
|
|
660
|
+
const e = md.Entities.find(x => { var _a; return x.ID === ((_a = this._viewEntity) === null || _a === void 0 ? void 0 : _a.EntityID); });
|
|
661
|
+
if (e)
|
|
662
|
+
this._entityInfo = e;
|
|
663
|
+
else
|
|
664
|
+
throw new Error("Unable to get entity info for view: " + ((_b = this._viewEntity) === null || _b === void 0 ? void 0 : _b.Name));
|
|
665
|
+
}
|
|
666
|
+
else if (params.EntityName) {
|
|
667
|
+
// we don't have a ViewEntity because we're doing a dynamic view, so we need to get the entity info from the Entity Name
|
|
668
|
+
const e = md.Entities.find(x => x.Name === params.EntityName);
|
|
669
|
+
if (e)
|
|
670
|
+
this._entityInfo = e;
|
|
559
671
|
}
|
|
560
672
|
else
|
|
561
|
-
|
|
673
|
+
throw new Error("Invalid configuration, we need to receive either a ViewEntity, ViewID, ViewName, or EntityName and ExtraFilter in order to run a view");
|
|
562
674
|
const rvResult = yield rv.RunView(params);
|
|
563
675
|
if (!rvResult.Success) {
|
|
564
676
|
// it failed
|
|
@@ -569,17 +681,11 @@ export class UserViewGridComponent {
|
|
|
569
681
|
this.viewData = rvResult.Results;
|
|
570
682
|
this.totalRowCount = rvResult.TotalRowCount;
|
|
571
683
|
this.formattedData = new Array(this.viewData.length);
|
|
572
|
-
if (this._viewEntity) {
|
|
573
|
-
// we were passed the view entity for efficiency, no need to load it again!
|
|
574
|
-
this._entityInfo = md.Entities.find(x => { var _a; return x.ID === ((_a = this._viewEntity) === null || _a === void 0 ? void 0 : _a.Get('EntityID')); });
|
|
575
|
-
}
|
|
576
|
-
else
|
|
577
|
-
this._entityInfo = md.Entities.find(x => x.Name === params.EntityName);
|
|
578
684
|
let cols;
|
|
579
685
|
if (this._viewEntity)
|
|
580
686
|
cols = this._viewEntity.Columns;
|
|
581
687
|
else
|
|
582
|
-
cols = (
|
|
688
|
+
cols = (_c = this._entityInfo) === null || _c === void 0 ? void 0 : _c.Fields.filter((f) => f.DefaultInView).map((f) => {
|
|
583
689
|
return {
|
|
584
690
|
ID: f.ID,
|
|
585
691
|
Name: f.Name,
|
|
@@ -637,26 +743,98 @@ export class UserViewGridComponent {
|
|
|
637
743
|
}
|
|
638
744
|
}
|
|
639
745
|
selectionChange(args) {
|
|
640
|
-
var _a, _b, _c, _d;
|
|
641
|
-
if (this.
|
|
642
|
-
|
|
643
|
-
|
|
746
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
747
|
+
if (this.compareMode) {
|
|
748
|
+
if (this.compareRecords.length && ((_a = args === null || args === void 0 ? void 0 : args.deselectedRows) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
749
|
+
const tempRow = (_b = args === null || args === void 0 ? void 0 : args.deselectedRows[0]) === null || _b === void 0 ? void 0 : _b.dataItem;
|
|
750
|
+
this.compareRecords = this.compareRecords.filter(record => record.ID !== (tempRow === null || tempRow === void 0 ? void 0 : tempRow.ID));
|
|
751
|
+
}
|
|
752
|
+
else if ((_c = args === null || args === void 0 ? void 0 : args.selectedRows) === null || _c === void 0 ? void 0 : _c.length) {
|
|
753
|
+
const tempRow = (_d = args === null || args === void 0 ? void 0 : args.selectedRows[0]) === null || _d === void 0 ? void 0 : _d.dataItem;
|
|
754
|
+
this.compareRecords.push(tempRow);
|
|
755
|
+
}
|
|
644
756
|
}
|
|
645
|
-
else if (
|
|
646
|
-
|
|
647
|
-
|
|
757
|
+
else if (this.mergeMode) {
|
|
758
|
+
if (this.mergeRecords.length && ((_e = args === null || args === void 0 ? void 0 : args.deselectedRows) === null || _e === void 0 ? void 0 : _e.length)) {
|
|
759
|
+
const tempRow = (_f = args === null || args === void 0 ? void 0 : args.deselectedRows[0]) === null || _f === void 0 ? void 0 : _f.dataItem;
|
|
760
|
+
this.mergeRecords = this.mergeRecords.filter(record => record.ID !== (tempRow === null || tempRow === void 0 ? void 0 : tempRow.ID));
|
|
761
|
+
}
|
|
762
|
+
else if ((_g = args === null || args === void 0 ? void 0 : args.selectedRows) === null || _g === void 0 ? void 0 : _g.length) {
|
|
763
|
+
const tempRow = (_h = args === null || args === void 0 ? void 0 : args.selectedRows[0]) === null || _h === void 0 ? void 0 : _h.dataItem;
|
|
764
|
+
this.mergeRecords.push(tempRow);
|
|
765
|
+
}
|
|
648
766
|
}
|
|
649
767
|
}
|
|
650
768
|
enableCompare(cancel = false) {
|
|
651
|
-
if (!cancel && this.
|
|
652
|
-
this
|
|
769
|
+
if (!cancel && this.compareRecords.length >= 2) {
|
|
770
|
+
// this scenario occurs when we've already started the compare and the user has selected records, then clicked the compare button again
|
|
771
|
+
this.isCompareDialogOpened = true;
|
|
772
|
+
}
|
|
773
|
+
else if (cancel) {
|
|
774
|
+
// the user clicked cancel in our toolbar
|
|
775
|
+
this.compareMode = false;
|
|
776
|
+
this.compareRecords = [];
|
|
777
|
+
this.selectedKeys = [];
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
// just turning on compare mode from the compare button, so just turn it on and let the user select records
|
|
781
|
+
this.compareMode = true;
|
|
653
782
|
}
|
|
654
|
-
this.compareMode = !this.compareMode;
|
|
655
|
-
this.selectedKeys = [];
|
|
656
783
|
}
|
|
657
|
-
|
|
658
|
-
this.
|
|
659
|
-
|
|
784
|
+
enableMerge(cancel = false) {
|
|
785
|
+
if (!cancel && this.mergeRecords.length >= 2) {
|
|
786
|
+
// this scenario occurs when we've already started the merge and the user has selected records, then clicked the merge button again
|
|
787
|
+
this.isCompareDialogOpened = true;
|
|
788
|
+
}
|
|
789
|
+
else if (cancel) {
|
|
790
|
+
// the user clicked cancel in our toolbar
|
|
791
|
+
this.mergeMode = false;
|
|
792
|
+
this.mergeRecords = [];
|
|
793
|
+
this.selectedKeys = [];
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
// just turning on merge mode from the merge button, so just turn it on and let the user select records
|
|
797
|
+
this.mergeMode = true;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
closeCompareDialog(event) {
|
|
801
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
802
|
+
console.log(event);
|
|
803
|
+
switch (event) {
|
|
804
|
+
case 'merge':
|
|
805
|
+
// user has requested to merge the records and retain the selected record from the compare records component, so run the merge
|
|
806
|
+
if (this._entityInfo && this.recordCompareComponent) {
|
|
807
|
+
const md = new Metadata();
|
|
808
|
+
const result = yield md.MergeRecords({
|
|
809
|
+
EntityName: this._entityInfo.Name,
|
|
810
|
+
RecordsToMerge: this.mergeRecords.map((r) => r.ID).filter((id) => { var _a; return id !== ((_a = this.recordCompareComponent) === null || _a === void 0 ? void 0 : _a.selectedRecordId); }),
|
|
811
|
+
SurvivingRecordID: this.recordCompareComponent.selectedRecordId
|
|
812
|
+
});
|
|
813
|
+
if (result.Success) {
|
|
814
|
+
// merge was successful, so refresh the grid
|
|
815
|
+
this.selectedKeys = [];
|
|
816
|
+
this.compareRecords = [];
|
|
817
|
+
this.mergeRecords = [];
|
|
818
|
+
this.mergeMode = false;
|
|
819
|
+
this.compareMode = false;
|
|
820
|
+
this.Refresh(this.Params);
|
|
821
|
+
}
|
|
822
|
+
else {
|
|
823
|
+
// the merge failed, so show an error message
|
|
824
|
+
this.CreateSimpleNotification("Error merging records: " + result.OverallStatus, 'error', 5000);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
break;
|
|
828
|
+
default: // close and cancel
|
|
829
|
+
this.selectedKeys = [];
|
|
830
|
+
this.compareRecords = [];
|
|
831
|
+
this.mergeRecords = [];
|
|
832
|
+
this.mergeMode = false;
|
|
833
|
+
this.compareMode = false;
|
|
834
|
+
break;
|
|
835
|
+
}
|
|
836
|
+
this.isCompareDialogOpened = false;
|
|
837
|
+
});
|
|
660
838
|
}
|
|
661
839
|
doExcelExport() {
|
|
662
840
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -702,15 +880,17 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
702
880
|
i0.ɵɵviewQuery(_c0, 5, GridComponent);
|
|
703
881
|
i0.ɵɵviewQuery(_c0, 5, ElementRef);
|
|
704
882
|
i0.ɵɵviewQuery(_c1, 5, ExcelExportComponent);
|
|
883
|
+
i0.ɵɵviewQuery(_c2, 5);
|
|
705
884
|
} if (rf & 2) {
|
|
706
885
|
let _t;
|
|
707
886
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoGridElement = _t.first);
|
|
708
887
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoGridElementRef = _t.first);
|
|
709
888
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoExcelExport = _t.first);
|
|
710
|
-
|
|
889
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recordCompareComponent = _t.first);
|
|
890
|
+
} }, inputs: { Params: "Params", BottomMargin: "BottomMargin", InEditMode: "InEditMode", EditMode: "EditMode", AutoNavigate: "AutoNavigate", AllowLoad: "AllowLoad" }, outputs: { rowClicked: "rowClicked", rowEdited: "rowEdited" }, decls: 10, vars: 19, consts: [["mjFillContainer", "", 1, "user-view-grid-wrap"], ["mjFillContainer", "", "scrollable", "virtual", "kendoGridSelectBy", "", 3, "resizable", "data", "skip", "pageSize", "rowHeight", "loading", "height", "sortable", "sort", "reorderable", "selectable", "selectedKeys", "pageChange", "selectedKeysChange", "cellClick", "cellClose", "columnReorder", "columnResize", "selectionChange", "sortChange"], ["kendoGrid", ""], ["kendoGridToolbarTemplate", ""], [3, "width", "headerStyle", "style", 4, "ngIf"], [3, "field", "title", "width", "editable", "editor", "headerStyle", "style", 4, "ngFor", "ngForOf"], [3, "data", "fileName"], ["excelExport", ""], [3, "field", "title", 4, "ngFor", "ngForOf"], [4, "ngIf"], ["kendoButton", "", "icon", "file-excel", 3, "click", 4, "ngIf"], ["class", "k-button k-button-md k-rounded-md k-button-solid-base k-button-solid", 3, "disabled", "click", 4, "ngIf"], ["class", "k-button k-button-md k-rounded-md k-button-solid-base k-button-solid", 3, "click", 4, "ngIf"], ["kendoButton", "", "icon", "refresh", 3, "primary", "click", 4, "ngIf"], ["kendoButton", "", "icon", "file-excel", 3, "click"], [1, "k-button", "k-button-md", "k-rounded-md", "k-button-solid-base", "k-button-solid", 3, "disabled", "click"], [1, "k-button", "k-button-md", "k-rounded-md", "k-button-solid-base", "k-button-solid", 3, "click"], ["kendoButton", "", "icon", "refresh", 3, "primary", "click"], [3, "width", "headerStyle"], [3, "field", "title", "width", "editable", "editor", "headerStyle"], ["kendoGridFooterTemplate", ""], [2, "font-size", "smaller", "font-weight", "normal"], [3, "field", "title"], [1, "k-overlay"], ["title", "Compare Records", 3, "minHeight", "minWidth", "resizable", "close", 4, "ngIf"], ["title", "Compare Records", 3, "minHeight", "minWidth", "resizable", "close"], [1, "k-d-flex", "k-flex-col", "k-justify-content-between", "k-h-full"], [3, "entityName", "recordsToCompare", "visibleColumns", "selectionMode"], ["recordCompareRef", ""], [1, "k-actions", "k-actions-end"], ["kendoButton", "", "type", "button", 3, "click", 4, "ngIf"], ["kendoButton", "", "themeColor", "primary", "type", "button", 3, "click", 4, "ngIf"], ["kendoButton", "", "type", "button", 3, "click"], ["kendoButton", "", "themeColor", "primary", "type", "button", 3, "click"]], template: function UserViewGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
711
891
|
i0.ɵɵelementStart(0, "div", 0)(1, "kendo-grid", 1, 2);
|
|
712
892
|
i0.ɵɵlistener("pageChange", function UserViewGridComponent_Template_kendo_grid_pageChange_1_listener($event) { return ctx.pageChange($event); })("selectedKeysChange", function UserViewGridComponent_Template_kendo_grid_selectedKeysChange_1_listener($event) { return ctx.selectedKeys = $event; })("cellClick", function UserViewGridComponent_Template_kendo_grid_cellClick_1_listener($event) { return ctx.cellClickHandler($event); })("cellClose", function UserViewGridComponent_Template_kendo_grid_cellClose_1_listener($event) { return ctx.cellCloseHandler($event); })("columnReorder", function UserViewGridComponent_Template_kendo_grid_columnReorder_1_listener($event) { return ctx.columnReorder($event); })("columnResize", function UserViewGridComponent_Template_kendo_grid_columnResize_1_listener($event) { return ctx.columnResize($event); })("selectionChange", function UserViewGridComponent_Template_kendo_grid_selectionChange_1_listener($event) { return ctx.selectionChange($event); })("sortChange", function UserViewGridComponent_Template_kendo_grid_sortChange_1_listener($event) { return ctx.sortChanged($event); });
|
|
713
|
-
i0.ɵɵtemplate(3, UserViewGridComponent_ng_template_3_Template,
|
|
893
|
+
i0.ɵɵtemplate(3, UserViewGridComponent_ng_template_3_Template, 8, 8, "ng-template", 3);
|
|
714
894
|
i0.ɵɵtemplate(4, UserViewGridComponent_kendo_grid_checkbox_column_4_Template, 1, 6, "kendo-grid-checkbox-column", 4);
|
|
715
895
|
i0.ɵɵtemplate(5, UserViewGridComponent_kendo_grid_column_5_Template, 2, 10, "kendo-grid-column", 5);
|
|
716
896
|
i0.ɵɵelementStart(6, "kendo-excelexport", 6, 7);
|
|
@@ -721,7 +901,7 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
721
901
|
i0.ɵɵadvance(1);
|
|
722
902
|
i0.ɵɵproperty("resizable", true)("data", ctx.gridView)("skip", ctx.skip)("pageSize", ctx.pageSize)("rowHeight", 36)("loading", ctx.isLoading)("height", ctx.gridHeight)("sortable", true)("sort", ctx.sortSettings)("resizable", true)("reorderable", true)("selectable", true)("selectedKeys", ctx.selectedKeys);
|
|
723
903
|
i0.ɵɵadvance(3);
|
|
724
|
-
i0.ɵɵproperty("ngIf", ctx.compareMode);
|
|
904
|
+
i0.ɵɵproperty("ngIf", ctx.compareMode || ctx.mergeMode);
|
|
725
905
|
i0.ɵɵadvance(1);
|
|
726
906
|
i0.ɵɵproperty("ngForOf", ctx.visibleColumns);
|
|
727
907
|
i0.ɵɵadvance(1);
|
|
@@ -729,11 +909,11 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
729
909
|
i0.ɵɵadvance(2);
|
|
730
910
|
i0.ɵɵproperty("ngForOf", ctx.exportColumns);
|
|
731
911
|
i0.ɵɵadvance(1);
|
|
732
|
-
i0.ɵɵproperty("ngIf", ctx.
|
|
733
|
-
} }, dependencies: [i3.NgForOf, i3.NgIf, i4.GridComponent, i4.ToolbarTemplateDirective, i4.SelectionDirective, i4.ColumnComponent, i4.FooterTemplateDirective, i4.CheckboxColumnComponent, i5.WindowComponent, i6.ExcelExportComponent, i6.ColumnComponent, i7.Button, i8.FillContainer, i3.DecimalPipe], styles: [".user-view-grid-wrap[_ngcontent-%COMP%] {\r\n height: calc(100vh-20px);\r\n}\r\n\r\n.user-view-grid-column-header[_ngcontent-%COMP%] {\r\n background-color: #a9c2af;\r\n font-size: 20pt;\r\n font-weight: bold;\r\n}"] });
|
|
912
|
+
i0.ɵɵproperty("ngIf", ctx.isCompareDialogOpened);
|
|
913
|
+
} }, dependencies: [i3.NgForOf, i3.NgIf, i4.GridComponent, i4.ToolbarTemplateDirective, i4.SelectionDirective, i4.ColumnComponent, i4.FooterTemplateDirective, i4.CheckboxColumnComponent, i5.WindowComponent, i6.ExcelExportComponent, i6.ColumnComponent, i7.Button, i8.CompareRecordsComponent, i9.FillContainer, i3.DecimalPipe], styles: [".user-view-grid-wrap[_ngcontent-%COMP%] {\r\n height: calc(100vh-20px);\r\n}\r\n\r\n.user-view-grid-column-header[_ngcontent-%COMP%] {\r\n background-color: #a9c2af;\r\n font-size: 20pt;\r\n font-weight: bold;\r\n}"] });
|
|
734
914
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserViewGridComponent, [{
|
|
735
915
|
type: Component,
|
|
736
|
-
args: [{ selector: 'mj-user-view-grid', template: "<div class=\"user-view-grid-wrap\" mjFillContainer>\r\n <kendo-grid #kendoGrid\r\n mjFillContainer\r\n [resizable]=\"true\"\r\n [data]=\"gridView\" \r\n [skip]=\"skip\"\r\n [pageSize]=\"pageSize\"\r\n scrollable=\"virtual\"\r\n [rowHeight]=\"36\"\r\n (pageChange)=\"pageChange($event)\"\r\n [loading]=\"isLoading\"\r\n [height]=\"gridHeight\"\r\n [sortable]=\"true\"\r\n [sort]=\"sortSettings\" \r\n [resizable]=\"true\"\r\n [reorderable]=\"true\"\r\n [selectable]=\"true\"\r\n kendoGridSelectBy\r\n [(selectedKeys)]=\"selectedKeys\"\r\n (cellClick)=\"cellClickHandler($event)\"\r\n (cellClose)=\"cellCloseHandler($event)\"\r\n (columnReorder)=\"columnReorder($event)\"\r\n (columnResize)=\"columnResize($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (sortChange)=\"sortChanged($event)\"\r\n >\r\n <ng-template kendoGridToolbarTemplate>\r\n <button kendoButton icon=\"file-excel\"
|
|
916
|
+
args: [{ selector: 'mj-user-view-grid', template: "<div class=\"user-view-grid-wrap\" mjFillContainer>\r\n <kendo-grid #kendoGrid\r\n mjFillContainer\r\n [resizable]=\"true\"\r\n [data]=\"gridView\" \r\n [skip]=\"skip\"\r\n [pageSize]=\"pageSize\"\r\n scrollable=\"virtual\"\r\n [rowHeight]=\"36\"\r\n (pageChange)=\"pageChange($event)\"\r\n [loading]=\"isLoading\"\r\n [height]=\"gridHeight\"\r\n [sortable]=\"true\"\r\n [sort]=\"sortSettings\" \r\n [resizable]=\"true\"\r\n [reorderable]=\"true\"\r\n [selectable]=\"true\"\r\n kendoGridSelectBy\r\n [(selectedKeys)]=\"selectedKeys\"\r\n (cellClick)=\"cellClickHandler($event)\"\r\n (cellClose)=\"cellCloseHandler($event)\"\r\n (columnReorder)=\"columnReorder($event)\"\r\n (columnResize)=\"columnResize($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (sortChange)=\"sortChanged($event)\"\r\n >\r\n <ng-template kendoGridToolbarTemplate>\r\n <button kendoButton icon=\"file-excel\" *ngIf=\"!compareMode && !mergeMode\" (click)=\"doExcelExport()\" >Export to Excel</button>\r\n <!-- 3 buttons for compare. First one only shows when comparison is going on in the grid, the next one is the one the user starts the process with before records are selected, last one is to cancel the pending compare. -->\r\n <button (click)=\"enableCompare()\" *ngIf=\"!compareMode && !mergeMode\" [disabled]=\"compareMode && compareRecords.length < 2\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Compare</button>\r\n <button (click)=\"enableCompare()\" *ngIf=\"compareMode\" [disabled]=\"compareMode && compareRecords.length < 2\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Compare</button>\r\n <button (click)=\"enableCompare(true)\" *ngIf=\"compareMode\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Cancel</button>\r\n\r\n <!-- 3 buttons for merge. First one only shows when merge is getting goin in the grid, the next one is the one the user starts the process with before records are selected, last one is to cancel the pending merge. -->\r\n <button (click)=\"enableMerge()\" *ngIf=\"mergeMode\" [disabled]=\"mergeMode && mergeRecords.length < 2\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Merge</button>\r\n <button (click)=\"enableMerge()\" *ngIf=\"!mergeMode && !compareMode\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Merge</button>\r\n <button (click)=\"enableMerge(true)\" *ngIf=\"mergeMode\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Cancel</button>\r\n <button\r\n kendoButton\r\n [primary]=\"true\"\r\n icon=\"refresh\"\r\n *ngIf=\"showRefreshButton && !compareMode && !mergeMode\"\r\n (click)=\"RefreshFromSavedParams()\">\r\n Refresh\r\n </button>\r\n </ng-template>\r\n\r\n <kendo-grid-checkbox-column \r\n *ngIf=\"compareMode || mergeMode\" \r\n [width]=\"50\" \r\n [headerStyle]=\"{ 'font-weight' : 'bold', 'background-color': '#a9c2af' }\" \r\n [style]=\"{'text-align': 'center', 'vertical-align': 'center'}\">\r\n </kendo-grid-checkbox-column>\r\n \r\n <kendo-grid-column \r\n *ngFor=\"let item of visibleColumns\" \r\n [field]=\"item.Name\" \r\n [title]=\"GetColumnTitle(item)\"\r\n [width]=\"item.width ? item.width : 100\"\r\n [editable]=\"item.EntityField.AllowUpdateAPI\"\r\n [editor]=\"getEditor(item.EntityField)\"\r\n [headerStyle]=\"{ 'font-weight' : 'bold', 'background-color': '#a9c2af' }\"\r\n [style]=\"this.GetColumnCellStyle(item)\"\r\n >\r\n <ng-template *ngIf=\"item===visibleColumns[0]\" kendoGridFooterTemplate >\r\n {{this.viewData.length | number}}{{this.totalRowCount > this.viewData.length ? ' of ' + (this.totalRowCount | number) : ' rows'}}<br/><span style=\"font-size: smaller; font-weight: normal;\">{{viewExecutionTime | number:'1.2-2'}} seconds</span>\r\n </ng-template>\r\n </kendo-grid-column>\r\n\r\n <kendo-excelexport #excelExport [data]=\"exportData\" [fileName]=\"(_viewEntity ? _viewEntity.Get('Name') : _entityInfo?.Name) + '.xlsx'\">\r\n <kendo-excelexport-column *ngFor=\"let exportCol of exportColumns\" [field]=\"exportCol.Name\" [title]=\"exportCol.Name\">\r\n </kendo-excelexport-column>\r\n </kendo-excelexport>\r\n </kendo-grid>\r\n</div>\r\n\r\n<div *ngIf=\"isCompareDialogOpened\">\r\n <div class=\"k-overlay\"></div>\r\n <kendo-window\r\n [minHeight]=\"300\"\r\n [minWidth]=\"400\"\r\n [resizable]=\"true\"\r\n (close)=\"closeCompareDialog($event)\"\r\n title=\"Compare Records\"\r\n *ngIf=\"isCompareDialogOpened\"\r\n >\r\n <div class=\"k-d-flex k-flex-col k-justify-content-between k-h-full\">\r\n <div>\r\n <mj-compare-records\r\n #recordCompareRef\r\n [entityName]=\"_entityInfo ? _entityInfo.Name : ''\"\r\n [recordsToCompare]=\"compareMode ? compareRecords : mergeRecords\" \r\n [visibleColumns]=\"visibleColumns\" \r\n [selectionMode]=\"mergeMode ? true : false\"\r\n >\r\n </mj-compare-records>\r\n </div>\r\n </div>\r\n <div class=\"k-actions k-actions-end\">\r\n <button *ngIf=\"compareMode\" kendoButton type=\"button\" (click)=\"closeCompareDialog('close')\">Close</button>\r\n <button *ngIf=\"mergeMode\"kendoButton type=\"button\" (click)=\"closeCompareDialog('cancel')\">Cancel</button>\r\n <button *ngIf=\"mergeMode\"\r\n kendoButton\r\n themeColor=\"primary\"\r\n type=\"button\"\r\n (click)=\"closeCompareDialog('merge')\"\r\n >\r\n Merge Records\r\n </button>\r\n </div> \r\n </kendo-window>\r\n</div>\r\n ", styles: [".user-view-grid-wrap {\r\n height: calc(100vh-20px);\r\n}\r\n\r\n.user-view-grid-column-header {\r\n background-color: #a9c2af;\r\n font-size: 20pt;\r\n font-weight: bold;\r\n}"] }]
|
|
737
917
|
}], function () { return [{ type: i1.FormBuilder }, { type: i2.Router }]; }, { Params: [{
|
|
738
918
|
type: Input
|
|
739
919
|
}], BottomMargin: [{
|
|
@@ -757,6 +937,9 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
757
937
|
}], kendoExcelExport: [{
|
|
758
938
|
type: ViewChild,
|
|
759
939
|
args: ['excelExport', { read: ExcelExportComponent }]
|
|
940
|
+
}], recordCompareComponent: [{
|
|
941
|
+
type: ViewChild,
|
|
942
|
+
args: ['recordCompareRef', { static: false }]
|
|
760
943
|
}], AllowLoad: [{
|
|
761
944
|
type: Input
|
|
762
945
|
}] }); })();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-user-view-grid",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.41",
|
|
4
4
|
"description": "MemberJunction: Angular Grid to display dynamic and saved user views for any entity in MemberJunction.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|