@memberjunction/ng-user-view-grid 0.9.44 → 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[];
|
|
@@ -38,51 +38,51 @@ function UserViewGridComponent_ng_template_3_button_0_Template(rf, ctx) { if (rf
|
|
|
38
38
|
function UserViewGridComponent_ng_template_3_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
39
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
40
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.
|
|
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
45
|
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
46
|
-
i0.ɵɵproperty("disabled", ctx_r8.compareMode && ctx_r8.
|
|
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
49
|
const _r20 = i0.ɵɵgetCurrentView();
|
|
50
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.
|
|
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
55
|
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
56
|
-
i0.ɵɵproperty("disabled", ctx_r9.compareMode && ctx_r9.
|
|
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
59
|
const _r22 = i0.ɵɵgetCurrentView();
|
|
60
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.
|
|
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
66
|
const _r24 = i0.ɵɵgetCurrentView();
|
|
67
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.
|
|
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
72
|
const ctx_r11 = i0.ɵɵnextContext(2);
|
|
73
|
-
i0.ɵɵproperty("disabled", ctx_r11.mergeMode && ctx_r11.
|
|
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
76
|
const _r26 = i0.ɵɵgetCurrentView();
|
|
77
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.
|
|
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
83
|
const _r28 = i0.ɵɵgetCurrentView();
|
|
84
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.
|
|
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
|
} }
|
|
@@ -223,7 +223,7 @@ function UserViewGridComponent_div_9_kendo_window_2_Template(rf, ctx) { if (rf &
|
|
|
223
223
|
const ctx_r35 = i0.ɵɵnextContext(2);
|
|
224
224
|
i0.ɵɵproperty("minHeight", 300)("minWidth", 400)("resizable", true);
|
|
225
225
|
i0.ɵɵadvance(3);
|
|
226
|
-
i0.ɵɵproperty("entityName", ctx_r35._entityInfo ? ctx_r35._entityInfo.Name : "")("recordsToCompare", ctx_r35.
|
|
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);
|
|
227
227
|
i0.ɵɵadvance(3);
|
|
228
228
|
i0.ɵɵproperty("ngIf", ctx_r35.compareMode);
|
|
229
229
|
i0.ɵɵadvance(1);
|
|
@@ -348,10 +348,11 @@ export class UserViewGridComponent {
|
|
|
348
348
|
this.gridHeight = 750;
|
|
349
349
|
this._newGridState = {};
|
|
350
350
|
this.editModeEnded = new Subject();
|
|
351
|
+
this.recordsToCompare = [];
|
|
351
352
|
this.compareMode = false;
|
|
352
|
-
|
|
353
|
+
// public compareRecords: BaseEntity[] = [];
|
|
353
354
|
this.mergeMode = false;
|
|
354
|
-
|
|
355
|
+
// public mergeRecords: BaseEntity[] = [];
|
|
355
356
|
this.selectableSettings = {
|
|
356
357
|
enabled: false
|
|
357
358
|
};
|
|
@@ -766,58 +767,65 @@ export class UserViewGridComponent {
|
|
|
766
767
|
}
|
|
767
768
|
}
|
|
768
769
|
selectionChange(args) {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
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
|
|
794
812
|
this.isCompareDialogOpened = true;
|
|
795
813
|
}
|
|
796
814
|
else if (cancel) {
|
|
797
815
|
// the user clicked cancel in our toolbar
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
else {
|
|
803
|
-
// just turning on compare mode from the compare button, so just turn it on and let the user select records
|
|
804
|
-
this.compareMode = true;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
enableMerge(cancel = false) {
|
|
808
|
-
if (!cancel && this.mergeRecords.length >= 2) {
|
|
809
|
-
// this scenario occurs when we've already started the merge and the user has selected records, then clicked the merge button again
|
|
810
|
-
this.isCompareDialogOpened = true;
|
|
811
|
-
}
|
|
812
|
-
else if (cancel) {
|
|
813
|
-
// the user clicked cancel in our toolbar
|
|
814
|
-
this.mergeMode = false;
|
|
815
|
-
this.mergeRecords = [];
|
|
816
|
+
if (type === 'merge')
|
|
817
|
+
this.mergeMode = false;
|
|
818
|
+
else
|
|
819
|
+
this.compareMode = false;
|
|
816
820
|
this.selectedKeys = [];
|
|
821
|
+
this.recordsToCompare = [];
|
|
817
822
|
}
|
|
818
823
|
else {
|
|
819
|
-
// just turning on merge mode from the merge button, so just turn it on and let the user select records
|
|
820
|
-
|
|
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;
|
|
821
829
|
}
|
|
822
830
|
}
|
|
823
831
|
closeConfirmMergeDialog(event) {
|
|
@@ -827,7 +835,7 @@ export class UserViewGridComponent {
|
|
|
827
835
|
const md = new Metadata();
|
|
828
836
|
const result = yield md.MergeRecords({
|
|
829
837
|
EntityName: this._entityInfo.Name,
|
|
830
|
-
RecordsToMerge: this.
|
|
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); }),
|
|
831
839
|
SurvivingRecordID: this.recordCompareComponent.selectedRecordId,
|
|
832
840
|
FieldMap: this.recordCompareComponent.fieldMap.map((fm) => {
|
|
833
841
|
return {
|
|
@@ -839,8 +847,9 @@ export class UserViewGridComponent {
|
|
|
839
847
|
if (result.Success) {
|
|
840
848
|
// merge was successful, so refresh the grid
|
|
841
849
|
this.selectedKeys = [];
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
850
|
+
this.recordsToCompare = [];
|
|
851
|
+
// this.compareRecords = [];
|
|
852
|
+
// this.mergeRecords = [];
|
|
844
853
|
this.mergeMode = false;
|
|
845
854
|
this.compareMode = false;
|
|
846
855
|
// close the dialogs
|
|
@@ -851,6 +860,7 @@ export class UserViewGridComponent {
|
|
|
851
860
|
}
|
|
852
861
|
else {
|
|
853
862
|
// the merge failed, so show an error message
|
|
863
|
+
this.isConfirmDialogOpen = false;
|
|
854
864
|
this.CreateSimpleNotification("Error merging records: " + result.OverallStatus, 'error', 5000);
|
|
855
865
|
}
|
|
856
866
|
}
|
|
@@ -872,8 +882,9 @@ export class UserViewGridComponent {
|
|
|
872
882
|
break;
|
|
873
883
|
default: // close and cancel
|
|
874
884
|
this.selectedKeys = [];
|
|
875
|
-
this.
|
|
876
|
-
this.
|
|
885
|
+
this.recordsToCompare = [];
|
|
886
|
+
// this.compareRecords = [];
|
|
887
|
+
// this.mergeRecords = [];
|
|
877
888
|
this.mergeMode = false;
|
|
878
889
|
this.compareMode = false;
|
|
879
890
|
this.isCompareDialogOpened = false;
|
|
@@ -958,7 +969,7 @@ UserViewGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserV
|
|
|
958
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}"] });
|
|
959
970
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserViewGridComponent, [{
|
|
960
971
|
type: Component,
|
|
961
|
-
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}"] }]
|
|
962
973
|
}], function () { return [{ type: i1.FormBuilder }, { type: i2.Router }]; }, { Params: [{
|
|
963
974
|
type: Input
|
|
964
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",
|