@memberjunction/ng-user-view-grid 0.9.43 → 0.9.45
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.
|
@@ -56,10 +56,9 @@ export declare class UserViewGridComponent implements OnInit, AfterViewInit {
|
|
|
56
56
|
_entityInfo: EntityInfo | undefined;
|
|
57
57
|
private _newGridState;
|
|
58
58
|
private editModeEnded;
|
|
59
|
+
recordsToCompare: any[];
|
|
59
60
|
compareMode: boolean;
|
|
60
|
-
compareRecords: BaseEntity[];
|
|
61
61
|
mergeMode: boolean;
|
|
62
|
-
mergeRecords: BaseEntity[];
|
|
63
62
|
selectableSettings: SelectableSettings;
|
|
64
63
|
selectedKeys: any[];
|
|
65
64
|
isCompareDialogOpened: boolean;
|
|
@@ -101,8 +100,7 @@ export declare class UserViewGridComponent implements OnInit, AfterViewInit {
|
|
|
101
100
|
'vertical-align': string;
|
|
102
101
|
};
|
|
103
102
|
selectionChange(args: SelectionEvent): void;
|
|
104
|
-
|
|
105
|
-
enableMerge(cancel?: boolean): void;
|
|
103
|
+
enableMergeOrCompare(cancel: boolean | undefined, type: 'merge' | 'compare'): void;
|
|
106
104
|
closeConfirmMergeDialog(event: 'cancel' | 'yes' | 'no'): Promise<void>;
|
|
107
105
|
closeCompareDialog(event: 'close' | 'cancel' | 'merge'): Promise<void>;
|
|
108
106
|
exportColumns: ViewColumnInfo[];
|
|
@@ -29,81 +29,81 @@ const _c0 = ["kendoGrid"];
|
|
|
29
29
|
const _c1 = ["excelExport"];
|
|
30
30
|
const _c2 = ["recordCompareRef"];
|
|
31
31
|
function UserViewGridComponent_ng_template_3_button_0_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
-
const
|
|
33
|
-
i0.ɵɵelementStart(0, "button",
|
|
34
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
32
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
33
|
+
i0.ɵɵelementStart(0, "button", 14);
|
|
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
35
|
i0.ɵɵtext(1, "Export to Excel");
|
|
36
36
|
i0.ɵɵelementEnd();
|
|
37
37
|
} }
|
|
38
38
|
function UserViewGridComponent_ng_template_3_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
-
const
|
|
40
|
-
i0.ɵɵelementStart(0, "button",
|
|
41
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
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.enableMergeOrCompare(false, "compare")); });
|
|
42
42
|
i0.ɵɵtext(1, "Compare");
|
|
43
43
|
i0.ɵɵelementEnd();
|
|
44
44
|
} if (rf & 2) {
|
|
45
|
-
const
|
|
46
|
-
i0.ɵɵproperty("disabled",
|
|
45
|
+
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
46
|
+
i0.ɵɵproperty("disabled", ctx_r8.compareMode && ctx_r8.recordsToCompare.length < 2);
|
|
47
47
|
} }
|
|
48
48
|
function UserViewGridComponent_ng_template_3_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
-
const
|
|
50
|
-
i0.ɵɵelementStart(0, "button",
|
|
51
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
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.enableMergeOrCompare(false, "compare")); });
|
|
52
52
|
i0.ɵɵtext(1, "Compare");
|
|
53
53
|
i0.ɵɵelementEnd();
|
|
54
54
|
} if (rf & 2) {
|
|
55
|
-
const
|
|
56
|
-
i0.ɵɵproperty("disabled",
|
|
55
|
+
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
56
|
+
i0.ɵɵproperty("disabled", ctx_r9.compareMode && ctx_r9.recordsToCompare.length < 2);
|
|
57
57
|
} }
|
|
58
58
|
function UserViewGridComponent_ng_template_3_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
-
const
|
|
60
|
-
i0.ɵɵelementStart(0, "button",
|
|
61
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
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.enableMergeOrCompare(true, "compare")); });
|
|
62
62
|
i0.ɵɵtext(1, "Cancel");
|
|
63
63
|
i0.ɵɵelementEnd();
|
|
64
64
|
} }
|
|
65
65
|
function UserViewGridComponent_ng_template_3_button_4_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
-
const
|
|
67
|
-
i0.ɵɵelementStart(0, "button",
|
|
68
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
66
|
+
const _r24 = i0.ɵɵgetCurrentView();
|
|
67
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
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.enableMergeOrCompare(false, "merge")); });
|
|
69
69
|
i0.ɵɵtext(1, "Merge");
|
|
70
70
|
i0.ɵɵelementEnd();
|
|
71
71
|
} if (rf & 2) {
|
|
72
|
-
const
|
|
73
|
-
i0.ɵɵproperty("disabled",
|
|
72
|
+
const ctx_r11 = i0.ɵɵnextContext(2);
|
|
73
|
+
i0.ɵɵproperty("disabled", ctx_r11.mergeMode && ctx_r11.recordsToCompare.length < 2);
|
|
74
74
|
} }
|
|
75
75
|
function UserViewGridComponent_ng_template_3_button_5_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
-
const
|
|
77
|
-
i0.ɵɵelementStart(0, "button",
|
|
78
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
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.enableMergeOrCompare(false, "merge")); });
|
|
79
79
|
i0.ɵɵtext(1, "Merge");
|
|
80
80
|
i0.ɵɵelementEnd();
|
|
81
81
|
} }
|
|
82
82
|
function UserViewGridComponent_ng_template_3_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
-
const
|
|
84
|
-
i0.ɵɵelementStart(0, "button",
|
|
85
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
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.enableMergeOrCompare(true, "merge")); });
|
|
86
86
|
i0.ɵɵtext(1, "Cancel");
|
|
87
87
|
i0.ɵɵelementEnd();
|
|
88
88
|
} }
|
|
89
89
|
function UserViewGridComponent_ng_template_3_button_7_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
-
const
|
|
91
|
-
i0.ɵɵelementStart(0, "button",
|
|
92
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_ng_template_3_button_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
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()); });
|
|
93
93
|
i0.ɵɵtext(1, " Refresh ");
|
|
94
94
|
i0.ɵɵelementEnd();
|
|
95
95
|
} if (rf & 2) {
|
|
96
96
|
i0.ɵɵproperty("primary", true);
|
|
97
97
|
} }
|
|
98
98
|
function UserViewGridComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
99
|
-
i0.ɵɵtemplate(0, UserViewGridComponent_ng_template_3_button_0_Template, 2, 0, "button",
|
|
100
|
-
i0.ɵɵtemplate(1, UserViewGridComponent_ng_template_3_button_1_Template, 2, 1, "button",
|
|
101
|
-
i0.ɵɵtemplate(2, UserViewGridComponent_ng_template_3_button_2_Template, 2, 1, "button",
|
|
102
|
-
i0.ɵɵtemplate(3, UserViewGridComponent_ng_template_3_button_3_Template, 2, 0, "button",
|
|
103
|
-
i0.ɵɵtemplate(4, UserViewGridComponent_ng_template_3_button_4_Template, 2, 1, "button",
|
|
104
|
-
i0.ɵɵtemplate(5, UserViewGridComponent_ng_template_3_button_5_Template, 2, 0, "button",
|
|
105
|
-
i0.ɵɵtemplate(6, UserViewGridComponent_ng_template_3_button_6_Template, 2, 0, "button",
|
|
106
|
-
i0.ɵɵtemplate(7, UserViewGridComponent_ng_template_3_button_7_Template, 2, 1, "button",
|
|
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);
|
|
107
107
|
} if (rf & 2) {
|
|
108
108
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
109
109
|
i0.ɵɵproperty("ngIf", !ctx_r1.compareMode && !ctx_r1.mergeMode);
|
|
@@ -125,7 +125,7 @@ function UserViewGridComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
125
125
|
const _c3 = function () { return { "text-align": "center", "vertical-align": "center" }; };
|
|
126
126
|
const _c4 = function () { return { "font-weight": "bold", "background-color": "#a9c2af" }; };
|
|
127
127
|
function UserViewGridComponent_kendo_grid_checkbox_column_4_Template(rf, ctx) { if (rf & 1) {
|
|
128
|
-
i0.ɵɵelement(0, "kendo-grid-checkbox-column",
|
|
128
|
+
i0.ɵɵelement(0, "kendo-grid-checkbox-column", 18);
|
|
129
129
|
} if (rf & 2) {
|
|
130
130
|
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(4, _c3));
|
|
131
131
|
i0.ɵɵproperty("width", 50)("headerStyle", i0.ɵɵpureFunction0(5, _c4));
|
|
@@ -135,36 +135,36 @@ function UserViewGridComponent_kendo_grid_column_5_1_ng_template_0_Template(rf,
|
|
|
135
135
|
i0.ɵɵpipe(1, "number");
|
|
136
136
|
i0.ɵɵpipe(2, "number");
|
|
137
137
|
i0.ɵɵelement(3, "br");
|
|
138
|
-
i0.ɵɵelementStart(4, "span",
|
|
138
|
+
i0.ɵɵelementStart(4, "span", 21);
|
|
139
139
|
i0.ɵɵtext(5);
|
|
140
140
|
i0.ɵɵpipe(6, "number");
|
|
141
141
|
i0.ɵɵelementEnd();
|
|
142
142
|
} if (rf & 2) {
|
|
143
|
-
const
|
|
144
|
-
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", "");
|
|
145
145
|
i0.ɵɵadvance(5);
|
|
146
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(6, 7,
|
|
146
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(6, 7, ctx_r33.viewExecutionTime, "1.2-2"), " seconds");
|
|
147
147
|
} }
|
|
148
148
|
function UserViewGridComponent_kendo_grid_column_5_1_Template(rf, ctx) { if (rf & 1) {
|
|
149
|
-
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);
|
|
150
150
|
} }
|
|
151
151
|
function UserViewGridComponent_kendo_grid_column_5_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
-
i0.ɵɵelementStart(0, "kendo-grid-column",
|
|
152
|
+
i0.ɵɵelementStart(0, "kendo-grid-column", 19);
|
|
153
153
|
i0.ɵɵtemplate(1, UserViewGridComponent_kendo_grid_column_5_1_Template, 1, 0, null, 9);
|
|
154
154
|
i0.ɵɵelementEnd();
|
|
155
155
|
} if (rf & 2) {
|
|
156
|
-
const
|
|
156
|
+
const item_r31 = ctx.$implicit;
|
|
157
157
|
const ctx_r3 = i0.ɵɵnextContext();
|
|
158
|
-
i0.ɵɵstyleMap(ctx_r3.GetColumnCellStyle(
|
|
159
|
-
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));
|
|
160
160
|
i0.ɵɵadvance(1);
|
|
161
|
-
i0.ɵɵproperty("ngIf",
|
|
161
|
+
i0.ɵɵproperty("ngIf", item_r31 === ctx_r3.visibleColumns[0]);
|
|
162
162
|
} }
|
|
163
163
|
function UserViewGridComponent_kendo_excelexport_column_8_Template(rf, ctx) { if (rf & 1) {
|
|
164
|
-
i0.ɵɵelement(0, "kendo-excelexport-column",
|
|
164
|
+
i0.ɵɵelement(0, "kendo-excelexport-column", 22);
|
|
165
165
|
} if (rf & 2) {
|
|
166
|
-
const
|
|
167
|
-
i0.ɵɵproperty("field",
|
|
166
|
+
const exportCol_r34 = ctx.$implicit;
|
|
167
|
+
i0.ɵɵproperty("field", exportCol_r34.Name)("title", exportCol_r34.Name);
|
|
168
168
|
} }
|
|
169
169
|
function UserViewGridComponent_div_9_kendo_window_2_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
170
170
|
const _r42 = i0.ɵɵgetCurrentView();
|
|
@@ -187,58 +187,62 @@ function UserViewGridComponent_div_9_kendo_window_2_button_8_Template(rf, ctx) {
|
|
|
187
187
|
i0.ɵɵtext(1, " Merge Records ");
|
|
188
188
|
i0.ɵɵelementEnd();
|
|
189
189
|
} }
|
|
190
|
-
function
|
|
190
|
+
function UserViewGridComponent_div_9_kendo_window_2_kendo_dialog_9_Template(rf, ctx) { if (rf & 1) {
|
|
191
191
|
const _r48 = i0.ɵɵgetCurrentView();
|
|
192
|
-
i0.ɵɵelementStart(0, "kendo-
|
|
193
|
-
i0.ɵɵlistener("close", function
|
|
194
|
-
i0.ɵɵelementStart(1, "
|
|
195
|
-
i0.ɵɵ
|
|
196
|
-
i0.ɵɵelementEnd()
|
|
197
|
-
i0.ɵɵelementStart(
|
|
198
|
-
i0.ɵɵ
|
|
199
|
-
i0.ɵɵ
|
|
200
|
-
i0.ɵɵ
|
|
192
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 35);
|
|
193
|
+
i0.ɵɵlistener("close", function UserViewGridComponent_div_9_kendo_window_2_kendo_dialog_9_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r48); const ctx_r47 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r47.closeConfirmMergeDialog("cancel")); });
|
|
194
|
+
i0.ɵɵelementStart(1, "p", 36);
|
|
195
|
+
i0.ɵɵtext(2, " Are you sure you want to merge the records? This action cannot be undone. If you select \"Yes\", the records will be merged and the duplicate records will be deleted. ");
|
|
196
|
+
i0.ɵɵelementEnd();
|
|
197
|
+
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 37);
|
|
198
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_div_9_kendo_window_2_kendo_dialog_9_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r48); const ctx_r49 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r49.closeConfirmMergeDialog("no")); });
|
|
199
|
+
i0.ɵɵtext(5, "No");
|
|
200
|
+
i0.ɵɵelementEnd();
|
|
201
|
+
i0.ɵɵelementStart(6, "button", 38);
|
|
202
|
+
i0.ɵɵlistener("click", function UserViewGridComponent_div_9_kendo_window_2_kendo_dialog_9_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r48); const ctx_r50 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r50.closeConfirmMergeDialog("yes")); });
|
|
203
|
+
i0.ɵɵtext(7, " Yes ");
|
|
204
|
+
i0.ɵɵelementEnd()()();
|
|
205
|
+
} if (rf & 2) {
|
|
206
|
+
i0.ɵɵproperty("minWidth", 250)("width", 450);
|
|
207
|
+
} }
|
|
208
|
+
function UserViewGridComponent_div_9_kendo_window_2_Template(rf, ctx) { if (rf & 1) {
|
|
209
|
+
const _r52 = i0.ɵɵgetCurrentView();
|
|
210
|
+
i0.ɵɵelementStart(0, "kendo-window", 25);
|
|
211
|
+
i0.ɵɵlistener("close", function UserViewGridComponent_div_9_kendo_window_2_Template_kendo_window_close_0_listener($event) { i0.ɵɵrestoreView(_r52); const ctx_r51 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r51.closeCompareDialog($event)); });
|
|
212
|
+
i0.ɵɵelementStart(1, "div", 26)(2, "div");
|
|
213
|
+
i0.ɵɵelement(3, "mj-compare-records", 27, 28);
|
|
201
214
|
i0.ɵɵelementEnd()();
|
|
215
|
+
i0.ɵɵelementStart(5, "div", 29);
|
|
216
|
+
i0.ɵɵtemplate(6, UserViewGridComponent_div_9_kendo_window_2_button_6_Template, 2, 0, "button", 30);
|
|
217
|
+
i0.ɵɵtemplate(7, UserViewGridComponent_div_9_kendo_window_2_button_7_Template, 2, 0, "button", 30);
|
|
218
|
+
i0.ɵɵtemplate(8, UserViewGridComponent_div_9_kendo_window_2_button_8_Template, 2, 0, "button", 31);
|
|
219
|
+
i0.ɵɵelementEnd();
|
|
220
|
+
i0.ɵɵtemplate(9, UserViewGridComponent_div_9_kendo_window_2_kendo_dialog_9_Template, 8, 2, "kendo-dialog", 32);
|
|
221
|
+
i0.ɵɵelementEnd();
|
|
202
222
|
} if (rf & 2) {
|
|
203
|
-
const
|
|
223
|
+
const ctx_r35 = i0.ɵɵnextContext(2);
|
|
204
224
|
i0.ɵɵproperty("minHeight", 300)("minWidth", 400)("resizable", true);
|
|
205
225
|
i0.ɵɵadvance(3);
|
|
206
|
-
i0.ɵɵproperty("entityName",
|
|
226
|
+
i0.ɵɵproperty("entityName", ctx_r35._entityInfo ? ctx_r35._entityInfo.Name : "")("recordsToCompare", ctx_r35.recordsToCompare)("visibleColumns", ctx_r35.visibleColumns)("selectionMode", ctx_r35.mergeMode ? true : false);
|
|
207
227
|
i0.ɵɵadvance(3);
|
|
208
|
-
i0.ɵɵproperty("ngIf",
|
|
228
|
+
i0.ɵɵproperty("ngIf", ctx_r35.compareMode);
|
|
229
|
+
i0.ɵɵadvance(1);
|
|
230
|
+
i0.ɵɵproperty("ngIf", ctx_r35.mergeMode);
|
|
209
231
|
i0.ɵɵadvance(1);
|
|
210
|
-
i0.ɵɵproperty("ngIf",
|
|
232
|
+
i0.ɵɵproperty("ngIf", ctx_r35.mergeMode);
|
|
211
233
|
i0.ɵɵadvance(1);
|
|
212
|
-
i0.ɵɵproperty("ngIf",
|
|
234
|
+
i0.ɵɵproperty("ngIf", ctx_r35.isConfirmDialogOpen);
|
|
213
235
|
} }
|
|
214
236
|
function UserViewGridComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
215
237
|
i0.ɵɵelementStart(0, "div");
|
|
216
|
-
i0.ɵɵelement(1, "div",
|
|
217
|
-
i0.ɵɵtemplate(2, UserViewGridComponent_div_9_kendo_window_2_Template,
|
|
238
|
+
i0.ɵɵelement(1, "div", 23);
|
|
239
|
+
i0.ɵɵtemplate(2, UserViewGridComponent_div_9_kendo_window_2_Template, 10, 11, "kendo-window", 24);
|
|
218
240
|
i0.ɵɵelementEnd();
|
|
219
241
|
} if (rf & 2) {
|
|
220
242
|
const ctx_r6 = i0.ɵɵnextContext();
|
|
221
243
|
i0.ɵɵadvance(2);
|
|
222
244
|
i0.ɵɵproperty("ngIf", ctx_r6.isCompareDialogOpened);
|
|
223
245
|
} }
|
|
224
|
-
function UserViewGridComponent_kendo_dialog_10_Template(rf, ctx) { if (rf & 1) {
|
|
225
|
-
const _r50 = i0.ɵɵgetCurrentView();
|
|
226
|
-
i0.ɵɵelementStart(0, "kendo-dialog", 35);
|
|
227
|
-
i0.ɵɵlistener("close", function UserViewGridComponent_kendo_dialog_10_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r50); const ctx_r49 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r49.closeConfirmMergeDialog("cancel")); });
|
|
228
|
-
i0.ɵɵelementStart(1, "p", 36);
|
|
229
|
-
i0.ɵɵtext(2, " Are you sure you want to merge the records? This action cannot be undone. If you select \"Yes\", the records will be merged and the duplicate records will be deleted. ");
|
|
230
|
-
i0.ɵɵelementEnd();
|
|
231
|
-
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 37);
|
|
232
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_kendo_dialog_10_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r50); const ctx_r51 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r51.closeConfirmMergeDialog("no")); });
|
|
233
|
-
i0.ɵɵtext(5, "No");
|
|
234
|
-
i0.ɵɵelementEnd();
|
|
235
|
-
i0.ɵɵelementStart(6, "button", 38);
|
|
236
|
-
i0.ɵɵlistener("click", function UserViewGridComponent_kendo_dialog_10_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r50); const ctx_r52 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r52.closeConfirmMergeDialog("yes")); });
|
|
237
|
-
i0.ɵɵtext(7, " Yes ");
|
|
238
|
-
i0.ɵɵelementEnd()()();
|
|
239
|
-
} if (rf & 2) {
|
|
240
|
-
i0.ɵɵproperty("minWidth", 250)("width", 450);
|
|
241
|
-
} }
|
|
242
246
|
export class UserViewGridComponent {
|
|
243
247
|
get PendingRecords() {
|
|
244
248
|
return this._pendingRecords;
|
|
@@ -344,10 +348,11 @@ export class UserViewGridComponent {
|
|
|
344
348
|
this.gridHeight = 750;
|
|
345
349
|
this._newGridState = {};
|
|
346
350
|
this.editModeEnded = new Subject();
|
|
351
|
+
this.recordsToCompare = [];
|
|
347
352
|
this.compareMode = false;
|
|
348
|
-
|
|
353
|
+
// public compareRecords: BaseEntity[] = [];
|
|
349
354
|
this.mergeMode = false;
|
|
350
|
-
|
|
355
|
+
// public mergeRecords: BaseEntity[] = [];
|
|
351
356
|
this.selectableSettings = {
|
|
352
357
|
enabled: false
|
|
353
358
|
};
|
|
@@ -762,58 +767,65 @@ export class UserViewGridComponent {
|
|
|
762
767
|
}
|
|
763
768
|
}
|
|
764
769
|
selectionChange(args) {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
770
|
+
// update recordsToCompare based on the this.selectedKeys property that is bound
|
|
771
|
+
// selectedKeys is an array of indexes in the this.viewData, and we need to make our
|
|
772
|
+
// this.recordsToCompare an array of records from this.viewData so just map() the selectedKeys for this
|
|
773
|
+
this.recordsToCompare = this.selectedKeys.map((i) => this.viewData[i]);
|
|
774
|
+
// if (this.compareMode) {
|
|
775
|
+
// if(this.compareRecords.length && args?.deselectedRows?.length){
|
|
776
|
+
// const tempRow = args?.deselectedRows[0]?.dataItem;
|
|
777
|
+
// this.compareRecords = this.compareRecords.filter(record => record.ID !== tempRow?.ID);
|
|
778
|
+
// } else if(args?.selectedRows?.length){
|
|
779
|
+
// const tempRow = args?.selectedRows[0]?.dataItem;
|
|
780
|
+
// this.compareRecords.push(tempRow);
|
|
781
|
+
// }
|
|
782
|
+
// }
|
|
783
|
+
// else if (this.mergeMode) {
|
|
784
|
+
// if(this.mergeRecords.length && args?.deselectedRows?.length){
|
|
785
|
+
// const tempRow = args?.deselectedRows[0]?.dataItem;
|
|
786
|
+
// this.mergeRecords = this.mergeRecords.filter(record => record.ID !== tempRow?.ID);
|
|
787
|
+
// } else if(args?.selectedRows?.length){
|
|
788
|
+
// const tempRow = args?.selectedRows[0]?.dataItem;
|
|
789
|
+
// this.mergeRecords.push(tempRow);
|
|
790
|
+
// }
|
|
791
|
+
// }
|
|
792
|
+
}
|
|
793
|
+
// enableCompare(cancel: boolean = false){
|
|
794
|
+
// if(!cancel && this.recordsToCompare.length >= 2){
|
|
795
|
+
// // this scenario occurs when we've already started the compare and the user has selected records, then clicked the compare button again
|
|
796
|
+
// this.isCompareDialogOpened = true;
|
|
797
|
+
// }
|
|
798
|
+
// else if (cancel) {
|
|
799
|
+
// // the user clicked cancel in our toolbar
|
|
800
|
+
// this.compareMode = false;
|
|
801
|
+
// this.recordsToCompare = [];
|
|
802
|
+
// this.selectedKeys = [];
|
|
803
|
+
// }
|
|
804
|
+
// else {
|
|
805
|
+
// // just turning on compare mode from the compare button, so just turn it on and let the user select records
|
|
806
|
+
// this.compareMode = true;
|
|
807
|
+
// }
|
|
808
|
+
// }
|
|
809
|
+
enableMergeOrCompare(cancel = false, type) {
|
|
810
|
+
if (!cancel && this.recordsToCompare.length >= 2) {
|
|
811
|
+
// this scenario occurs when we've already started the merge/compare and the user has selected records, then clicked the merge/compare button again
|
|
790
812
|
this.isCompareDialogOpened = true;
|
|
791
813
|
}
|
|
792
814
|
else if (cancel) {
|
|
793
815
|
// the user clicked cancel in our toolbar
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
else {
|
|
799
|
-
// just turning on compare mode from the compare button, so just turn it on and let the user select records
|
|
800
|
-
this.compareMode = true;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
enableMerge(cancel = false) {
|
|
804
|
-
if (!cancel && this.mergeRecords.length >= 2) {
|
|
805
|
-
// this scenario occurs when we've already started the merge and the user has selected records, then clicked the merge button again
|
|
806
|
-
this.isCompareDialogOpened = true;
|
|
807
|
-
}
|
|
808
|
-
else if (cancel) {
|
|
809
|
-
// the user clicked cancel in our toolbar
|
|
810
|
-
this.mergeMode = false;
|
|
811
|
-
this.mergeRecords = [];
|
|
816
|
+
if (type === 'merge')
|
|
817
|
+
this.mergeMode = false;
|
|
818
|
+
else
|
|
819
|
+
this.compareMode = false;
|
|
812
820
|
this.selectedKeys = [];
|
|
821
|
+
this.recordsToCompare = [];
|
|
813
822
|
}
|
|
814
823
|
else {
|
|
815
|
-
// just turning on merge mode from the merge button, so just turn it on and let the user select records
|
|
816
|
-
|
|
824
|
+
// just turning on merge mode from the merge/compare button, so just turn it on and let the user select records
|
|
825
|
+
if (type === 'merge')
|
|
826
|
+
this.mergeMode = true;
|
|
827
|
+
else
|
|
828
|
+
this.compareMode = true;
|
|
817
829
|
}
|
|
818
830
|
}
|
|
819
831
|
closeConfirmMergeDialog(event) {
|
|
@@ -823,14 +835,21 @@ export class UserViewGridComponent {
|
|
|
823
835
|
const md = new Metadata();
|
|
824
836
|
const result = yield md.MergeRecords({
|
|
825
837
|
EntityName: this._entityInfo.Name,
|
|
826
|
-
RecordsToMerge: this.
|
|
827
|
-
SurvivingRecordID: this.recordCompareComponent.selectedRecordId
|
|
838
|
+
RecordsToMerge: this.recordsToCompare.map((r) => r.ID).filter((id) => { var _a; return id !== ((_a = this.recordCompareComponent) === null || _a === void 0 ? void 0 : _a.selectedRecordId); }),
|
|
839
|
+
SurvivingRecordID: this.recordCompareComponent.selectedRecordId,
|
|
840
|
+
FieldMap: this.recordCompareComponent.fieldMap.map((fm) => {
|
|
841
|
+
return {
|
|
842
|
+
FieldName: fm.fieldName,
|
|
843
|
+
Value: fm.value
|
|
844
|
+
};
|
|
845
|
+
})
|
|
828
846
|
});
|
|
829
847
|
if (result.Success) {
|
|
830
848
|
// merge was successful, so refresh the grid
|
|
831
849
|
this.selectedKeys = [];
|
|
832
|
-
this.
|
|
833
|
-
this.
|
|
850
|
+
this.recordsToCompare = [];
|
|
851
|
+
// this.compareRecords = [];
|
|
852
|
+
// this.mergeRecords = [];
|
|
834
853
|
this.mergeMode = false;
|
|
835
854
|
this.compareMode = false;
|
|
836
855
|
// close the dialogs
|
|
@@ -841,6 +860,7 @@ export class UserViewGridComponent {
|
|
|
841
860
|
}
|
|
842
861
|
else {
|
|
843
862
|
// the merge failed, so show an error message
|
|
863
|
+
this.isConfirmDialogOpen = false;
|
|
844
864
|
this.CreateSimpleNotification("Error merging records: " + result.OverallStatus, 'error', 5000);
|
|
845
865
|
}
|
|
846
866
|
}
|
|
@@ -862,8 +882,9 @@ export class UserViewGridComponent {
|
|
|
862
882
|
break;
|
|
863
883
|
default: // close and cancel
|
|
864
884
|
this.selectedKeys = [];
|
|
865
|
-
this.
|
|
866
|
-
this.
|
|
885
|
+
this.recordsToCompare = [];
|
|
886
|
+
// this.compareRecords = [];
|
|
887
|
+
// this.mergeRecords = [];
|
|
867
888
|
this.mergeMode = false;
|
|
868
889
|
this.compareMode = false;
|
|
869
890
|
this.isCompareDialogOpened = false;
|
|
@@ -922,7 +943,7 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
922
943
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoGridElementRef = _t.first);
|
|
923
944
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoExcelExport = _t.first);
|
|
924
945
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recordCompareComponent = _t.first);
|
|
925
|
-
} }, inputs: { Params: "Params", BottomMargin: "BottomMargin", InEditMode: "InEditMode", EditMode: "EditMode", AutoNavigate: "AutoNavigate", AllowLoad: "AllowLoad" }, outputs: { rowClicked: "rowClicked", rowEdited: "rowEdited" }, decls:
|
|
946
|
+
} }, 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"], ["title", "Confirm Choice", 3, "minWidth", "width", "close", 4, "ngIf"], ["kendoButton", "", "type", "button", 3, "click"], ["kendoButton", "", "themeColor", "primary", "type", "button", 3, "click"], ["title", "Confirm Choice", 3, "minWidth", "width", "close"], [2, "margin", "30px", "text-align", "center"], ["kendoButton", "", 3, "click"], ["kendoButton", "", "themeColor", "primary", 3, "click"]], template: function UserViewGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
926
947
|
i0.ɵɵelementStart(0, "div", 0)(1, "kendo-grid", 1, 2);
|
|
927
948
|
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); });
|
|
928
949
|
i0.ɵɵtemplate(3, UserViewGridComponent_ng_template_3_Template, 8, 8, "ng-template", 3);
|
|
@@ -932,7 +953,6 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
932
953
|
i0.ɵɵtemplate(8, UserViewGridComponent_kendo_excelexport_column_8_Template, 1, 2, "kendo-excelexport-column", 8);
|
|
933
954
|
i0.ɵɵelementEnd()()();
|
|
934
955
|
i0.ɵɵtemplate(9, UserViewGridComponent_div_9_Template, 3, 1, "div", 9);
|
|
935
|
-
i0.ɵɵtemplate(10, UserViewGridComponent_kendo_dialog_10_Template, 8, 2, "kendo-dialog", 10);
|
|
936
956
|
} if (rf & 2) {
|
|
937
957
|
i0.ɵɵadvance(1);
|
|
938
958
|
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);
|
|
@@ -946,12 +966,10 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
946
966
|
i0.ɵɵproperty("ngForOf", ctx.exportColumns);
|
|
947
967
|
i0.ɵɵadvance(1);
|
|
948
968
|
i0.ɵɵproperty("ngIf", ctx.isCompareDialogOpened);
|
|
949
|
-
i0.ɵɵadvance(1);
|
|
950
|
-
i0.ɵɵproperty("ngIf", ctx.isConfirmDialogOpen);
|
|
951
969
|
} }, dependencies: [i3.NgForOf, i3.NgIf, i4.GridComponent, i4.ToolbarTemplateDirective, i4.SelectionDirective, i4.ColumnComponent, i4.FooterTemplateDirective, i4.CheckboxColumnComponent, i5.DialogComponent, i5.DialogActionsComponent, 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}"] });
|
|
952
970
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserViewGridComponent, [{
|
|
953
971
|
type: Component,
|
|
954
|
-
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)=\"
|
|
972
|
+
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)=\"enableMergeOrCompare(false, 'compare')\" *ngIf=\"!compareMode && !mergeMode\" [disabled]=\"compareMode && recordsToCompare.length < 2\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Compare</button>\r\n <button (click)=\"enableMergeOrCompare(false, 'compare')\" *ngIf=\"compareMode\" [disabled]=\"compareMode && recordsToCompare.length < 2\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Compare</button>\r\n <button (click)=\"enableMergeOrCompare(true, 'compare')\" *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)=\"enableMergeOrCompare(false, 'merge')\" *ngIf=\"mergeMode\" [disabled]=\"mergeMode && recordsToCompare.length < 2\" class=\"k-button k-button-md k-rounded-md k-button-solid-base k-button-solid\">Merge</button>\r\n <button (click)=\"enableMergeOrCompare(false, 'merge')\" *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)=\"enableMergeOrCompare(true, 'merge')\" *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]=\"recordsToCompare\" \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-dialog\r\n title=\"Confirm Choice\"\r\n *ngIf=\"isConfirmDialogOpen\"\r\n (close)=\"closeConfirmMergeDialog('cancel')\"\r\n [minWidth]=\"250\"\r\n [width]=\"450\"\r\n >\r\n <p style=\"margin: 30px; text-align: center;\">\r\n Are you sure you want to merge the records? This action cannot be undone. If you select \"Yes\", the records will be merged and the duplicate records will be deleted.\r\n </p>\r\n <kendo-dialog-actions>\r\n <button kendoButton (click)=\"closeConfirmMergeDialog('no')\">No</button>\r\n <button kendoButton (click)=\"closeConfirmMergeDialog('yes')\" themeColor=\"primary\">\r\n Yes\r\n </button>\r\n </kendo-dialog-actions>\r\n </kendo-dialog>\r\n </kendo-window>\r\n</div>", 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}"] }]
|
|
955
973
|
}], function () { return [{ type: i1.FormBuilder }, { type: i2.Router }]; }, { Params: [{
|
|
956
974
|
type: Input
|
|
957
975
|
}], BottomMargin: [{
|
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.45",
|
|
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",
|